Saudi Arabia’s Management of the Hajj Season through Artiﬁcial Intelligence and Sustainability

: High-density gatherings have the potential to turn from a peaceful mass into a human disaster unless they are managed in an organized manner. Saudi Arabia’s Ministry of Hajj implemented an integrated system based on artiﬁcial intelligence. The Kingdom of Saudi Arabia (KSA) was eager to take advantage of the techniques of artiﬁcial intelligence to conduct its strategic plan, considering limited pilgrims who would be allowed to perform the Hajj rites during these exceptional circumstances. In this study, the experience of the KSA in crowd management using artiﬁcial intelligence during the Hajj was examined to create a model for similar circumstances. This study employed the descriptive analytical method. The program Arc Gis Pro 2.9.2 was used to produce maps related to the study. A strategic analysis was also conducted regarding the experience of the KSA in crowd management using SWOT analysis concerning the study area. This study found that the KSA has become a leader in crowd management and a reference and role model in managing crowds through an expanded use of artiﬁcial intelligence during the COVID-19 pandemic. It undertook all necessary precautionary measures to protect the pilgrims, and no injuries were reported.


Introduction
Crowd management is one of the most intricate and difficult tasks in management and a core issue and concern in political geography. Crowd management in human gatherings has recently emerged as an independent science, having its own concepts, theses, and methods, which require the collaboration of dozens of administrative bodies to develop a plan to manage crowds and control the reception and grouping process during events and seasons while evading damage. Many countries have developed approaches and techniques with regard to this, but each country enacts crowd management in its own way and according to its capabilities in dealing with human crowds. Sometime the numbers of large groups can reach millions of people at a specific time and in a specific place: dealing with those crowds while ensuring their safety, shelter, transportation, access to health services, and security in case of violence or riots is challenging. While holding an event, leaders in host countries should ensure that the relevant authorities take preventive and awareness measures into account. First, they must develop proper plans, in addition to providing organization, leadership, and control, for all human, material, and information resources in a specific organizational space, while also coping with multiple cultures, languages, behaviors, and moods. In October 2012, a German news agency quoted a British expert specializing in crowd management as saying, "Saudi Arabia deserves the gold medal in managing and organizing crowds and directing human masses," referring to the advancement of security precautions in Saudi Arabia in handling the nearly 5 million pilgrims that come at the same period from many nations with many cultures; herein lies the difference [1].

Study Problem
Dealing with crowd management, especially with respect to the Hajj and Umrah seasons and the presence of large groups in a limited period of time within a small geographical area to perform their religious rituals, is an axis of the Kingdom's government interest.
The Saudi government has allocated relevant tasks to many of its sub-agencies and authorities and to those under its supervision to divide the organization of seasons and management of human crowds among these agencies, to better complete the tasks entrusted to them and reduce the burdens that might fall on workers, in case this management process was completed by a single regulator. This situation requires a special type of manager, who should have a set of skills and traits, including courage, constancy, emotional balance, and the ability to think creatively, communicate, engage in dialog, and formulate and draw up the tactics necessary to deal with crises, which necessitates exploiting the application and techniques of artificial intelligence, according to the strategic plan of the Kingdom. Its planning took into account the limited numbers allowed to perform the Hajj rites during these exceptional circumstances to prevent the spread of COVID-19 in large crowds where it is difficult to achieve spatial distance between its members. This was undertaken above all to achieve the purposes of Islamic Sharia in preserving the human soul, especially regarding the aims of the Kingdom, expressed in Vision 2030, to facilitate the hosting of an increasing number of Umrah pilgrims from outside the Kingdom, with the aim of allowing up to 30 million pilgrims by the year 2030. To this end, work must be conducted to facilitate the hosting and provision of opportunities for the largest number of Muslims to perform the rituals of Umrah and visitation by focusing on the good management, movement, and grouping of the expected crowds, including a focus on and an upgrading of services to reach the highest quality standards, enhancing health, security, and safety; creating comfort and overcoming difficulties; developing the spirit and culture of hospitality; and enriching the emotional and cultural experience and heritage.

Importance of the Study
The importance of this study rests on the statements in and interest of international reports that praise the functioning, responsibilities, and security and administrative precautions taken in the Kingdom in managing the crowds that arrive every year, especially in the Hajj season.
This unique experience is of interest to researchers at many international universities. Teaching the Kingdom began as a unique model, as the Kingdom mobilizes its energies and its material and human capabilities to receive pilgrims during the Hajj season and Umrah performers throughout the year.
The Kingdom is the only country in the world with this experience in practicing crowd management, beginning in ancient times, in a small space, and it is thus qualified to be Sustainability 2022, 14, 14142 3 of 19 at the forefront worldwide in this regard. This highlights the importance of this topic in terms of its uniqueness and the multiplicity of its related responsibilities throughout the year in the areas of security, safety, and health and transportation, in terms of the transition and expansion of the uses of artificial intelligence and technology. The sustainability of the Hajj and Umrah system, the improvement of its entire services, and the raising of the level of human and technical performance of all the bodies responsible for it are crucial. The successes of the Hajj seasons go beyond being a mere developmental achievement, attaining a world-leading experience that is worthy of research and study in the science of crisis management. Accordingly, all parties are obligated to inform the relevant authorities when deciding the location of an event and a human crowd meeting to assess the potential risks and then develop an emergency plan and then the implementation phase and mobilize the organizers throughout the event and put up guiding boards with the provision of barriers and electronic registration of the event in advance to avoid crowds. Receiving these crowds from all over the world also constitutes a challenge in the field of environment that crowd management has not overlooked. It has worked to preserve environmental sustainability and made it a priority through what was launched by a non-governmental organization, which is a green guide (Green Hajj), which is a phone application to accompany pilgrims and Umrah pilgrims For Environmentally Friendly Religious Rituals.
In view of the continuous successes achieved by the Kingdom during the Hajj season and in view of the background and cumulative experience in the sustainability of crowd management, it was able to manage many other seasons related to the entertainment aspect, which is witnessing an increasing demand from inside and outside the Kingdom, as well as in the sports aspect during matches, and in the tourism sector and the reception of tourists in a healthy environment that adheres to the highest standards of prevention and safety.

1.
To highlight the Kingdom's leadership in crowd management and its excellence in the world.

2.
To present the Kingdom's successful experience in using artificial intelligence in managing the Hajj and Umrah seasons during the COVID-19 pandemic.

Crowd Types
The risk of injury, crimes, unacceptable behavior, and even terrorist attacks, which cause panic, distress, and anxiety, is likely to increase when people crowd into many places in large groups (Table 1). A number of diverse and complex occurrences can also result from a feeling of panic in audiences or crowds, such as crushing, crowding, and stampedes, so knowing the best ways to respond to a variety of situations and how to recognize, deal with, and manage these incidents is a paramount concern when implementing crowd management and safety strategies. Organized or directed crowd Demonstration and protestation 3 Dense or crowded crowd To achieve a common goal 4 Violent crowd Breaking the law and doing sabotage 5 Escaping crowd Escaping from disaster or event 6 Religious crowd Performing religious rituals and rites 7 Political crowd Election or expressing an opinion Source: Prepared by the researchers, with reference to [2].

1.
They are a gathering of more than 20 people. 2.
The members of the crowd are located in a specific place in a single geographical spot in a specific measured period of time to carry out one common task or goal between them. 3.
They act in a unified manner, reflecting shared social identity, goals, and interests. 4.
They have seriousness and coherence: the individuals function in a socially coherent manner, regardless of the background they came from [2].

Techniques for Measuring Crowd Flow Rates and Density Levels
Previously, the measurement of flow rates and density levels was based on traditional methods, but later, tremendous development in techniques was seen related to the movement of crowds as a result of technical development in general. Among the most prominent of these techniques is imaging with digital cameras, through which the results are monitored and analyzed directly, in addition to mobile equipment with remotely controlled cameras mounted on vehicles, on aircraft, and on suspended tracks, such as spider cameras; these would all include traditional cameras producing still images, digital cameras, thermal cameras, and more advanced cameras [3].
To guarantee crowd safety and maintain security during an event, it is important to focus on the following elements, which are very important for decision-makers and security planners: The geographical location or the spatial space in which the crowds gather. It is impossible to ignore an event, especially if it affects citizens or government facilities, causes the destruction of private property, or causes human injuries. Therefore, experts and specialists must be involved in geographical planning to determine gathering sites and examine the sites of the gathering, as well as determining the main entrances and highways to implement security operations to prevent the chance that it may lead to failure in resolving problems; this facilitates interventions and movements without restrictions or difficulties that prevent access to crowds when a problem takes place.

2.
Speed is required to absorb a crisis if it occurs, in addition to considering alternatives and making the appropriate decision to contain or limit damage and restore the activity of the organized crowd.

3.
The use of information systems involves vast amounts of descriptive and numerical data that can be aggregated and organized, thereby allowing simulation models to reach the optimal solution to a particular problem through the application of mathematical models. By devising prediction and simulation models that help in taking the right decision at the right time, especially during events of crises and disasters, experts can implement various technical models that adhere to the standards set by decision-makers [4].
Developments that have taken place in crowd management methods include creation of a follow-up mechanism and early warning ability with the use of technical tools for collecting and organizing data, such as smart cameras, wireless identification devices, and smart phone applications. Prior to setting up an event, relevant authorities must work toward creating an operational digital environment for monitoring crowd movements and identifying expected sites of crowding, which, in turn, help decision-makers evaluate solutions in short time spans to avoid any problem. The most important steps in crowd management plans at event sites include the following:

1.
Understanding individuals' behavior when moving within groups that have no common relationship.

2.
Being aware of the audience of the event and the nature of its interaction with the event.

3.
Performing advance planning for event crowd management as part of the event planning process itself.
When contracting with companies specializing in organizing and managing crowds, companies that focus on proper planning and use the highest standards of prevention and safety in crowd management should be chosen. This includes simplifying registration procedures and automating them to avoid being a burden on visitors, preventing chaos, providing a sufficient number of employees to organize the movement of visitors and direct and help them, assessing health and safety risks to prevent or reduce potential dangers during the event, reviewing the emergency plan, and developing possible solutions to unexpected occurrences to prevent loss of control of event management, in addition to providing directional panels, barriers, and posts. There are five main stages of crowd management. These depend on extracting data on the crowds to be monitored to allow appropriate decisions to be made about them [5] (Table 2).

Study Area Location
The Holy Sites and the Makkan Sanctuary are located in the western part of the Kingdom of Saudi Arabia in the Makkah region, between longitudes 47 • 37 39 and 55 • 58 39 E and between latitudes 21 • 18 46 and 21 • 58 31 N ( Figure 1). Makkah is considered the heart of the Islamic world and the center of the globe. Makkah is located in the northern hemisphere. The longitude of Makkah (global zero) divides the world into two parts, one to the east of it and one to the west (Association of Neighborhood Centers in Makkah) [6].
3. Performing advance planning for event crowd management as part of the event planning process itself.
When contracting with companies specializing in organizing and managing crowds, companies that focus on proper planning and use the highest standards of prevention and safety in crowd management should be chosen. This includes simplifying registration procedures and automating them to avoid being a burden on visitors, preventing chaos, providing a sufficient number of employees to organize the movement of visitors and direct and help them, assessing health and safety risks to prevent or reduce potential dangers during the event, reviewing the emergency plan, and developing possible solutions to unexpected occurrences to prevent loss of control of event management, in addition to providing directional panels, barriers, and posts. There are five main stages of crowd management. These depend on extracting data on the crowds to be monitored to allow appropriate decisions to be made about them [5] (Table 2).

Study Area Location
The Holy Sites and the Makkan Sanctuary are located in the western part of the Kingdom of Saudi Arabia in the Makkah region, between longitudes 47°37′39″ and 55°58′39″ E and between latitudes 21°18′46″ and 21°58′31″ N ( Figure 1). Makkah is considered the heart of the Islamic world and the center of the globe. Makkah is located in the northern hemisphere. The longitude of Makkah (global zero) divides the world into two parts, one to the east of it and one to the west (Association of Neighborhood Centers in Makkah) [6].

Literature Review
In her scientific thesis "Crowd Management to Organize Women's Visit to the Holy Raudah Using Simulation for the Problems of Overcrowding and Stamping of Ladies in the Holy Raudah,". Sonbol discussed the problem of stampeding in the women's section. Visitors in this area are hindered by the limited space provided, the time of the visit [7], the distance of the gates from the Holy Raudah, and the diversity of beliefs and cultures of visitors at the location. That study indicated that these restrictions lead to difficulty in organizing crowds, and a scientific study is required to improve it. This study enhanced the spiritual experience of the Holy Raudah through the improvement of crowd management by suggesting the best itinerary for the visit apart from reducing waiting and collision time with the use of computer simulation systems. The study presented four proposed solutions accompanied by different scenarios to simulate visits to the Holy Raudah, along with measurement of the KPIs for each of them to compare and help choose the best simulated model. The results of the comparison show that the best simulated model is scenario 4, with area B used only for waiting before the beginning of the visit start and with the Holy Raudah being divided into 12 rows to allow female visitors specific places for their prayers to help them calm themselves and pray in peace without rushing. This approach improves the Holy Raudah visit, reducing the average waiting time by 71%, which could enable larger numbers of visitors to be received. Al-Qarni in his thesis entitled "A Future Perspective to Achieve the Security of Pilgrims and Umrah Performers According to Vision 2030 in the Kingdom of Saudi Arabia," posed the question of how to develop a future perspective to enable the security of pilgrims and Umrah performers in accordance with Vision 2030. The researcher used content analysis and interviewing to collect data to address the study question in an intentional sample that included 15 experts and strategists in the field of Hajj and Umrah services. The study ascertained the need to complete, develop, and design plans involving available technologies, in line with the needs of pilgrims and to achieve Vision 2030. It indicated the need to raise the capacity of the Holy Sites, especially Mina and the circumambulation court, as they are currently insufficient to accommodate the target numbers to achieve Vision 2030, which envisions an annual 5 million pilgrims and 30 million Umrah performers by 2030. The study also noted the need for a comprehensive plan focusing on potential risks, taking into account security and safety standards by ensuring good organization and accurate statistics for pilgrims and Umrah performers, their classifications, and measurement of the performance of the provided services level, their efficiency, and the achievement of the objectives of the vision. It stressed that awareness efforts would not achieve their goal if the pilgrims and Umrah performers are not enlightened.
Idris noted that every year an operational plan is prepared in which all relevant parties participate, and this becomes the main basis for dealing with the crowds of pilgrims. He stated that the responsible authorities experience great difficulty with regard to control of the flows in carrying out their tasks and achieving these goals during Ramadan and Hajj, especially Masjid Al-haram and its surrounding squares owing to the severe overcrowding around Al-haram. Those responsible for this face great difficulties in dealing with those crowds. Direct monitoring showed high rates of flow and density, reaching more than five people per square meter at peak times in the circumambulation court and other Haram courts. The study also suggested that a crowd management plan be developed, especially for the Hajj and Ramadan seasons, including the presentation of several proposals that can contribute to the reduction in crowding based on field study data and direct monitoring. Felemban discussed the use of the digital revolution to manage Hajj crowds and indicated the most crowded places during the Hajj period, such as the circumambulation of the Kaaba [8]; camping in Mina, Arafat, and Muzdalifah; and stoning of the Jamarat, which is a very crowded area. The diverse nature of the crowd in terms of race, age, language, and culture also poses many challenges for the organizers, who are responsible for ensuring the smooth organization of the event. The emergence of modern digital technology helps researchers explore and suggest modern methods of crowd management to develop strategies for organizing these gatherings. This study presented a classification that summarizes the survey conducted in this study on the use of technical areas to provide the necessary services and improve crowd management during the Hajj season. These would include wireless technologies, computer-assisted vision, spatial computing, data analytics, mobile applications, modeling, and simulation. The study indicated that one dimension of this classification involves understanding the variety of possible crowd management techniques, and another dimension involves understanding the impact of technologies in dealing with this massive crowd. The study also tackled a multi-dimensional technical approach, the results of which may help researchers better deal with future gatherings. The study suggested the integration of effective technologies, such as data analysis, which can help in discovering useful information with the help of data mining, text analytics, and data visualization, which supports the decision-making process. Abi Sen performed a study to design a smart street for crowd management during the Hajj [9]. They showed that the crowd management seen during the Hajj is typical and that Hajj management has made many large improvements in the infrastructure of Hajj facilities, which have helped reduce overcrowding in the Holy Sites. However, the problem of crowd control and congestion remains a real one. This study therefore proposed the design of digital smart streets based on LED light screens and wireless network sensors, computing, and main management servers, which can facilitate crowd management and control, easing crowd management by providing a rapid response to alerts by the central administration and by using and employing techniques to discover crowd problems and identify places of interest. A prototype of the proposed system has been simulated to show its feasibility and ease of application, as well as determining the benefits and advantages that can be achieved if it is implemented in crowded areas during the Hajj. This study turned the crowd into a smart area that could be managed and controlled through quick responses to people and quick intervention in emergencies by turning the ground into a smart deck. Colors can also be used to make observation easier so that it is understood by all people of different cultures, which is especially valuable during the Hajj, which is attended by millions of people who come from all over the earth.
Shambour and Gutub studied the recent progress in the study of technologies and applications of the Internet of Things that serve Hajj and Umrah in an analytical study conducted over 5 years (2016-2020) [10]. The papers reviewed were classified into four main groups, which include studies of the two holy mosques (Al-haraman Al-sharifan) and the Holy Sites, pre-arrival studies, housing and services studies, and transportation and crowd management studies. The analysis showed that a plurality of the research reviewed (34.2%) was published in 2018, and artificial intelligence was the most targeted area (24.2%). Real application was the most widely used tool among researchers (42.3%). The results also showed that most researchers relied on the use of descriptive statistics in analyzing and interpreting data and most of the data collection methods used by researchers depend on the use of official reports and data, followed by virtual data, software, technology, and cameras. The results showed relative weakness in studies related to the two holy mosques and the Holy Sites relative to other research branches. Finally, some research ideas and practical suggestions were provided to serve pilgrims, visitors, and service providers, such as the use of smart mobile screens distributed in certain places in the Holy Sites to enable people to discover their place of residence in case one is lost. The researcher suggested a monitoring system, a smart parking system, and smart building system. Basahel et al. addressed the management of Hajj and Umrah during COVID-19 [11]. Their study indicated that thousands of crowded gatherings are being held all over the world, and most of them have a religious component. Holding events such as this represents a great challenge, especially during the COVID-19 pandemic. To control the spread of infection, many restrictions were put in place, including mandatory face masks, maintaining social distancing, and a commitment to regular cleaning and sterilization. That study investigated many crowded events held during the pandemic and investigated their impact and contributions regarding the spread or containment of COVID-19. Most countries consider that containing the pandemic globally is difficult, and ensuring that people have access to safe drinking water is a vital step in reducing the spread of the virus among the population [12].
Resolving environmental issues related to karst regions and managing their water resources are common concerns in most arid and semi-arid countries, especially in the Middle East [13]. The study also suggested a framework for the effective organization of crowded events during current and future epidemics and praised the success of the management of the Hajj and Umrah. It suggested that the international community can learn from the experience of management of the Hajj and Umrah to organize crowds during the pandemic.

Study Approach
This study adopted a descriptive analytical approach by studying the Kingdom's leadership in crowd management and its world-standard excellence, presenting its successful experience in using artificial intelligence to manage the Hajj and Umrah seasons during the COVID-19 pandemic.

Study Tools
The Arc Gis Pro 2.9.2 (Esri, Redlands, CA, USA) software was used to produce and output the maps needed for the study. A strategic analysis was also conducted on the experience of the Kingdom of Saudi Arabia in crowd management through artificial intelligence by means of a SWOT analysis for the study area.
An infographic design was created for the smart applications and programs that serve pilgrims, Umrah performers, and visitors to the Holy Sites.

Study Axes
( Figure 2) shows the method of designing the experiment and the steps taken to obtain the results. their impact and contributions regarding the spread or containment of COVID-19. Most countries consider that containing the pandemic globally is difficult, and ensuring that people have access to safe drinking water is a vital step in reducing the spread of the virus among the population [12].
Resolving environmental issues related to karst regions and managing their water resources are common concerns in most arid and semi-arid countries, especially in the Middle East [13]. The study also suggested a framework for the effective organization of crowded events during current and future epidemics and praised the success of the management of the Hajj and Umrah. It suggested that the international community can learn from the experience of management of the Hajj and Umrah to organize crowds during the pandemic.

Study Approach
This study adopted a descriptive analytical approach by studying the Kingdom's leadership in crowd management and its world-standard excellence, presenting its successful experience in using artificial intelligence to manage the Hajj and Umrah seasons during the COVID-19 pandemic.

Study Tools
The Arc Gis Pro 2.9.2 (Esri, Redlands, CA, USA) software was used to produce and output the maps needed for the study. A strategic analysis was also conducted on the experience of the Kingdom of Saudi Arabia in crowd management through artificial intelligence by means of a SWOT analysis for the study area.
An infographic design was created for the smart applications and programs that serve pilgrims, Umrah performers, and visitors to the Holy Sites. (Figure 2) shows the method of designing the experiment and the steps taken to obtain the results.

Highlighting the Kingdom's Leadership in Crowd Management and Its World-Standard Excellence
The Kingdom differs from the rest of the world in terms of its crowd reception and management. It receives at least 2 million visitors for the Hajj from countries all over the world, in addition to the millions who come to perform Umrah throughout the year, especially during the month of Ramadan; the numbers of these visitors reach 3 million. A quick look at the nature of the situation during these seasons with these numbers allowed us to find a distinct method and style to them, which lies in performance, as the Kingdom and its representatives deal with all of these cultures, languages, behaviors, and moods that come from around the world within a small space. Here, where millions of different races gather, it is never easy to control security and allow everyone in them to feel safe to practice their rituals and rites in peace and tranquility. Here lies the administrative and security challenge, which culminates in the Hajj and Umrah seasons. Addressing it requires summoning and harnessing all of the country's capabilities. No country in the world can simply adapt to this reality, as it is not easy by its nature. If we add to this the health challenges, the process will become more difficult, indicating the enormity of the work entrusted to the relevant authorities and the greatness of their responsibilities.
The Kingdom, therefore, pays special attention to the management of pilgrims and Umrah performers, and this distinguishes it in its crowd management as a result of the long-standing practice of policy making and plans and measures at all levels of health and security. The Kingdom's Ministry of the Interior recently created its Institute for Crowd Management, supplementing the Custodian of the Two Holy Mosques Institute for Hajj and Umrah Research at Umm Al-Qura University. These institutions work to establish and organize the science of crowd management and human gatherings during the Hajj and Umrah. Therefore, it is appropriate to focus our discussion along this axis to identify the Kingdom's experience in crowd management and human gatherings during the Hajj and Umrah seasons in particular. It is worth reviewing the Kingdom's expertise and pioneering experience in crowd management in general, especially during the challenges involved in the crisis that has overwhelmed the world during the COVID-19 pandemic. Crowd management thus emerged as one of the strongest pillars of the Kingdom's Vision 2030, through its future goal, which is to host 100 million visits by 2030, which will place it among the top five tourist-receiving countries in the world. This entails a focus on development and upgrades to the tourism, culture, and entertainment sectors, which could be considered among the main pillars for diversifying sources of income. Crowd management in the Kingdom has the following goals:

1.
Providing a healthy environment consistent with the highest standards of prevention and safety.

2.
Raising the efficiency and quality of event management.

4.
Enhancing the events sector in the economic and investment aspect.
Government agencies contract with companies that specialize in managing events to enable them to ensure the implementation of their plans in an atmosphere of security and safety, developing and coordinating security plans within events in cooperation with security agencies and facilitating entry and exit procedures for visitors, evacuation, emergency, and crisis management. They also ensure the availability of qualified and trained cadres in the various fields of crowd management and provide all modern technologies and means of applying the principles and methods of crowd management on the ground in the required manner, in light of the data and characteristics of each season. Figure 3 shows the functions of the agencies entrusted with crowd management. Figure 3 shows that the Kingdom focuses on plans, procedures, and systematic and scientific mechanisms to manage large crowds in general and pilgrims, Umrah performers, visitors, and worshippers in particular. It also supervises the techniques and methods used to manage crowds, including monitoring, surveillance, and control systems, providing real-time database to support decision-making processes in a timely manner while ensuring effective and continuous coordination and communication with all concerned parties in the two holy mosques and other gathering places, which contributes to the management of large crowd successfully. The crowd management centers are concerned with supervising studies and developmental research to identify places of congestion and stampede and presenting recommendations and future proposals to address and overcome these problems. Sustainability 2022, 14, x FOR PEER REVIEW 10 of 20  Figure 3 shows that the Kingdom focuses on plans, procedures, and systematic and scientific mechanisms to manage large crowds in general and pilgrims, Umrah performers, visitors, and worshippers in particular. It also supervises the techniques and methods used to manage crowds, including monitoring, surveillance, and control systems, providing real-time database to support decision-making processes in a timely manner while ensuring effective and continuous coordination and communication with all concerned parties in the two holy mosques and other gathering places, which contributes to the management of large crowd successfully. The crowd management centers are concerned with supervising studies and developmental research to identify places of congestion and stampede and presenting recommendations and future proposals to address and overcome these problems.
The Kingdom has shown an astonishing ability to manage large events during the pandemic to the entire world. The Kingdom's performance in crowd management is unique and world class in that it did not suspend the pilgrimage but rather immediately turned to ensuring the highest standards of precaution, which thus reflects its success and superior ability to develop and take advantage of modern technology to provide a highlevel preventive service while meeting all of their needs. The performance of crowd management has shifted directly to an expansion of artificial intelligence techniques with respect to the areas of security, health, and religion. The performance of crowd management during the Hajj and Umrah season produced a lofty moral and humanitarian slogan in making the human being the first focus. The Kingdom is also proud of its cumulative experiences in protecting pilgrims from diseases in general and epidemics in particular, which forms part of good crowd management in terms of health [14]. The Kingdom's success in hosting millions of pilgrims annually from different places and environments and of different ages and nationalities is evidence of the excellence of the health care that the Kingdom provides to its guests. The Ministry of Health has also equipped 25 hospitals in Makkah Al-Mukarramah, Al-Madinah Al-Munawwarah, and the Holy Sites with a bed capacity of 5000 beds, led by 1141 medical teams in the Holy Sites. It also prepared 142 primary health care centers, as well as more than 140 mobile clinics deployed in the places where pilgrims gather, in addition to 86 field teams in the Holy Sites and inside and outside Makkah.
From these efforts, the Hajj season of 2018 was admired and praised by the World Health Organization for the care and attention shown by the Kingdom's government, and The Kingdom has shown an astonishing ability to manage large events during the pandemic to the entire world. The Kingdom's performance in crowd management is unique and world class in that it did not suspend the pilgrimage but rather immediately turned to ensuring the highest standards of precaution, which thus reflects its success and superior ability to develop and take advantage of modern technology to provide a high-level preventive service while meeting all of their needs. The performance of crowd management has shifted directly to an expansion of artificial intelligence techniques with respect to the areas of security, health, and religion. The performance of crowd management during the Hajj and Umrah season produced a lofty moral and humanitarian slogan in making the human being the first focus. The Kingdom is also proud of its cumulative experiences in protecting pilgrims from diseases in general and epidemics in particular, which forms part of good crowd management in terms of health [14]. The Kingdom's success in hosting millions of pilgrims annually from different places and environments and of different ages and nationalities is evidence of the excellence of the health care that the Kingdom provides to its guests. The Ministry of Health has also equipped 25 hospitals in Makkah Al-Mukarramah, Al-Madinah Al-Munawwarah, and the Holy Sites with a bed capacity of 5000 beds, led by 1141 medical teams in the Holy Sites. It also prepared 142 primary health care centers, as well as more than 140 mobile clinics deployed in the places where pilgrims gather, in addition to 86 field teams in the Holy Sites and inside and outside Makkah.
From these efforts, the Hajj season of 2018 was admired and praised by the World Health Organization for the care and attention shown by the Kingdom's government, and for the protection of the visiting crowds from the spread of the pandemic. All services were free of charge, including, but not limited to, for example, those outlined in Table 3.
Where the Kingdom harnessed all its available capabilities in the field of health services provided to pilgrims, especially medical and emergency services free of charge, and varied between open heart operations and catheterization and between dialysis, endoscopy and childbirth, to name a few, and there is no country in the world that can do this for free for all these numbers and every year

Presenting the Kingdom's Successful Experience in Using Artificial Intelligence in Managing the Hajj and Umrah Seasons during the COVID-19 Pandemic
The Kingdom of Saudi Arabia annually receives large numbers of pilgrims, Umrah performers, and visitors, and the Kingdom seeks to harness all of its capabilities to facilitate the process of Hajj and Umrah and has made great effort to serve the pilgrims annually and to serve Umrah performers throughout the year, using the latest high-quality technologies. This made the Kingdom a distinguished model for the world to follow.
The Kingdom has risen to the highest level in serving the pilgrims by implementing many projects to develop and improve their journeys for the Hajj, Umrah, and other visits. Services begin before the arrival of pilgrims and Umrah performers and continue until all of their rituals are complete. Among the services provided to them prior to their arrival are visa procedures, providing information, making reservations, and preparing the pilgrims. Following this, all services, facilities, and hospitality are provided to them upon their arrival at the ports, as well as provisioning them with information and instructions, ensuring the availability and quality of transportation, the efficiency of the drivers, and providing the best services on the way to the two holy mosques, in addition to raising awareness and guidance and preparing the services provided in residences and the diversity of shopping and catering options, payment methods, intensification of volunteer work during the Hajj and Umrah seasons, paying attention to crowd management, providing services related to the Holy Mosques, and facilitating movement between Makkah Al-Mukarramah, Al-Madinah Al-Munawwarah and other cities of the Kingdom [15].

Use of Crowd Management Techniques
The Hajj is one of the best-known, largest, and most populous mass events in the world. To manage these crowds, it is necessary to study many fields, including psychology, civil engineering, biology, statistics, communications and information technology, and innovation to benefit from and invest in modern technology, in many areas, especially the areas of sensing, communications, and computing. Recently, stress has been laid on the importance of smartphones, thanks to their multiple applications, especially in regard to their sensors and regarding the spread of their invulnerability and the multiplicity of their services, as they contribute to facilitating communication anywhere in the world, including ease of contact and high computing power relative to their small size [16].
Organizing crowds often requires the performance of complex tasks; doing so during a crisis or pandemic requires commitment to many restrictions. Among the difficult restrictions necessary to impose during this period is convincing or forcing participants to practice social distancing and wear masks to protect themselves and preserve their health. The Hajj is one of the most important gatherings in the world, and pilgrims come from many countries, so the Kingdom of Saudi Arabia imposed a number of restrictions that must be adhered to in the performance of Hajj and Umrah rituals during the COVID-19 pandemic, including controlling and reducing the number of pilgrims and Umrah performers, getting vaccinated, and applying health precautions. Many smart applications were also provided to participants, which led to the success of the Hajj; consequently, no serious health problems ensued. The president of the World Health Organization praised the organization of the Hajj rituals in 2021 [17].
Smartphones provide many services, including a wide range of sensing apparatuses, such as cameras, microphones, ability to use the global positioning system, temperature and pressure measurement capability, artificial intelligence, and other aspects that are useful in the movement of crowds. These smart technologies are widely used in most parts of the world and are a common tool for most of the world's population. They paved the way for the realization of data sensing on a large scale, known as crowd sensing, in addition to analyzing crowd data to facilitate the management of crowd movement [17].
The Hajj in 2021 witnessed exceptional and distinguished preparation using advanced equipment, relying extensively on modern and cutting-edge technology to organize the Hajj and perform crowd management, including artificial intelligence techniques and fifthgeneration (5G) technologies, as advanced technical and digital solutions. The pilgrims were received with robots; moreover, internet service was activated in many sites, including the corridors of the two holy mosques. Pilgrims were required to use smart programs and applications, which facilitated their engagement with the Hajj. These applications achieved great success, as they contributed to crowd management and gatherings while providing a safe atmosphere for them despite the COVID-19 epidemic, in cooperation with government sectors (Tech World Magazine, https://www.tech-mag.net/, accessed on 1 August 2022).
Among the technologies used in the administration of the Hajj are radio frequency identification chips, which were provided in the form of a bracelet on the wrist. Likewise, the Turjuman application, which won first place in the first version of the Hajj Hackathon for 2019, was adopted. Directly through a scanner and without the need to use the internet, an electronic wallet application was used, which consists of a layer for the mobile and another for the electronic portal that helps pilgrims and enables them to exchange paper currency with a balance to allow them to make electronic purchases (Rwa Makkah). This is a social network that allows the exchange of photos with the family without distracting the pilgrims from performing the rituals. The Makkah Road initiative has also seen benefits in five countries, facilitating the procedures for arrival to the Hajj from their countries until the completion of their rituals and their departure without undergoing routine procedures at airports and within their movements during the Hajj and Umrah rituals [17].
The Smart Hajj Bracelet was a service provided by the Kingdom of Saudi Arabia to pilgrims in 2021, which involves the storage and transmission of data and forms part of the Internet of Things. It is based on the implementation of integrated stages for the development of business models and a number of systems, including the operational, technical systems of the project, which provide a distinctive and qualitative experience in the service of pilgrims of Masjid Al-haram, to whom 5000 bracelets were distributed. The bracelets provide an array of services, including providing all of the information related to the pilgrim and his/her health status, in addition to following up and monitoring health status data related to the measurement of blood oxygen and the pulse, along with services for requesting emergency medical or security assistance to help in the quick arrival to his location and providing assistance for him/her. The pilgrims also received awareness messages through the bracelet (Tech World Magazine, [18]. In addition to providing a number of other smart applications and programs (Figure 4) that serve pilgrims, Umrah performers, and visitors to the Holy Sites, the following was provided as well: The Unified National Platform, [19].
The Hajj and Umrah Navigator application is based on digital maps of the Holy Sites area and includes a set of spatial data, including information on the buildings, facilities, and camps of the Holy Sites and information related to roads and neighborhoods, the borders of the Holy Sites, and landmarks, in addition to public services and facilities. The application depends on the national address regarding the numbers of buildings, facilities, and camps of the Holy Sites, especially the cities of Makkah and Madinah. The Al-maqsad application does not require an internet connection to identify the user's location, and it helps the visitors of Makkah Al-Mukarramah determine their exact location within the corridors of Masjid Al-haram and find their way wherever they need to go. location and providing assistance for him/her. The pilgrims also received awareness messages through the bracelet (Tech World Magazine, [18]. In addition to providing a number of other smart applications and programs ( Figure  4) that serve pilgrims, Umrah performers, and visitors to the Holy Sites, the following was provided as well: The Unified National Platform, [19]. The Hajj and Umrah Navigator application is based on digital maps of the Holy Sites area and includes a set of spatial data, including information on the buildings, facilities, and camps of the Holy Sites and information related to roads and neighborhoods, the borders of the Holy Sites, and landmarks, in addition to public services and facilities. The application depends on the national address regarding the numbers of buildings, facilities, and camps of the Holy Sites, especially the cities of Makkah and Madinah.
The Al-maqsad application does not require an internet connection to identify the user's location, and it helps the visitors of Makkah Al-Mukarramah determine their exact location within the corridors of Masjid Al-haram and find their way wherever they need to go. The Manasikana application provides nearby important places, such as mosques, restaurants, and shopping centers, in addition to searching for the shortest path from your current location.
The Tarwiah application serves pilgrims in everything related to water services at the Holy Sites, such as providing a map of the Holy Sites that locates toilets, allowing them to report water problems, identifying Zamzam water distribution points, and giving much other information of interest to pilgrims. The application is provided in seven languages.
The Seha application aims to provide medical consultations from a group of certified doctors, explaining the situation in audio and video, in addition to the final evaluation of the doctor.
The Asafny application is used to open an emergency report, and it enables positions to be located accurately, in addition to supporting people with special needs and recording details of one's medical history.
The Almutawaf application includes many services, which make it a favorite application among pilgrims. The Guide Me service helps the user to locate where they are staying, while the Al-haram Guide shows maps of the Haram and includes all services and places in the Haram. The audio guide can also be used to listen to all of the rituals involved in the Hajj, in addition to the Aftouni service, which enables the user to communicate with the muftis (Muslim scholars), who can answer inquiries 24/7. This application includes everything related to the rituals of the Hajj, including information and common errors, in addition to supplications and prayer times. This application includes a special corner that includes all the phone numbers that the pilgrim may need.
The Tawakkalna application is the official application approved in the Kingdom of Saudi Arabia to limit the spread of the COVID-19 virus and was developed by the Saudi Data and AI Authority.
The Eatamarna application serves pilgrims by enabling those wishing to perform Umrah and visiting to request the issuance of permits to enter the two holy mosques to perform Umrah, visit, and say prayers, in proportion to the capacity approved by the concerned authorities to ensure the provision of a safe spiritual atmosphere and to enable sufficient health and organizational precautionary procedures and controls in integration with the Tawakkalna application, ensuring the integrity of the health status of the permit applicant.
The Mecca Cleanliness application contributes to the cleanliness of the purest spot by enabling citizens to report violations.
The Kollona Amn application turns the citizen and the resident into a security agent to contribute to accelerating rescue operations and limiting damage and loss; the citizen or resident can send a report, including uploading photos, video, or audio recording.
The Fazaah application is intended to request help and assistance from the civil defense and report any accidents, whether fire, detention, or rescue; the geographical location of the report sender can be determined, and the location of the accident other than the current location of the sender of the report can also be determined, in addition to the follow-up on the status of the reports and actions taken in this regard.
The Al-Haramain application is a platform for the application of the two holy mosques. This application aims to achieve the vision and strategy of the General Presidency of the Grand Mosque and the Prophet's Mosque, based on the Kingdom of Saudi Arabia's Vision 2030 in harnessing modern technology to serve the two holy mosques, pilgrims, Umrah performers, and visitors.
The Watani application enables citizens, residents, and visitors to transparently evaluate the services of public agencies. It also allows users to share their opinion regarding ways to improve and develop the services provided.
The Arafat Sermon application helps pilgrims listen and watch the sermon on Arafat Day, translated into a number of languages, such as English, French, Persian, Malay, and Urdu (Unified National Platform [19]. It is clear from this that crowd management has become a part of sustainability that can be applied in all circumstances, and with different types of crowds.

Services Provided by Smart Robots for Pilgrims
The Kingdom of Saudi Arabia has brought the latest innovations in the field of artificial intelligence and smart robots related to 5G technologies to bear to serve pilgrims and facilitate the performance of the Hajj rituals. Two types of robots have been developed; the first is equipped with a screen, camera, and a microphone that allow it to roam among pilgrims, talk to them, answer their inquiries, and provide guidance and advice, in addition to performing its role in enhancing communication between individuals during remote work and the physical distancing imposed by the COVID-19 pandemic. The second type (the security robot) follows the commitment to precautionary and preventive measures that pilgrims and workers in Masjid Al-haram must abide by and follow through the applied health systems, as it has the ability to measure body temperature and monitor the extent of commitment to wearing the face mask through its artificial intelligence techniques, as well as providing constant purification and sterilization. It can also be controlled and operated remotely via the control and monitoring platform (Tech World Magazine, [18] A robot was also provided to distribute Zamzam water, which contributed to the implementation of precautionary measures to protect pilgrims.

Participation of Saudi Women in Crowd Management at the Holy Sites
Saudi women participated in crowd management at the Holy Sites and had a distinguished presence in many organizational, humanitarian, and security fields through the sectors of the Ministry of Interior, such as road security, civil defense, passports, and public security, in addition to their role in the organization of inspection, control, field follow-up, translation, receiving communications, and many other tasks. Women also participated in the civil defense sector in road security, passports, and the security forces of the Masjid Al-haram to organize the movement of prayers (pilgrims, Umrah performers, and visitors to the Haram and the Prophet's Mosque), in addition to following up on the application of precautionary measures and on security in the women's section in the Haram, receiving communications in many languages and converting them (Okaz newspaper website [20].
The Voluntary Women's Committees also played an effective role in serving the pilgrims in the Holy Sites before the arrival of pilgrims through their departure. These committees operate as a single team and strive to service the needs of the female pilgrims and enable them to perform Hajj smoothly, raising their religious and health, behavioral, and scientific awareness, in addition to their knowledge of security, safety, and risk management. To ensure their success and integration, the committee conducts an annual evaluation of the services provided, by making reports for each service and each implemented event, supported by evidence, images, statistics, strengths, and opportunities for improvement, submitting a comprehensive report of all the activities and events that have been accomplished and the extent of success and achievement of the objectives [21].
The above facts indicate the exertions undertaken by the government of the Kingdom of Saudi Arabia, with all its institutions and authorities, to manage the crowds during the annual Hajj and within the Holy Sites, as well as raising and developing the level of services provided, through the use of many modern means and technologies and artificial intelligence. Moreover, the government doubled its efforts during the Hajj season and within the Holy Sites during the outbreak of the COVID-19 pandemic; the Hajj was carried out successfully in 2021 by taking all necessary health precautions to protect the pilgrims.
To review the experience of the Kingdom of Saudi Arabia in crowd management through artificial intelligence, a SWOT analysis is presented for the study area in Table 4.  Opportunities 1-Enhancing the use of everything new in the field of artificial intelligence and applying it in crowd management. 2-Providing information and data bases and facilitating researchers' access to them to conduct research that contributes to the development of crowd management in the Holy Sites. 3-Raising the level of training for human cadres of volunteers and official workers to use the latest technologies in the field of crowd management during the Hajj and Umrah seasons. 4-Developing buses and means of transport and equipping them with the latest technologies to facilitate the process of transporting pilgrims and Umrah performers between the Holy Sites. 5-Developing the road network, and using the latest technologies to facilitate the process of organizing traffic for the transit of pilgrims and Umrah performers and their movement between the Holy Sites. 6-Using information systems to contribute to advance planning to support decision-making and raise the level of effective efficiency of the system and the nature of performance. 7-The possibility of generalizing the crowd management method to all events held in the Kingdom 8-Exporting the cumulative experience in sustainable crowd management abroad. to 30 million Umrah performers by 2030. 3-The spread of some infectious diseases in the countries from which pilgrims and Umrah performers come requires great efforts to protect pilgrims and Umrah performers and prevent the arrival of the injured persons at the Holy Sites. 4-Inclination to the use of artificial intelligence techniques in accordance with the strategic plan that takes into account the limited numbers of people allowed to perform Hajj during the exceptional conditions, in order to prevent the spread of the COVID-19 pandemic among large crowds in which it is difficult to achieve spatial distance given their large numbers. 5-Organizing crowds often requires complex tasks, and organizing them during a pandemic such as COVID-19 requires adherence to many restrictions. Among the difficulties during this period is convincing those in the crowd to apply social distancing and to wear masks to protect themselves.
This analysis identifies the most prominent strengths related to crowd management and work on its sustainability and development. In return, we presented the opportunities, weaknesses and challenges that could occur.

Results and Discussion
This study discussed the Kingdom's crowd management experience using an artificial intelligence Hajj model through two pillars. The first clarifies the Kingdom's prominence in crowd management, which makes it a global leader in this field. Through this pillar, the Kingdom's status at the international level and the excellence of its crowd management process during the Umrah pilgrimage seasons were discussed and reviewed. Such a distinguished crowd management performance is attributed not only to outstanding management capabilities but also to an ongoing organizational process throughout the year that intensifies during religious seasons, such as Ramadan and Hajj. The challenge faced by the Kingdom, which has made its experience in crowd management distinct, is its narrow and limited geographical location (spatial space) alongside the crowd's diverse languages, nationalities, qualitative and age characteristics, and geographical environments. These factors have made the Kingdom a leading country through its experience over the past years, from simple planning to implementing well-coordinated firm plans and managing the increasing number of crowds with full commitment to provide a healthy and safe environment for their safety. This has been developed throughout the period of the COVID-19 pandemic, when the plan shifted to the expansion of technology use and provision of an environment safeguarding pilgrims' safety and health and helping them perform their religious rites smoothly and easily.
This study provided examples of medical services for pilgrims. Based on the discussion, we conclude that the Kingdom is progressing in the development and improvement of the quality of services that it provides to crowds. In the near future, the use of modern technology can be expanded to achieve the highest health, security, and administrative standards to successfully accommodate and disperse these crowds. The Kingdom can also review its experience at the global level as a successful model in this area, especially with regard to training employees in related sectors and exporting this experience to the world on the basis of successful Hajj seasons.
Regarding the second pillar, the Kingdom has succeeded in using artificial intelligence to manage the Hajj and Umrah seasons during the COVID-19 pandemic. We deduced that besides the extensive plans developed in partnership with all relevant bodies, the situation required the use of geographic information system and artificial intelligence to facilitate pilgrims' mobility and performance of public pilgrimage rituals. The 2021 Hajj season required extraordinary preparations and equipment, such as 5G AI technologies as technology solutions. For the first time, pilgrims were received with robots, internet service was provided in two holy mosques, and smart programs and applications were made available to pilgrims.
As the Kingdom, through Vision 2030, aims to host more nonKingdom conferences for an audience of 30 million by 2030, the situation demands expansion of technical contribution to facilitate pilgrims' mission through artificial expansion. With a long cumulative experience in crowd management, the Kingdom used modern technologies that have contributed, through good planning, to the success of Hajj in conditions that were difficult and dangerous in terms of health. Additionally, despite cultural and other disparities among the pilgrims, they valued the convenience and comfort of using technology to perform pilgrimage.

•
The Kingdom of Saudi Arabia has become a leader in crowd management, a reference and a role model for all countries.

•
The Kingdom was able to manage the crowds efficiently and competently during the COVID-19 pandemic and took all precautionary measures to protect pilgrims and Umrah performers, and there were no injuries among them, which confirms what was indicated by Basahel et al. [11].

•
The Kingdom of Saudi Arabia has long cumulative experience in crowd management.

•
The Kingdom of Saudi Arabia is distinguished for its crowd management, as evidenced by the success of all Hajj seasons.

•
The Kingdom used technology to facilitate the task of pilgrims through the expansion of artificial intelligence and digital technologies; this is consistent with what was stated in the studies of [8,9,22]. • Despite the great effort expended upon crowd organization and management, some negative outcomes were seen for some pilgrims or Umrah performers during the Hajj and Umrah seasons, and occurrence of crowding and stampede was seen in some places, which is consistent with what was indicated by Sonbol [22] in their studies. • Saudi women participated in crowd management in the Holy Sites and had a distinguished presence in many organizational, humanitarian and security fields.

SWOT analysis:
It is a method often used in strategic planning, which is an abbreviation for strengths, weaknesses, opportunities and threats, this analysis is powerful to take advantage of strengths, improve weaknesses, reduce threats, and make the most of opportunities [23]/Visual Paradigm. COVID-19: It is an infectious disease caused by the SARS-CoV-2 virus [24,25] Artificial Intelligence: It is the science of engineering the manufacture of intelligent machines, a branch of computer science that deals with the study and design of intelligent customers. Basis of priorities, addressing complexity and ambiguity [26] KPI's: key performance indicators.