Dual-mode adaptive entry code verification method for northern climate and intergenerational sharing
Patent Information
- Application Number
- CN202611167844.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-27
AI Technical Summary
动态二维码策略虽然防止了票务盗用,但完全排除了截图分享的可能性,导致不使用或不会使用智能手机的老年人、儿童等群体无法独立入园,只能依赖陪同人员代为操作,用户体验感较差
[0009]本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的面向北方气候与代际分享的双模式自适应入园码验证方法,提高了用户体验感。具体来说,造成用户体验感较差的原因在于:动态二维码策略虽然防止了票务盗用,但完全排除了截图分享的可能性,导致不使用或不会使用智能手机的老年人、儿童等群体无法独立入园,只能依赖陪同人员代为操作,用户体验感较差。当采用所有用户均使用静态二维码截图并由闸机扫码人脸验证时,在北方冬季严寒、雾霾及沙尘等恶劣气候条件下,游客脸部常常被衣物遮挡(如,佩戴佩戴雷锋帽、雪镜、护脸、防霾口罩等保暖及防护装备等),闸机终端的人脸图像采集装置常常无法采集完整人脸图像,导致验证失败无法入园且摘除与重新穿戴衣物使单次通行时间增长,用户体验感较差。基于此,本公开的一些实施例的面向北方气候与代际分享的双模式自适应入园码验证方法,首先,第一用户终端向上述服务器发送的购票请求信息,其中,上述购票请求信息包括使用者类型信息和景区预约信息。然后,上述服务器执行以下步骤:基于上述使用者类型信息和上述景区预约信息,生成入园验证方式信息,其中,上述入园验证方式信息包括本人持机渐进式入园标识或离线面容锚定入园标识。由此,可以根据使用者类型(如,是否为不擅长使用智能手机的老年人或儿童)和景区预约信息(如、天气、时段等条件),自动匹配最适合的验证模式,从源头区分不同用户群体的需求,生成了对应的验证方式标识。接着,响应于确定上述入园验证方式信息包括本人持机渐进式入园标识,从上述第一用户终端获取终端设备信息,以及基于终端设备信息和上述景区预约信息,生成动态验证码,并控制上述第一用户终端执行地理围栏渐进式定位,以在进入地理围栏后激活动态验证码并进行周期性刷新。由此,对于能够自主操作手机的用户,采用动态二维码结合地理围栏技术,确保验证码仅在游客到达景区指定范围内才生效且持续刷新,既防止了截图分享导致的票务盗用,又保障了普通用户的快速通行体验,可以使得本人持机用户在佩戴保暖及防护装备导致面部被大面积遮挡的情况下无需摘除装备即可完成验证,避免了因闸机人脸图像采集装置无法采集完整人脸图像而导致的验证失败,同时省去了摘除与重新穿戴装备的时间消耗。之后,响应于确定上述入园验证方式信息包括离线面容锚定入园标识,通过上述第一用户终端采集第二用户的人脸图像,以生成静态验证码,以及将上述静态验证码发送至上述第一用户终端,以供上述第一用户终端将静态验证码转发分享至第二用户终端。由此,针对特殊群体,采用离线面容锚定方式,预先采集其面部特征并生成静态二维码,该二维码可由陪同人员截图或转发分享,无需该群体本人持有智能手机或进行任何复杂操作,从而解决了老年人、儿童等无法独立使用动态码的难题,实现了代际间的便捷分享,显著提升了此类用户的入园便利性。最后,上述闸机终端从上述第一用户终端或上述第二用户终端采集待验证码,以及基于上述待验证码,执行双模式自适应入园码验证,以控制闸门驱动机构的电机转动以开启闸门。也因为采用了基于使用者类型和景区预约信息自适应选择动态渐进式验证或离线面容锚定验证的双模式策略,既满足了普通用户的安全快速通行需求,又为特殊群体提供了截图分享的可行途径,使得不同用户群体均能以最适合自身条件的方式完成入园验证,提高了用户体验感。
Smart Images

Figure CN122990840A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of computer technology, and more specifically to a dual-mode adaptive admission code verification method for northern climate and intergenerational sharing. Background Technology
[0002] Statistics show that my country has over 280 million people aged 60 and above, of whom approximately 250 million are elderly and do not use or are unable to use smartphones. Meanwhile, provinces in northern my country with average winter temperatures below -10°C account for about 60% of the country's land area. During the peak winter tourism season in northern China, elderly people traveling with their grandchildren to ice and snow attractions (such as Harbin Ice and Snow World and Chongli Ski Resort) face significant challenges in verifying their identity upon entry. Many elderly people are unfamiliar with smartphone operation. Therefore, there is a high demand for convenient and easy-to-use entry verification methods for both the elderly and children. Currently, the generation and verification of entry credentials mainly rely on the following methods: all users generate dynamic QR codes via a mobile app and have them scanned by the gate for verification, or all users use static QR code screenshots and have them scanned by the gate for facial recognition verification.
[0003] When using the above method, the following technical problems often arise: While dynamic QR code strategies prevent ticket theft, they completely eliminate the possibility of screenshot sharing. This prevents elderly people and children who do not use or are unable to use smartphones from entering the park independently, forcing them to rely on accompanying persons, resulting in a poor user experience. When all users use static QR code screenshots for facial verification at the gates, in harsh weather conditions such as the cold winters, smog, and sandstorms in northern China, visitors' faces are often obscured by clothing (e.g., wearing hats, goggles, face shields, and anti-smog masks). The facial image capture devices at the gate terminals often fail to capture complete facial images, leading to verification failures and entry restrictions. The need to remove and re-putt on clothing further increases the time required for each entry, resulting in a poor user experience.
[0004] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not form prior art known to those skilled in the art. Summary of the Invention
[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] Some embodiments of this disclosure propose a dual-mode adaptive park entry code verification method and ticketing system for northern climate and intergenerational sharing, in order to solve one or more of the technical problems mentioned in the background section above.
[0007] In a first aspect, some embodiments of this disclosure provide a dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing, applied to a ticketing system including a first user terminal, a second user terminal, a gate terminal, and a server. The method includes: the first user terminal sending a ticket purchase request to the server, wherein the ticket purchase request includes user type information and scenic area reservation information; the server performing the following steps: generating park entry verification method information based on the user type information and the scenic area reservation information, wherein the park entry verification method information includes a personal device-based progressive entry identifier or an offline facial recognition-anchored entry identifier; and in response to determining that the park entry verification method information includes a personal device-based progressive entry identifier, obtaining terminal device information from the first user terminal. Based on the terminal device information and the aforementioned scenic area reservation information, a dynamic verification code is generated, and the first user terminal is controlled to perform geofence progressive positioning so that the dynamic verification code is activated and periodically refreshed after entering the geofence; in response to determining that the aforementioned park entry verification method information includes offline facial anchoring entry identifier, the face image of the second user is collected through the first user terminal to generate a static verification code, and the static verification code is sent to the first user terminal so that the first user terminal can forward and share the static verification code to the second user terminal; the gate terminal collects the code to be verified from the first user terminal or the second user terminal, and based on the code to be verified, performs dual-mode adaptive entry code verification to control the motor of the gate drive mechanism to rotate to open the gate.
[0008] Secondly, some embodiments of this disclosure provide a ticketing system, including a first user terminal, a second user terminal, a gate terminal, and a server: the first user terminal is configured to send ticket purchase request information to the server, wherein the ticket purchase request information includes user type information and scenic spot reservation information; the server is configured to perform the following steps: generating park entry verification method information based on the user type information and the scenic spot reservation information, wherein the park entry verification method information includes a personal device-based progressive entry identifier or an offline facial recognition entry identifier; in response to determining that the park entry verification method information includes a personal device-based progressive entry identifier, obtaining terminal device information from the first user terminal, and based on the terminal device information and the scenic spot reservation information... The system retrieves reservation information for the area, generates a dynamic verification code, and controls the first user terminal to perform geofence progressive positioning to activate the dynamic verification code and periodically refresh it after entering the geofence. In response to determining that the park entry verification method information includes offline facial anchoring entry identifiers, the system collects the face image of the second user through the first user terminal to generate a static verification code and sends the static verification code to the first user terminal for forwarding and sharing to the second user terminal. The gate terminal is configured to collect the verification code from either the first or second user terminal and, based on the verification code, perform dual-mode adaptive entry code verification to control the gate drive mechanism's motor to rotate and open the gate.
[0009] The above-described embodiments of this disclosure have the following beneficial effects: the dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing, as described in some embodiments of this disclosure, improves the user experience. Specifically, the poor user experience is due to the fact that while the dynamic QR code strategy prevents ticket theft, it completely eliminates the possibility of screenshot sharing, making it impossible for elderly people, children, and other groups who do not use or do not know how to use smartphones to enter the park independently. They can only rely on their companions to operate the code, resulting in a poor user experience. When all users use static QR code screenshots and the gate scans the code for facial verification, in the harsh weather conditions of northern winters, such as severe cold, smog, and sandstorms, tourists' faces are often covered by clothing (e.g., wearing Lei Feng hats, snow goggles, face shields, anti-smog masks, etc.). The facial image acquisition device of the gate terminal often cannot capture a complete facial image, resulting in verification failure and inability to enter the park. Removing and re-putting clothing increases the time for each passage, resulting in a poor user experience. Based on this, some embodiments of the present disclosure provide a dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing. First, a first user terminal sends a ticket purchase request to the server, which includes user type information and scenic area reservation information. Then, the server performs the following steps: based on the user type information and the scenic area reservation information, it generates park entry verification method information, which includes either a self-held device progressive entry identifier or an offline facial recognition entry identifier. Thus, based on the user type (e.g., whether it is an elderly person or a child who is not proficient in using smartphones) and the scenic area reservation information (e.g., weather, time of day, etc.), the most suitable verification mode can be automatically matched, distinguishing the needs of different user groups from the source and generating corresponding verification method identifiers. Next, in response to determining that the park entry verification method information includes a self-held device progressive entry identifier, the server obtains terminal device information from the first user terminal, and based on the terminal device information and the scenic area reservation information, generates a dynamic verification code, and controls the first user terminal to perform geofence progressive positioning to activate the dynamic verification code and periodically refresh it after entering the geofence. Therefore, for users who can operate their mobile phones independently, the use of dynamic QR codes combined with geofencing technology ensures that the verification code is only effective and continuously refreshed when the tourist is within the designated area of the scenic spot. This not only prevents ticket theft caused by screenshot sharing, but also ensures a fast passage experience for ordinary users. It allows users with their own mobile phones to complete the verification without removing their equipment when wearing warm and protective gear that covers a large area of their face. This avoids verification failures caused by the gate's facial image acquisition device being unable to capture a complete facial image, and also saves the time spent removing and re-wearing equipment.Subsequently, in response to the determination that the aforementioned park entry verification method information includes an offline facial recognition entry identifier, the facial image of the second user is collected through the first user terminal to generate a static verification code, and the static verification code is sent to the first user terminal for forwarding and sharing to the second user terminal. Thus, for special groups, the offline facial recognition method is used to pre-collect their facial features and generate a static QR code. This QR code can be screenshotted or forwarded and shared by accompanying persons without requiring the individual to possess a smartphone or perform any complex operations. This solves the problem of the elderly and children being unable to use dynamic codes independently, enabling convenient intergenerational sharing and significantly improving the convenience of park entry for such users. Finally, the gate terminal collects the verification code from either the first or second user terminal and, based on the verification code, performs dual-mode adaptive entry code verification to control the motor of the gate drive mechanism to rotate and open the gate. Because it adopts a dual-mode strategy that adaptively selects between dynamic progressive verification and offline facial recognition verification based on user type and scenic spot reservation information, it not only meets the safe and fast passage needs of ordinary users, but also provides a feasible way for special groups to share screenshots. This allows different user groups to complete the park entry verification in the way that best suits their own conditions, thus improving the user experience. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0011] Figure 1 This is a flowchart of some embodiments of the dual-mode adaptive admission code verification method for northern climate and intergenerational sharing according to the present disclosure; Figure 2 This is based on the architecture diagram of the ticketing system disclosed herein; Figure 3 This is an internal test application scenario diagram according to an embodiment of the present disclosure; Figure 4 This is an internal test effect analysis diagram based on an embodiment of the present disclosure. Detailed Implementation
[0012] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0013] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0014] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0015] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0016] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0017] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] Figure 1 A flowchart 100 is shown, illustrating some embodiments of the dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing according to this disclosure. The method is applied to a ticketing system comprising a first user terminal 201, a second user terminal 202, a gate terminal 204, and a server 203. The first user terminal 201 is connected to the server 203 via wireless network communication (including but not limited to 4G / 5G mobile communication networks and Wi-Fi networks). The gate terminal 204 is connected to the server 203 via wired or wireless network communication. The first user terminal 201 and the second user terminal 202 communicate via a third-party communication method (e.g., the third-party communication method may include, but is not limited to, instant messaging software, SMS, email, or Bluetooth file transfer). The dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing includes the following steps: Step 101: The first user terminal sends a ticket purchase request to the server.
[0019] In some embodiments, the first user terminal sends a ticket purchase request to the server, wherein the ticket purchase request information includes user type information and scenic spot reservation information. The user type information includes a personal identifier and a non-personal identifier, and the scenic spot reservation information includes the visit date and destination information. The first user terminal refers to a portable electronic device operated by the first user (i.e., the user themselves), including but not limited to smartphones and tablets. The personal identifier is an identifier indicating that the user making the ticket purchase request is the first user. The non-personal identifier is an identifier indicating that the user making the ticket purchase request is not the first user, i.e., the first user is purchasing the ticket on behalf of a second user. The second user refers to a third-party user who purchases the admission ticket on behalf of the first user, including but not limited to elderly people and children. The scenic spot reservation information may be the destination and visit time corresponding to the ticket purchase request. The visit date refers to the time when the first user or the second user plans to visit the destination. The destination information may be a scenic spot location or a scenic spot identifier.
[0020] Optionally, the above server is further configured as follows: The first step involves responding to the dual-mode adaptive entry code verification failure information received from the gate terminal. Based on this failure information, the locally stored failure record information set is updated to obtain an updated failure count. The dual-mode adaptive entry code verification failure information includes a one-time random number. This one-time random number is a random string generated by the server's secure random number generator and can only be used once, serving as the unique credential for either the static or dynamic verification code. The dual-mode adaptive entry code verification failure information can be information generated by the gate terminal containing a one-time random number when verification fails. Each failure record in the failure record information set can record the number of entry code verification failures corresponding to the one-time random number. The failure record information can include the one-time random number and the number of failures. In practice, the one-time random number can be parsed from the dual-mode adaptive entry code verification failure information. The server uses the one-time random number as an index to query the failure record information set for a record corresponding to it. If a record exists, the failure count field in that record is incremented by 1 to obtain the updated failure count. If it does not exist, create a new record, store the above one-time random number in the one-time random number field, and set the value of the failure count field to 1.
[0021] The second step involves caching the one-time random number to at least one downstream gate terminal in response to the updated failure count being greater than or equal to a preset threshold. This allows the gate terminal to pre-check the one-time random number during subsequent scanning operations, thus rejecting the user corresponding to that one-time random number. The preset threshold is a pre-defined threshold for the number of failures that triggers circuit breaker protection (e.g., 3 times). The downstream gate terminal refers to any gate terminal that maintains data synchronization with the server, excluding those that report the dual-mode adaptive entry code verification failure information. In practice, before formally executing the verification process, the downstream gate terminal checks whether the one-time random number contained in the current verification code exists in its local blacklist cache as a pre-verification operation. The local blacklist cache is a data set stored in the storage unit of the downstream gate terminal, used to temporarily store one-time random numbers that have been blacklisted. The blacklist refers to a list containing all one-time random numbers that have been determined to be abnormal and are prohibited from passage.
[0022] Step 102, the above server performs the following steps: Step 1021: Generate park entry verification method information based on user type information and scenic area reservation information.
[0023] In some embodiments, the server can generate park entry verification method information based on the user type information and the scenic area reservation information. The park entry verification method information includes a personal device-based progressive entry identifier or an offline facial recognition entry identifier. The user type information includes a personal identifier and a non-personal identifier, and the scenic area reservation information includes the visit date and destination information.
[0024] In some optional implementations of certain embodiments, the park entry verification method information can be generated based on the aforementioned user type information and the aforementioned scenic area reservation information through the following steps: The first step, in response to determining that the aforementioned user type information includes a non-personal identifier, is to determine the preset offline facial recognition entry identifier as the entry verification method. This preset offline facial recognition entry identifier is pre-stored in the server and is used to indicate entry via a static entry code verification method. For example, the server parses the user type information as "non-personal identifier" from the ticket purchase request information, and the destination in the scenic area reservation information is "Ski Resort A," with the visit date being "July 15, 2026." Because the user type information includes a "non-personal identifier," the server directly determines the preset offline facial recognition entry identifier as the entry verification method.
[0025] The second step involves, in response to the determination that the aforementioned user type information includes a personal identifier, sending a weather query request containing the travel date and destination information to a preset weather information system. This request retrieves weather condition information for the destination as represented by the aforementioned destination information on the travel date. The weather condition information includes weather type information, temperature value, and air quality index. The preset weather information system refers to a third-party meteorological data service system that has established a data communication connection with the aforementioned server and is used to provide forecast weather data. The weather query request is a request sent by the server to the preset weather information system to obtain weather data for a specified location on a specified date. The weather condition information can be the weather status returned by the preset weather information system indicating the destination as represented by the aforementioned destination information on the aforementioned travel date. The weather type information can refer to a category identifier of a weather phenomenon, including but not limited to heavy rain, torrential rain, light snow, moderate snow, heavy snow, blizzard, fog, haze, and sandstorm. The temperature value can be the air temperature value of the destination as represented by the travel destination information on the aforementioned travel date. The air quality index mentioned above is a dimensionless index used to quantitatively describe air quality. The higher the value, the more severe the air pollution. The air quality index mentioned above includes, but is not limited to, the AQI (Air Quality Index).
[0026] The third step involves performing context-aware adaptive entry allocation processing based on the aforementioned weather and destination information to obtain entry verification method information.
[0027] In some optional implementations of certain embodiments, the following steps can be used to perform context-aware adaptive park entry allocation processing based on the aforementioned weather condition information and the aforementioned tourist destination information to obtain park entry verification method information: The first step, in response to the determination that the weather type information included in the aforementioned weather conditions meets the face-covering risk weather triggering condition, is to set the preset "personalized device-based progressive entry" identifier as the entry verification method. The face-covering risk weather triggering condition is a pre-set condition used to determine whether the current weather type will lead to visitors wearing face coverings. For example, the face-covering risk weather triggering condition can be that the category identifier represented by the weather type information belongs to a preset risk weather type identifier set, which includes eight weather type identifiers: heavy rain, torrential rain, heavy snow, blizzard, fog, haze, sandstorm, and intense sunshine (i.e., hot and sunny weather). When the weather type belongs to any of these eight types, it is determined that the face-covering risk weather triggering condition is met. The aforementioned risk weather type identifier can be a weather type identifier that indicates a possibility that visitors may wear face coverings (e.g., torrential rain, heavy rain, intense sunshine, fog / haze, sandstorm, etc.).
[0028] The second step involves determining that the temperature value included in the aforementioned weather condition information is below the lower temperature threshold or above the preset upper temperature threshold, and then confirming the preset "personalized device-based progressive entry" identifier as the entry verification method. The lower temperature threshold is a pre-set low-temperature critical value (e.g., 0°C). When the temperature is below this value, visitors may wear warm hats, masks, face shields, or other protective gear to ward off the cold, resulting in their faces being obscured. The preset upper temperature threshold is a pre-set high-temperature critical value (e.g., 30°C). When the temperature is above this value, visitors may wear sun hats, sun-protective face masks, or other sun-protective gear to prevent sunburn, resulting in their faces being obscured.
[0029] The third step involves determining that the air quality index (AQI) in the aforementioned weather information is greater than a preset air quality threshold, and then setting the preset "personalized, progressive entry with device" identifier as the entry verification method. The preset air quality threshold is a pre-defined critical value for the air quality index (e.g., an AQI greater than 150, corresponding to moderate or higher pollution). When the air quality index exceeds this threshold, the air pollution level is relatively high, and visitors may need to wear anti-smog masks.
[0030] The fourth step involves querying the scenic area type identifier corresponding to the aforementioned destination information. In response to determining that the scenic area type identifier is one of the following: ski resort, desert, or plateau type, the preset personal device-based progressive entry identifier is set as the entry verification method. Here, the scenic area type identifier is an identifier used to characterize the category to which the target scenic area belongs.
[0031] The fifth step involves determining that the weather conditions, including weather type information, do not meet the triggering conditions for face occlusion risk, temperature value greater than or equal to the lower limit temperature threshold and less than or equal to the preset upper limit temperature threshold, and air quality index less than or equal to the preset air quality threshold. Furthermore, the scenic area type identifier is not one of the ski resort type, desert type, or plateau type identifiers. In this case, the preset offline facial anchor entry identifier is determined as the entry verification method information. Therefore, in unobstructed scenarios with clear weather, suitable temperature, good air quality, and no special scenic area type, even if the user is the same person, the system still assigns an offline facial anchor entry identifier, allowing the same user to enjoy the convenience of screenshot sharing. By binding and encrypting the user's facial feature information with a one-time random number, it ensures that the screenshot is valid for only one use by the user, eliminating the security vulnerability of unlimited screenshot reuse. Simultaneously, it avoids unnecessary resource consumption in unobstructed scenarios using dynamic verification codes, reduces server concurrency pressure, and achieves accurate matching between the verification method and external environmental characteristics. This allows for optimal entry verification in different scenarios, significantly improving the convenience, security, and system stability of entry verification. At the same time, it saves power on user terminals, extends the battery life of mobile phones, and ensures that tourists can use other functions such as taking photos and navigation in scenic spots without being affected, further improving the user experience.
[0032] Step 1022: In response to determining the park entry verification method information, including the user's self-held progressive entry identifier, the system obtains terminal device information from the first user terminal, and generates a dynamic verification code based on the terminal device information and the scenic area reservation information. It then controls the first user terminal to perform geofence progressive positioning, activating the dynamic verification code and periodically refreshing it after entering the geofence. For example, the first preset frequency is set to 10 minutes / time, the second preset frequency is set to 30 seconds / time, the proximity geofence threshold is set to 3 kilometers, and the geofence entry threshold is set to 100 meters. When the distance between the first user terminal's location and the gate anchor point is greater than 3 kilometers, the positioning service wakes up every 10 minutes; when the distance is less than or equal to 3 kilometers but greater than 100 meters, it switches to waking up every 30 seconds; when the distance is less than or equal to 100 meters, the dynamic verification code is activated and refreshed every second. Specifically, the periodic refresh refers to the process where the dynamic verification code (dynamic QR code) is automatically regenerated and updated at fixed time intervals (e.g., every 1 second) after activation.
[0033] In some embodiments, the server may, in response to determining that the park entry verification method information includes a personal device-based progressive entry identifier, obtain terminal device information from the first user terminal, and generate a dynamic verification code based on the terminal device information and the scenic area reservation information. The server may then control the first user terminal to perform geofencing progressive positioning, activating the dynamic verification code and periodically refreshing it after entering the geofence. The park entry verification method information may indicate which park entry verification method the first user terminal or the second user terminal uses to enter the target scenic area. The terminal device information is information used to uniquely identify the hardware identity of the first user terminal (e.g., information including IMEI and MAC address).
[0034] In addressing the technical problems mentioned above by employing the aforementioned technical solutions, the following technical issues arise regarding the application scenario: in northern winter tourist attractions (such as ski resorts, ice and snow worlds, and open-air museums), the identity verification of visitors with smartphones who are proficient in operating the app often presents the following technical problems: In existing dynamic verification code schemes, the user terminal needs to keep the positioning module continuously working to determine whether they have arrived at the attraction. The continuous high power consumption of the GPS positioning module causes the phone's battery to be easily depleted within a short period of time (e.g., 2-3 hours), which cannot meet the battery life requirements of tourists for a full day's visit (usually 6-8 hours). While simply reducing the positioning frequency can save power, it can lead to the inability to detect the user's arrival at the attraction in a timely manner, resulting in the dynamic verification code not being activated when the user arrives at the gate, thus preventing entry and leading to a poor user experience. The following requirements are necessary for this application scenario: In northern winter outdoor scenic areas, user terminals need to consume almost no power when far from the scenic area to ensure all-day battery life and meet tourists' needs for photography, navigation, communication, and other functions within the scenic area; simultaneously, it needs to ensure that the dynamic verification code is activated and refreshable in real time when the user arrives at the gate, eliminating waiting time during the entry verification process; the power consumption control of the positioning module and the verification code refresh behavior need to be linked based on the distance between the user and the scenic area to avoid invalid positioning and refresh overhead when far from the scenic area, ensuring precise matching of device energy consumption to the usage scenario, achieving the control effect of no power consumption when far from the scenic area and activation upon arrival at the gate.
[0035] In some optional implementations of certain embodiments, a dynamic verification code can be generated based on the terminal device information and the aforementioned scenic spot reservation information through the following steps, and the first user terminal can be controlled to perform geofence progressive positioning so that the dynamic verification code is activated and periodically refreshed after entering the geofence: The first step is to obtain the gate anchor point location information corresponding to the above-mentioned tourist destination information. The gate anchor point location information is the geographical coordinates of the physical installation location of the gate terminal of the target scenic spot (if there is at least one gate terminal, the gate anchor point location information can be the center point coordinates of at least one gate terminal).
[0036] The second step involves encrypting the terminal device information and the scenic area reservation information at a preset time point, including the visit date, to obtain encrypted ciphertext. The preset time point can be the time of the visit date (e.g., early morning). In practice, the server can use the visit destination information as an index to query a preset scenic area database to obtain the gate anchor point location information corresponding to the visit destination information. The scenic area database can be a database recording the correspondence between visit destination information and gate anchor point location information. The encrypted ciphertext is ciphertext data obtained by processing the terminal device information and the scenic area reservation information using a symmetric encryption algorithm. The symmetric encryption algorithm includes, but is not limited to, the AES-256 encryption algorithm. In practice, the server can combine the terminal device information and the scenic area reservation information into a plaintext string to be encrypted according to a preset data format. Then, a preset encryption key is obtained. This encryption key is a fixed-length key pre-stored in the secure storage area of the server. Next, the server uses the encryption key to encrypt the plaintext string using the AES-256 encryption algorithm to obtain encrypted ciphertext. The encryption key is generated uniformly by the server and pre-deployed to the trusted storage area of all gate terminals through a secure channel (such as physical copy or encrypted transmission). The server and each gate terminal use the same symmetric key for encryption and decryption.
[0037] The third step is to obtain the current timestamp and generate a one-time random number. In practice, the server described above can obtain the current system time as the current timestamp. The server can generate a random string that can only be used once using a secure random number generator.
[0038] The fourth step involves identifying the encrypted ciphertext, the current timestamp, the one-time random number, and the preset dynamic verification code identifier as dynamic verification code data, and storing the dynamic verification code data in a preset database. The preset dynamic verification code identifier is a pre-agreed identifier used to indicate that the current code type is a dynamic verification code (e.g., "DYNAMIC" or "0").
[0039] The fifth step involves sending and storing the dynamic verification code data in the local memory of the first user terminal, so that the first user terminal can generate and display a dynamic verification code based on the dynamic verification code data. The dynamic verification code is in an inactive state. The dynamic verification code data includes encrypted ciphertext, the current timestamp, a one-time random number, and a preset dynamic verification code identifier. The local memory refers to a non-volatile storage medium built into the first user terminal, including but not limited to flash memory and embedded multimedia storage cards. The inactive state means that although the dynamic verification code has been stored in the local memory of the first user terminal, it has not yet been activated by the first user terminal and cannot be recognized and verified by the gate terminal. In practice, the first user terminal generates a QR code image according to a QR code encoding standard (such as QR code standard ISO / IEC 18004) based on the encrypted ciphertext, the current timestamp, the one-time random number, and the preset dynamic verification code identifier in the dynamic verification code data, and displays the QR code image on the display screen of the first user terminal. At this time, the dynamic verification code is in the aforementioned inactive state. Its display form can be an inactive watermark superimposed on the QR code image or a gray display, to indicate to the user that the dynamic verification code is currently unavailable.
[0040] Step 6: The location service of the first user terminal is woken up using a first preset frequency to obtain the location information of the first user terminal. The first preset frequency is a pre-set minimum location wake-up frequency (e.g., once every 10 minutes). The wake-up frequency refers to the frequency at which the location service of the first user terminal is woken up and performs a location operation. The location service is a service interface provided by the operating system of the first user terminal for obtaining the device's geographical location. The location information is the current geographical location obtained by the first user terminal through the location service. In practice, the server may send a location activation command to the first user terminal, carrying the first preset frequency parameter. The first user terminal responds to the location activation command by periodically waking up the location service according to the first preset frequency. Each time it is woken up, the first user terminal calls the application programming interface of the location service to obtain the current location information.
[0041] Step 7: Each time location information is obtained, perform the following steps: The first sub-step involves, in response to determining that the positional difference between the aforementioned location information and the aforementioned gate anchor point location information is less than a preset proximity geofence threshold and greater than a preset entry geofence threshold, switching the wake-up frequency of the location service of the first user terminal from the aforementioned first preset frequency to a second preset frequency, wherein the aforementioned second preset frequency is higher than the aforementioned first preset frequency. The aforementioned positional difference is the spatial distance between the aforementioned location information and the aforementioned gate anchor point location information; for example, the positional difference can be the Euclidean distance between the geographic coordinates represented by the location information and the geographic coordinates represented by the aforementioned gate anchor point location information. The aforementioned proximity geofence threshold is a preset distance value used to determine that the aforementioned first user terminal has approached the aforementioned target scenic area. The aforementioned entry geofence threshold is a preset distance value used to determine that the aforementioned first user terminal has reached the gate area of the aforementioned target scenic area.
[0042] The second sub-step involves, in response to determining that the positional difference between the aforementioned location information and the aforementioned gate anchor point location information is less than or equal to the aforementioned preset geofence entry threshold, sending activation refresh control information to the aforementioned first user terminal to control the aforementioned first user terminal to execute the following activation refresh steps: Sub-step one involves switching the dynamic verification code from an inactive state to an active state. The active state refers to the dynamic verification code being activated and capable of being recognized and verified by the gate terminal. In practice, the first user terminal can switch the status flag of the dynamic verification code from an inactive state to an active state. The status flag is a Boolean value or enumerated value stored in the local memory of the first user terminal, used to indicate the current state of the dynamic verification code. The switching refers to modifying the status flag from a value representing the inactive state (such as 0 or "INACTIVE") to a value representing the active state (such as 1 or "ACTIVE").
[0043] Sub-step two involves starting a local timer and generating a refresh trigger signal at preset time intervals using this local timer. The local timer is a software module provided by the first user terminal's operating system for periodically executing tasks, including but not limited to Handler / Timer in Android and Timer in iOS. The preset time interval is the pre-defined duration between each refresh. The refresh trigger signal is an electronic signal generated by the local timer each time the preset time interval is reached, used to trigger the dynamic verification code refresh operation. In practice, the first user terminal starts the local timer immediately after switching the dynamic verification code to the active state. The local timer triggers periodically at the preset time interval (e.g., 1 second), generating the refresh trigger signal each time it is triggered.
[0044] Step 8: After each refresh trigger signal is generated, the current system time of the first user terminal is obtained, and the dynamic verification code is refreshed based on the current system time. In practice, the first user terminal reads the dynamic verification code data from the local storage. Then, the first user terminal obtains the current system time and updates (replaces) it with the current timestamp in the dynamic verification code data to update the dynamic verification code data. Afterwards, the first user terminal regenerates the QR code image according to the QR code encoding standard based on the updated dynamic verification code data, and displays the regenerated QR code image on the display screen of the first user terminal to replace the currently displayed dynamic verification code.
[0045] The above-described technical solution and its related content, as an inventive point of this disclosure, solve the technical problem of "the user terminal positioning module's continuous high power consumption causing the mobile phone battery to be quickly depleted, failing to meet tourists' all-day battery life requirements or resulting in a poor user experience." The factors that cause the user terminal positioning module to continuously operate at high power, leading to rapid battery depletion and failing to meet tourists' all-day battery life requirements or resulting in a poor user experience are often as follows: In existing dynamic verification code schemes, the user terminal needs to keep the positioning module continuously working to determine whether it has arrived at the scenic area. The continuous high power consumption of the GPS positioning module causes the mobile phone battery to be easily depleted within a short period (e.g., 2-3 hours), failing to meet tourists' all-day battery life requirements (usually 6-8 hours). While simply reducing the positioning frequency can save power, it can lead to the inability to detect the user's arrival at the scenic area in a timely manner, resulting in the dynamic verification code not being activated when the user arrives at the gate, thus preventing entry and leading to a poor user experience. Solving the above factors can achieve the effect of meeting the requirement that the dynamic verification code is activated and usable upon entry, eliminating the need for verification waiting, while simultaneously reducing the power consumption of the positioning module and extending the mobile phone's battery life. To achieve this effect, firstly, the location information of the gate anchor point corresponding to the aforementioned destination information is obtained. This determines the target location that the first user terminal needs to approach, providing a reference point for the first user terminal to calculate the positional difference between its own location and the gate anchor point location, thus giving the geofencing determination a clear spatial reference. Then, at a preset time point including the visit date in the aforementioned scenic area reservation information, the terminal device information and the scenic area reservation information are encrypted to obtain encrypted ciphertext. Next, the current timestamp is obtained, and a one-time random number is generated. This generates a ciphertext that allows the gate terminal to verify whether the dynamic verification code has been used, preventing the same verification code from being reused. Then, the encrypted ciphertext, the current timestamp, the one-time random number, and the preset dynamic verification code identifier are identified as dynamic verification code data, and the dynamic verification code data is stored in a preset database. Finally, the dynamic verification code data is sent and stored in the local memory of the first user terminal, so that the first user terminal can generate and display a dynamic verification code based on the dynamic verification code data, wherein the dynamic verification code is in an inactive state. Therefore, the dynamic verification code is pre-stored in the local memory of the first user terminal after ticket purchase, eliminating the need for temporary generation upon arrival at the gate and avoiding generation failures due to network latency or poor signal. Simultaneously, the dynamic verification code is in an inactive state, making it unrecognizable by the gate terminal, ensuring that the dynamic verification code is unusable before the first user terminal arrives at the scenic area, preventing interception or theft of pre-generated verification codes. Next, the first preset frequency is used as the wake-up frequency to activate the location service of the first user terminal to obtain its location information.Therefore, when the first user terminal is far from the scenic area, it wakes up the positioning service at a lower frequency (e.g., once every 10 minutes), avoiding continuous high-frequency operation of the GPS positioning module, significantly reducing positioning power consumption and extending the phone's battery life. Each time location information is obtained, the following steps are executed: In response to determining that the location difference between the location information and the gate anchor point location information is less than a preset proximity geofence threshold and greater than a preset entry geofence threshold, the wake-up frequency of the positioning service of the first user terminal is switched from the first preset frequency to a second preset frequency, wherein the second preset frequency is higher than the first preset frequency. Thus, the first user terminal only increases the positioning frequency to a medium frequency (e.g., once every 30 seconds) when approaching the scenic area to within 3km, and continues to operate at an extremely low frequency when far from the scenic area (more than 3km away), achieving gradual control of positioning power consumption and further saving power while ensuring timely detection of the user's approach to the scenic area. Subsequently, in response to determining that the positional difference between the aforementioned location information and the aforementioned gate anchor point location information is less than or equal to the aforementioned geofence entry threshold, an activation refresh control message is sent to the aforementioned first user terminal to control the aforementioned first user terminal to execute the following activation refresh steps: The dynamic verification code is switched from an inactive state to an active state. A local timer is started, and a refresh trigger signal is generated at preset time intervals using the local timer. Thus, the activation of the dynamic verification code is triggered only after the aforementioned first user terminal enters the core area of the scenic area, ensuring that the dynamic verification code is not activated prematurely, causing the verification code to expire before the user reaches the gate, while also ensuring that the dynamic verification code is active when the user arrives at the gate. Afterwards, after each refresh trigger signal is generated, the current system time of the aforementioned first user terminal is obtained, and the dynamic verification code is refreshed based on the current system time. Because of the use of progressive positioning, power consumption is further saved while ensuring timely detection of the user's approach to the scenic area. Meanwhile, the activation of the dynamic verification code is triggered only after the first user terminal enters the core area of the scenic spot, ensuring that the dynamic verification code is already activated when the user arrives at the gate, thus improving the user experience.
[0046] Step 1023: In response to determining the park entry verification method information including the offline facial anchoring park entry identifier, the first user terminal collects the face image of the second user to generate a static verification code, and sends the static verification code to the first user terminal so that the first user terminal can forward and share the static verification code to the second user terminal.
[0047] In some embodiments, the server may, in response to determining that the park entry verification method information includes an offline facial recognition entry identifier, collect the facial image of the second user through the first user terminal to generate a static verification code, and send the static verification code to the first user terminal so that the first user terminal can forward and share the static verification code to the second user terminal. The offline facial recognition entry identifier may be an identifier indicating that the second user should use the offline facial recognition entry verification method. The offline facial recognition entry verification method may refer to an entry method where the second user displays a static verification code, and the gate terminal performs offline comparison by collecting the second user's facial image. The second user terminal refers to a portable electronic device that can communicate, operated by the second user (elderly person, child, etc.), including but not limited to smartphones, feature phones, and smartwatches. The forwarding and sharing methods include, but are not limited to, sending pictures via instant messaging software, sending pictures via SMS, and transmitting pictures via Bluetooth. As an example: For instance, a first user (child) purchases park tickets for a second user (parent). After the server determines that the park entry verification information includes offline facial recognition entry, it sends a face capture command to the child's phone. The child's phone responds to this command by activating its camera to capture an image of the parents' faces and uploading it to the server. The server generates a static verification code (i.e., a static QR code image) based on the parents' facial images and sends the static verification code to the child's phone. The child then sends the static verification code back to the parents' phones via WeChat.
[0048] In some optional implementations of certain embodiments, a static verification code can be generated by acquiring the face image of the second user through the first user terminal described above using the following steps: The first step involves acquiring a set of facial video frames of the second user through the first user terminal. This set of facial video frames is a sequence of image frames obtained by the first user terminal continuously capturing images of the second user's face using its camera module.
[0049] The second step involves performing adaptive multi-level frame optimization enhancement processing on the aforementioned set of face video frames of the second user to obtain the face image of the second user.
[0050] The third step involves performing feature extraction processing on the face image of the second user to obtain facial feature information. In practice, the server can input the face image of the second user into a preset feature extraction model (e.g., DeepFace face feature extraction model, Convolutional Neural Network (CNN) model, and face embedding model). The feature extraction model then performs forward propagation calculations on the face image and outputs the corresponding feature vector as facial feature information.
[0051] The fourth step is to generate a one-time random number corresponding to the aforementioned facial feature information. This one-time random number can be a random string generated by the server's secure random number generator and can only be used once.
[0052] The fifth step involves binding the aforementioned facial feature information and the aforementioned one-time random number to obtain the bound verification data, which is then encrypted and stored for use in gate entry detection. In practice, the server can associate the facial feature information and the aforementioned one-time random number according to a preset data format (such as JSON format) to form a logical pairing relationship. The bound verification data can be structured data containing the aforementioned facial feature information and the aforementioned one-time random number. Subsequently, the executing entity determines the structured data as the verification data.
[0053] Step 6: Encrypt the verification data and the preset usage limit to obtain static encrypted ciphertext. The preset usage limit can be a pre-defined maximum number of times the static verification code can be successfully verified (e.g., 1 time). In practice, the server can combine the verification data and the preset usage limit according to a preset data format into a plaintext string to be encrypted, and then encrypt the plaintext string using the symmetric encryption algorithm to obtain the static encrypted ciphertext.
[0054] Step 7: Determine the above-mentioned static encrypted ciphertext and preset static verification code identifier as static verification code data. The preset static verification code identifier can be a pre-agreed fixed identifier value (such as "STATIC" or "1") used to indicate that the current code type is a static verification code.
[0055] Step 8: Based on the aforementioned static verification code data, generate a static QR code as the static verification code. In practice, firstly, the server can input the static verification code data into a QR code encoding library (such as the ZXing QR code encoding library or the libqrencode QR code encoding library). Then, the QR code encoding library encodes the static verification code data into a black and white dot matrix image according to the QR code standard, and outputs the static QR code as the static verification code.
[0056] In the process of adopting the above technical solutions to solve the technical problems mentioned above, for the application scenario: in winter tourist attractions in northern China, the first user (such as a child) uses their terminal to collect the facial image of the second user (such as an elderly person or a child) to generate a static verification code for the second user to screenshot and share for entry into the park. This is often accompanied by the following technical problems: when collecting the facial image of the second user, the first user is not a professional photographer. It is difficult to keep the equipment stable, control the ambient light, and guide the second user to maintain a correct posture during the collection process. As a result, the collected images of the first user's terminal often have quality problems such as blurry images, uneven lighting, and head posture deviation. The quality of the collected facial images of the second user is poor, which in turn leads to low accuracy in subsequent facial feature extraction. As a result, the gate terminal fails to verify the face during entry, and the user cannot enter the park, resulting in a poor user experience. The following requirements are necessary for this application scenario: During the process of the first user terminal acquiring the second user's facial image, the system needs to automatically detect the quality of the acquired images, selecting high-quality images with sufficient clarity, uniform lighting, and proper posture for feature extraction. This ensures successful facial comparison during subsequent gate verification. Simultaneously, for images of poor quality, the system should provide clear improvement guidance to help the first user quickly adjust shooting conditions, avoid blindly and repeatedly acquiring images, reduce acquisition time, and improve user experience. Especially for elderly people and children with lower cooperation levels, high-quality image acquisition should be completed within a few capture sessions whenever possible.
[0057] In some optional implementations of certain embodiments, the face image of the second user can be obtained by performing adaptive multi-level frame optimization enhancement processing on the aforementioned set of face video frames of the second user through the following steps: The first step is to perform the following quality inspection steps on each face video frame in the above face video frame set: The first sub-step involves converting the aforementioned face video frames to grayscale to obtain grayscale face video frames. In practice, the server can employ image grayscale processing technology to convert the face video frames to grayscale, resulting in grayscale face video frames. These grayscale face video frames can be the grayscale-converted face video frames.
[0058] The second sub-step involves determining the Laplacian response value corresponding to each pixel in the aforementioned grayscale face video frame. In practice, the server can use a Laplacian convolution kernel (such as a 3×3 Laplacian kernel), i.e., the Laplacian operator, to perform convolution operations on the aforementioned grayscale face video frame to obtain the Laplacian response value corresponding to each pixel.
[0059] The third sub-step involves generating the image Laplacian response variance as a sharpness score corresponding to the aforementioned face video frame, based on the Laplacian response values mentioned above. In practice, the server can calculate the average of the Laplacian response values of all pixels, then calculate the square of the difference between the Laplacian response value of each pixel and the average value, sum the squares of all pixels, and divide by the total number of pixels to obtain the image Laplacian response variance as the sharpness score. Here, the image Laplacian response variance is the variance of the Laplacian response values of all pixels, used to characterize the sharpness of the aforementioned face video frame. A larger variance indicates more and sharper edges in the image, resulting in a clearer image; a smaller variance indicates a blurrier image.
[0060] The fourth sub-step involves performing color space conversion on the aforementioned face video frames to obtain a face image with luminance components. In practice, for each pixel in the face video frame, the red, green, and blue component values of the pixel are obtained, and the luminance value of that pixel is calculated according to a preset YCrCb conversion formula. The preset YCrCb conversion formula can be: Luminance value = 0.299 × red component value + 0.587 × green component value + 0.114 × blue component value.
[0061] The fifth sub-step is to determine the standard deviation of the brightness values corresponding to each pixel in the face image of the brightness component.
[0062] The sixth sub-step involves generating an illumination uniformity score based on the aforementioned brightness standard deviation. This illumination uniformity score represents the degree of illumination uniformity in the face image based on the brightness component, ranging from 0 to 100. A smaller brightness standard deviation indicates more uniform illumination and a higher score; a larger standard deviation indicates less uniform illumination and a lower score. In practice, the server can generate the illumination uniformity score according to a preset mapping formula based on the brightness standard deviation. The preset mapping formula is: Illumination Uniformity Score = 100 × (1 - Brightness Standard Deviation / 255), where 255 is the maximum range of brightness values. When the brightness standard deviation is 0, the illumination uniformity score is 100; when the brightness standard deviation is 255, the illumination uniformity score is 0.
[0063] The seventh sub-step involves performing pose detection on the aforementioned face video frames to obtain a pose score. In practice, the server can use a facial landmark detection algorithm (such as Dlib's 68-point facial landmark detector) to detect the coordinates of facial landmarks in the aforementioned face video frames. Then, based on the coordinates of the facial landmarks and the 3D standard face model points, the solvePnP algorithm is used to solve the rotation matrix. The rotation matrix is decomposed into yaw angle, pitch angle, and roll angle. The pose score is generated based on the yaw angle, pitch angle, and roll angle. The 3D standard face model points can be a predefined set of 3D facial landmark coordinates used for matching with 2D facial landmark coordinates. The server can generate the pose score based on the yaw angle, pitch angle, and roll angle using the following steps: First, determine the score corresponding to the yaw angle as the yaw sub-score: when the absolute value of the yaw angle is less than or equal to a first preset yaw angle (e.g., 5°), the yaw sub-score is a perfect score of 100. When the absolute value of the yaw angle is greater than or equal to the second preset yaw angle (e.g., 30°), the yaw sub-score is zero. When the absolute value of the yaw angle is between 5° and 30°, the yaw sub-score decreases linearly as the absolute value of the yaw angle increases, i.e., the yaw sub-score = 100 - [(absolute value of the yaw angle - 5) / (30 - 5)] × 100. For example, when the absolute value of the yaw angle is 10°, the yaw sub-score = 100 - [(10 - 5) / 25] × 100 = 80. When the absolute value of the yaw angle is 20°, the yaw sub-score = 100 - [(20 - 5) / 25] × 100 = 40. When the absolute value of the yaw angle is 30°, the yaw sub-score is 0. When the absolute value of the yaw angle is 0°, the yaw sub-score is 100. Therefore, the smaller the absolute value of the yaw angle, the higher the yaw sub-score. The larger the absolute value of the yaw angle, the lower the yaw sub-score. Then, the score corresponding to the pitch angle is determined as the pitch sub-score: when the absolute value of the pitch angle is less than or equal to a first preset pitch angle (e.g., 5°), the pitch sub-score is a perfect score of 100. When the absolute value of the pitch angle is greater than or equal to a second preset pitch angle (e.g., 20°), the pitch sub-score is 0. When the absolute value of the pitch angle is between 5° and 20°, the pitch sub-score decreases linearly as the absolute value of the pitch angle increases, i.e., the pitch sub-score = 100 - [(absolute value of the pitch angle - 5) / (20 - 5)] × 100. For example, when the absolute value of the pitch angle is 8°, the pitch sub-score = 100 - [(8 - 5) / 15] × 100 = 80. When the absolute value of the above pitch angle is 12°, the above pitch score = 100 - [(12-5) / 15] × 100 (it should be noted that if the division is not exact, it can be rounded to two decimal places).When the absolute value of the pitch angle is 20°, the pitch sub-score is 0. When the absolute value of the pitch angle is 0°, the pitch sub-score is 100. Therefore, the smaller the absolute value of the pitch angle, the higher the pitch sub-score; the larger the absolute value of the pitch angle, the lower the pitch sub-score. Then, the score corresponding to the roll angle is determined as the roll sub-score: when the absolute value of the roll angle is less than or equal to a first preset roll angle (e.g., 3°), the roll sub-score is a full score of 100. When the absolute value of the roll angle is greater than or equal to a second preset roll angle (e.g., 15°), the roll sub-score is zero. When the absolute value of the roll angle is between 3° and 15°, the roll sub-score decreases linearly with the increase of the absolute value of the roll angle, that is, the roll sub-score = 100 - [(absolute value of the roll angle - 3) / (15 - 3)] × 100. For example, when the absolute value of the roll angle is 6°, the roll score is 100 - [(6-3) / 12] × 100 = 75 points. When the absolute value of the roll angle is 9°, the roll score is 100 - [(9-3) / 12] × 100 = 50 points. When the absolute value of the roll angle is 15°, the roll score is 0 points. When the absolute value of the roll angle is 0°, the roll score is 100 points. Therefore, the smaller the absolute value of the roll angle, the higher the roll score; the larger the absolute value of the roll angle, the lower the roll score. The average of the yaw score, pitch score, and roll score is then used to determine the attitude score.
[0064] The eighth sub-step generates a comprehensive quality score based on the aforementioned sharpness score, illumination uniformity score, and posture score. In practice, this comprehensive quality score can be generated as follows: Since the sharpness score is generated based on the variance of the Laplace response value, its value range is typically from 0 to hundreds or even thousands, while the illumination uniformity score and posture score are both 0-100 points. If the three are directly added together, the sharpness score will dominate the result of the comprehensive quality score, overshadowing the contributions of illumination uniformity and posture accuracy. Therefore, the server can multiply the sharpness score by a preset scaling factor (e.g., 0.01) to obtain a scaled sharpness score. Then, the server can determine the average of the scaled sharpness score, illumination uniformity score, and posture score as the comprehensive quality score.
[0065] The second step is to determine the highest-scoring comprehensive quality score among the generated comprehensive quality scores as the target comprehensive quality score.
[0066] The third step involves, in response to determining that the target comprehensive quality score is greater than or equal to a first preset score threshold and less than or equal to a second preset score threshold, enhancing the face video frame corresponding to the target comprehensive quality score based on the sharpness score, illumination uniformity score, and pose score. The enhanced face video frame is then used as the face image of the second user. The first preset score threshold is a pre-set lower limit (e.g., 60 points) for judging image quality as acceptable; images below this value are considered unacceptable. The second preset score threshold is a pre-set threshold (e.g., 85 points) for judging image quality as excellent; images above this value are considered excellent. The enhancement process can refer to operations such as sharpness enhancement, illumination enhancement, or pose correction to improve image quality. When the target comprehensive quality score is between the first and second preset score thresholds, it indicates that the image quality is acceptable but not excellent, requiring enhancement. In practice, the server determines the dimensions to be enhanced based on the specific values of the sharpness score, illumination uniformity score, and pose score corresponding to the target comprehensive quality score. The server performs corresponding enhancement processing on the face video frames corresponding to the overall quality score of the target. This enhancement processing includes, but is not limited to: enhancing sharpness through sharpening filtering (such as Unsharp Mask), enhancing illumination uniformity through Adaptive Histogram Equalization (CLAHE), and correcting pose through affine transformation. The server uses the enhanced image as the face image of the second user. Specifically, Unsharp Mask (USM) sharpening is used, with a radius parameter of 1.0 pixels and an intensity parameter of 0.5. CLAHE (Contrast Limiting Adaptive Histogram Equalization) is used, with a cropping limit of 2.0 and a grid size of 8×8 pixels. Based on the detected yaw, pitch, and roll angles, an affine transformation matrix is constructed to rotate the image to a near-frontal pose (target angle of 0°).
[0067] The fourth step involves, in response to the determination that the overall target quality score is less than the first preset score threshold, generating shooting suggestion information based on the sharpness score, illumination uniformity score, and pose score corresponding to the overall target quality score. This shooting suggestion information is then sent to the first user terminal, which re-captures the second user's face image. The shooting suggestion information serves as a prompt to guide the first user in adjusting shooting conditions. When the overall target quality score is less than the first preset score threshold, it indicates that the highest quality frame image is still unqualified and needs to be re-captured. In practice, the executing entity (i.e., the server) determines the main cause of the quality failure (such as low sharpness, uneven illumination, or excessive pose angle) based on the specific details of the sharpness score, illumination uniformity score, and pose score corresponding to the overall target quality score, and generates corresponding shooting suggestion information. This shooting suggestion information includes, but is not limited to, prompts such as: "Please keep your phone stable and avoid shaking," "Please adjust to an environment with uniform lighting," and "Please face the camera directly and maintain a proper posture." The server sends the shooting suggestion information to the first user terminal, which then displays it on its screen. As an example: The server performs quality checks on each frame of a 30-frame set of captured face video frames. The first frame has a sharpness score of 85, an illumination uniformity score of 90, a pose score of 70, and an overall quality score of 81.5. The second frame has a sharpness score of 90, an illumination uniformity score of 85, a pose score of 88, and an overall quality score of 87.7. After sorting, the second frame has the highest overall quality score (87.7) and is determined as the target overall quality score. The first preset score threshold is 60, and the second preset score threshold is 85. The target overall quality score (87.7) is greater than the second preset score threshold, so the server directly identifies the second frame as the second user's face image. Alternatively, if the overall quality score of the highest quality frame is 72 (between 60 and 85), the server performs enhancement processing on that frame (such as Unsharp Mask (USM) to enhance sharpness) and uses the enhanced image as the second user's face image. If the overall quality score of the best-quality frame is 45 points (less than 60 points), the server determines the main reason is "uneven lighting" based on the scores of each dimension, and generates the shooting suggestion message "Please adjust to an environment with uniform lighting" and sends it to the first user terminal. Alternatively, the shooting suggestion message is generated based on the lowest of the sharpness score, lighting uniformity score, and posture score: if the sharpness score is the lowest, it generates "Please keep your phone stable, avoid shaking, and ensure sufficient lighting." If the lighting uniformity score is the lowest, it generates "Please adjust to an environment with uniform lighting, avoid backlighting or sidelighting." If the posture score is the lowest, it generates "Please face the camera directly, keep your face upright, and avoid looking down or turning to the side."
[0068] Fifth step: In response to determining that the target comprehensive quality score is greater than the above-mentioned second preset score threshold, the face video frame corresponding to the above-mentioned target comprehensive quality score is determined as the face image of the second user.
[0069] The above technical solution, combined with steps 1023 and 103 and their related content, serves as an inventive point of this disclosure, solving the technical problem of "poor quality of the collected second user's facial image and poor user experience." Factors leading to poor quality of the collected second user's facial image and poor user experience often include: In northern winter tourist attractions, a first user (e.g., a child) collects the facial image of a second user (e.g., an elderly person, a child) using their terminal to generate a static verification code for the second user to screenshot and share for entry. This often presents the following technical problems: When collecting the second user's facial image, the first user is not a professional photographer, making it difficult to maintain equipment stability, control ambient lighting, and guide the second user to maintain a proper posture. This results in quality issues such as blurry images, uneven lighting, and head posture deviation in the collected first user's terminal image. The poor quality of the collected second user's facial image leads to lower accuracy in subsequent facial feature extraction, causing the gate terminal to fail facial comparison during entry verification, preventing entry and resulting in a poor user experience. Solving these factors can improve the quality of the collected second user's facial image and enhance the user experience. To achieve this effect, firstly, for each face video frame in the aforementioned face video frame set, the following quality inspection steps are performed: The face video frames are converted to grayscale to obtain grayscale face video frames. This converts color images to grayscale images, removing the interference of color information on subsequent edge detection, reducing computational load, and making the subsequent calculation of Laplacian response values more efficient and accurate. Then, the Laplacian response values corresponding to each pixel in the grayscale face video frames are determined. Next, based on these Laplacian response values, the variance of the image's Laplacian response value is generated as a sharpness score corresponding to the face video frame. Thus, the sharpness of edges in the image is quantified through the variance of the Laplacian response value; a larger variance indicates a more drastic change in grayscale values between adjacent pixels, resulting in sharper edges. A smaller variance indicates a smoother image, but also a more blurred image, thereby converting the blurriness of the face video frames into a quantifiable sharpness score. Finally, the face video frames undergo color space conversion processing to obtain a luminance component face image. Next, the standard deviation of the brightness values corresponding to each pixel in the face image is determined. Then, based on the standard deviation of the brightness, an illumination uniformity score is generated. This allows the image to be converted from the RGB color space to the YCrCb color space, extracting the color-independent brightness components. The standard deviation of the brightness quantifies the dispersion of the brightness of each pixel in the image; a smaller standard deviation indicates a higher concentration of brightness among pixels and more uniform illumination, while a larger standard deviation indicates a higher dispersion of brightness among pixels, with the presence of locally overly bright or dark areas and less uniform illumination. Thus, the illumination conditions of the face video frame are transformed into a quantifiable illumination uniformity score.Next, pose detection is performed on the aforementioned face video frames to obtain a pose score. Then, based on the aforementioned sharpness score, illumination uniformity score, and pose score, a comprehensive quality score is generated. This allows for the weighted fusion of the scores across the three dimensions of sharpness, illumination uniformity, and pose accuracy to obtain a comprehensive quality score that fully reflects the overall quality of the aforementioned face video frames. The highest comprehensive quality score among the generated comprehensive quality scores is then determined as the target comprehensive quality score. This allows for the selection of the comprehensive quality score corresponding to the frame with the highest overall quality. Subsequently, in response to the target comprehensive quality score being greater than or equal to a first preset score threshold and less than or equal to a second preset score threshold, the face video frame corresponding to the target comprehensive quality score is enhanced based on the sharpness score, illumination uniformity score, and pose score, resulting in the enhanced face video frame used as the face image of the second user. Therefore, when the overall target quality score is in the middle range, it indicates that the quality of the target frame is acceptable but not excellent. Targeted enhancement processing is then performed based on the specific scores of each dimension (e.g., sharpening for low sharpness, illumination equalization for low illumination uniformity, and pose correction for low pose), upgrading the acceptable image to a high-quality image to meet the requirements for feature extraction. This avoids redundant acquisition caused by directly discarding acceptable images, thus improving acquisition efficiency. Then, in response to the determination that the overall target quality score is less than the first preset score threshold, shooting suggestion information is generated based on the sharpness score, illumination uniformity score, and pose score corresponding to the overall target quality score. This shooting suggestion information is then sent to the first user terminal, and the second user's face image is acquired again through the first user terminal. Therefore, when the overall target quality score is less than the first preset score threshold, it indicates that the quality of the target frame is insufficient to reach a usable level through enhancement processing, and re-acquisition is required. By generating targeted shooting suggestions based on scores across various dimensions (e.g., a low clarity score suggests "keep your device stable and avoid shaking," a low lighting uniformity score suggests "adjust to a uniformly lit environment," and a low pose score suggests "face the camera directly and maintain a proper posture"), the system guides the first user to improve shooting conditions before capturing images, avoiding blind and repeated captures and reducing capture time. Subsequently, in response to the determination that the target's overall quality score is greater than the aforementioned second preset score threshold, the facial video frame corresponding to the target's overall quality score is identified as the second user's facial image.Because the system employs quality detection of each frame in the aforementioned face video frame set across three dimensions—clarity, illumination uniformity, and pose accuracy—to generate a comprehensive quality score, the frame with the highest comprehensive quality is selected as the target frame. Adaptive processing is then applied based on the target frame's comprehensive quality score range, either by enhancing it before use or by generating shooting suggestions and re-acquiring the image. This ensures that the final face image of the second user used for feature extraction meets the quality requirements in all three dimensions: clarity, illumination uniformity, and pose accuracy. This improves the accuracy of face feature extraction, ensuring successful face comparison at the gate terminal during park entry verification, thereby enhancing the user experience.
[0070] Step 103: The gate terminal collects the verification code from the first user terminal or the second user terminal, and performs dual-mode adaptive entry code verification based on the verification code to control the motor of the gate drive mechanism to rotate and open the gate.
[0071] In some embodiments, the gate terminal collects the verification code from the first user terminal or the second user terminal, and performs dual-mode adaptive entry code verification based on the verification code to control the motor of the gate drive mechanism to rotate and open the gate.
[0072] In some optional implementations of certain embodiments, the gate terminal can perform dual-mode adaptive entry code verification based on the verification code to control the motor of the gate drive mechanism to rotate in order to open the gate: The first step is to decode the verification code to obtain decoded data. This decoded data includes dynamic or static verification code data. The decoded data can refer to structured character or byte information that conforms to the preset encoding rules of the QR code and is output after decoding. In practice, the executing entity (i.e., the gate terminal) uses its built-in scanning module (such as a QR code scanner or barcode scanner) to acquire and decode the verification code. The gate terminal first uses the optical sensor of the scanning module to capture or scan the image of the verification code (such as a QR code or barcode pattern) to obtain the original image data. Then, the gate terminal's built-in decoding chip or processor calls a preset decoding algorithm (such as a QR Code decoding algorithm, a PDF417 decoding algorithm, or a Data Matrix decoding algorithm) to parse the original image data. The decoding algorithm identifies and extracts the positioning pattern, correction pattern, and version information from the image to determine the version, mask type, and error correction level of the verification code. It then reads the data codewords from the image according to the encoding rules and reconstructs the original encoded data after error correction processing (such as Reed-Solomon error correction). The reconstructed original encoded data is a string or binary data stream conforming to a predetermined data format. The gate terminal parses this original encoded data into structured decoded data according to the agreed data structure.
[0073] The second step, in response to determining that the verification code identifier in the above decoded data is a preset dynamic verification code identifier, is to perform the following dynamic park entry code verification on the decoded data, including the dynamic verification code data: The first sub-step involves obtaining the system time as the current verification time. This system time is the current time value provided by the system clock of the aforementioned gate terminal.
[0074] The second sub-step involves, in response to determining that the time interval between the current timestamp in the dynamic verification code data and the current verification time is less than or equal to a preset time interval, querying the number of uses based on the one-time random number included in the dynamic verification code data. In practice, the gate terminal subtracts the current timestamp in the dynamic verification code data from the current verification time to obtain the absolute value of the time interval, and compares the absolute value of the time interval with the preset time interval. If the absolute value of the time interval is less than or equal to the preset time interval, the gate terminal queries the local used records using the one-time random number as an index to obtain the number of uses.
[0075] The third sub-step involves verifying the dynamic verification code data in response to the determination that the number of uses is less than a preset usage limit, thereby controlling the motor of the gate drive mechanism to rotate and open the gate. The preset usage limit is a pre-set maximum number of times the dynamic verification code can be verified (e.g., 1 time). When the number of uses is less than the preset usage limit, it indicates that the dynamic verification code has not been used or the usage limit has not been reached, and the gate terminal generates a pass signal. When the number of uses is greater than or equal to the preset usage limit, it indicates that the dynamic verification code has been used or the usage limit has been reached, and the gate terminal generates a rejection signal. In practice, firstly, the gate terminal extracts terminal device information, the current timestamp, and a one-time random number from the dynamic verification code data. The gate terminal obtains the system time as the current verification time and calculates the time interval between the current verification time and the current timestamp. If the time interval is greater than a preset time interval (e.g., 30 seconds), it indicates that the dynamic verification code has timed out, and the gate terminal generates a rejection signal, terminating the verification process. If the aforementioned time interval is less than or equal to the aforementioned preset time interval, it indicates that the dynamic verification code is still valid, and subsequent verification continues. Thus, timestamp verification ensures that the dynamic verification code is only usable within the valid time window, preventing expired verification codes from being used. Next, the aforementioned gate terminal extracts the terminal device information (i.e., the hardware identity information of the terminal device bound when the dynamic verification code was generated) from the aforementioned dynamic verification code data. The aforementioned gate terminal obtains the device fingerprint information of the current scanning device and compares the extracted terminal device information with the device fingerprint information of the current scanning device. If the two are inconsistent, it indicates that the dynamic verification code was generated on another device, and the current scanning device is not the bound device of the dynamic verification code; the aforementioned gate terminal generates a rejection signal and terminates the verification process. If the two are consistent, it indicates that the current scanning device is the bound device that generated the dynamic verification code, and subsequent verification continues. Thus, device fingerprint verification ensures that the dynamic verification code is only usable on its bound terminal device, preventing the verification code from being copied and used on other devices. Afterwards, the aforementioned gate terminal queries the local used records using the aforementioned one-time random number as an index to obtain the number of times the aforementioned one-time random number has been used. If the number of uses is greater than or equal to the preset usage limit (e.g., 1 time), it indicates that the dynamic verification code has been used, and the gate terminal generates a rejection signal, terminating the verification process. If the number of uses is less than the preset usage limit, it indicates that the dynamic verification code has not been used, and subsequent verifications continue. Thus, a one-time random number check ensures that the dynamic verification code can only be used once, preventing the same verification code from being reused. Finally, when all verifications pass, the gate terminal marks the one-time random number as used (i.e., increments the usage count by 1) and generates a release signal.The aforementioned gate terminal sends the release signal to the motor drive circuit of the gate drive mechanism. In response to receiving the release signal, the motor drive circuit outputs drive current to the drive motor. The drive motor rotates and, through a transmission device, moves the gate baffle to open the gate. If any of the three verifications fails, the gate terminal generates a rejection signal, controlling the drive motor to remain locked and keeping the gate baffle closed.
[0076] The third step is to determine that the verification code identifier in the above decoded data is a preset static verification code identifier, and to perform static entry code verification in order to control the motor of the gate drive mechanism to rotate and open the gate.
[0077] In addressing the technical problems described above using the aforementioned technical solutions, the following technical issues arise regarding the application scenario: In northern winter tourist attractions, when a first user (e.g., a child) purchases tickets on behalf of a second user (e.g., an elderly person or a child) and shares a screenshot of a static verification code for the second user's independent entry at the gate, the following technical problem often arises: Existing static verification code screenshots cannot distinguish between initial valid use and subsequent illegal reuse in the ticketing system. This means that if the ticket purchaser is a scalper (i.e., the holder of the static verification code screenshot is also a scalper), the static verification code can easily be reused multiple times, helping unauthorized users enter the park. Therefore, the following requirements are necessary for this application scenario: Simultaneously, the physical status (used / unused) of the unique physical credential (one-time random number) embedded in the screenshot must be physically verified to ensure that the screenshot can only be successfully verified once in the physical world, becoming physically invalid after use, thus blocking scalpers from impersonating others by physically possessing other people's screenshots.
[0078] In some optional implementations of certain embodiments, the gate terminal may perform static entry code verification in response to determining that the verification code identifier in the decoded data is a preset static verification code identifier, thereby controlling the motor of the gate drive mechanism to rotate to open the gate: The first step, in response to determining that the verification code identifier in the above decoded data is a preset static verification code identifier, is to perform the following static entry code verification: The first sub-step involves decrypting the static encrypted ciphertext in the decoded data to obtain verification data and a preset usage limit. The verification data includes facial feature information and a one-time random number. In practice, the gate terminal uses its locally stored decryption key to decrypt the static encrypted ciphertext, obtaining the verification data and the preset usage limit.
[0079] The second sub-step involves retrieving the one-time random number included in the verification data from a preset blacklist database to obtain the search results. These search results indicate whether the one-time random number exists in the preset blacklist database. In practice, the gate terminal uses the one-time random number as an index to search the preset blacklist database. If the one-time random number exists in the preset blacklist database, the search result indicates a match (i.e., the one-time random number has been blacklisted). If the one-time random number does not exist in the preset blacklist database, the search result indicates an empty result (i.e., the one-time random number has not been blacklisted).
[0080] The third sub-step, in response to determining that the search result is empty, queries the number of times the one-time random number included in the aforementioned verification data has been used. The number of times the one-time random number has been successfully verified is the total number of times it has been used. In practice, when the search result indicates that the one-time random number does not exist in the preset blacklist database, the gate terminal uses the one-time random number as an index to query local used records and obtains the number of times it has been used.
[0081] The fourth sub-step involves, in response to determining that the number of uses has been less than a preset usage limit, capturing the face image of the second user via a camera on the gate as the face image to be verified. In practice, when the number of uses is less than the preset usage limit, the gate terminal activates the face image capture device to capture the face of the person currently scanning the code in real time, obtaining the face image to be verified. The face image to be verified is a real-time face image captured by the gate terminal using its built-in face image capture device. The face image capture device is a camera module built into the gate terminal for capturing face images.
[0082] The fifth sub-step involves performing feature extraction processing on the aforementioned face image to be verified, obtaining the face feature information to be verified. In practice, the aforementioned gate terminal can input the face image to be verified into its built-in feature extraction model (e.g., the DeepFace face feature extraction model). The feature extraction model performs forward propagation calculations on the face image and outputs the corresponding feature vector as the face feature information to be verified. The face feature information to be verified can be a multi-dimensional feature vector obtained after the feature extraction processing. The face feature information can be a 512-dimensional floating-point feature vector, the dimension of which is determined by the output layer of the selected feature extraction model (e.g., the DeepFace model, i.e., the DeepFace face feature extraction model). The server and the gate terminal use the same model and dimension for feature extraction and comparison.
[0083] The sixth sub-step involves comparing the similarity between the facial feature information to be verified and the verification data, which includes facial feature information, to obtain a similarity score. This similarity comparison can be based on the cosine similarity or Euclidean distance between the facial feature information to be verified and the facial feature information.
[0084] The first step involves controlling the motor of the gate drive mechanism to rotate and open the gate in response to a similarity value greater than a preset similarity value. The preset similarity value is a pre-defined threshold (e.g., 0.75) used to determine if two facial images belong to the same person. When the similarity value is greater than the preset similarity value, it indicates that the person scanning the code is indeed the second user, and the gate terminal generates a release signal. When the similarity value is less than or equal to the preset similarity value, it indicates that the person scanning the code is not the second user, and the gate terminal generates a rejection signal. In practice, the gate terminal compares the similarity value with the preset similarity value. If the similarity value is greater than the preset similarity value, the gate terminal sends the release signal to the motor drive circuit of the gate drive mechanism. Upon receiving the release signal, the motor drive circuit outputs a drive current to the drive motor, causing the drive motor to rotate and, through the transmission device, move the gate baffle to open the gate. If the similarity value is less than or equal to the preset similarity value, the gate terminal sends a rejection signal to the motor drive circuit, and the motor drive circuit controls the drive motor to remain in the locked state.
[0085] The above-described technical solution and its related content, as an inventive point of this disclosure, solve the technical problem of "static verification codes being reused multiple times to help unauthorized users enter the park." Factors leading to the reuse of static verification codes to help unauthorized users enter the park are often as follows: existing static verification code screenshots cannot distinguish between valid initial use and subsequent illegal reuse in the ticketing system. Therefore, if the ticket purchaser is a scalper (i.e., the holder of the static verification code screenshot is a scalper), it is easy for the static verification code to be reused multiple times to help unauthorized users enter the park. Solving these factors can reduce the occurrence of unauthorized users entering the park due to the reuse of static verification codes. To achieve this effect, firstly, the static encrypted ciphertext in the above-described decoded data is decrypted to obtain verification data and a preset usage limit. The verification data includes facial feature information and a one-time random number. Thus, the one-time random number is extracted from the static encrypted ciphertext through decryption, giving the static verification code a unique, independently verifiable credential at the gate terminal, providing a physical basis for distinguishing between initial use and subsequent reuse. Then, the one-time random number included in the verification data is retrieved from the preset blacklist database to obtain the search results. Thus, through the blacklist database retrieval mechanism, one-time random numbers that have been abnormally marked can be blocked. If the one-time random number is already blacklisted, it is directly rejected without further verification steps, preventing the continued use of abnormally blacklisted credentials. Furthermore, in response to determining that the search results are empty, the number of times the one-time random number included in the verification data has been used is queried. Thus, the number of times the one-time random number has been used can be retrieved. Afterwards, in response to determining that the number of times it has been used is less than the preset usage limit, the face image of the second user is captured by the camera on the gate as the face image to be verified. Thus, the camera is only activated to capture the face image to be verified if the one-time random number has not been used. Then, feature extraction processing is performed on the face image to be verified to obtain the face feature information to be verified. Thus, the physical facial features of the current credential holder are converted into a quantifiable feature vector to obtain the face feature information to be verified. Subsequently, the face feature information to be verified and the face feature information included in the verification data are compared for similarity to obtain a similarity value. Therefore, by comparing the facial features of the current code holder with the facial features of the authorized person entered during ticket purchase, the similarity between the two is quantified, enabling the gate terminal to physically determine whether the current code holder is the authorized person. Finally, in response to determining that the similarity value is greater than a preset similarity value, the motor of the gate drive mechanism is controlled to rotate to open the gate.Therefore, only under the dual conditions that the aforementioned one-time random number has not been used and the facial features of the current code holder match the facial features of the authorized person, will the gate terminal generate a release signal to control the motor to rotate and open the gate, thereby reducing the occurrence of unauthorized users entering the park due to the repeated reuse of static verification codes.
[0086] The above-described embodiments of this disclosure have the following beneficial effects: the dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing, as described in some embodiments of this disclosure, improves the user experience. Specifically, the poor user experience is due to the fact that while the dynamic QR code strategy prevents ticket theft, it completely eliminates the possibility of screenshot sharing, making it impossible for elderly people, children, and other groups who do not use or do not know how to use smartphones to enter the park independently. They can only rely on their companions to operate the code, resulting in a poor user experience. When all users use static QR code screenshots and the gate scans the code for facial verification, in the harsh weather conditions of northern winters, such as severe cold, smog, and sandstorms, tourists' faces are often covered by clothing (e.g., wearing Lei Feng hats, snow goggles, face shields, anti-smog masks, etc.). The facial image acquisition device of the gate terminal often cannot capture a complete facial image, resulting in verification failure and inability to enter the park. Removing and re-putting clothing increases the time for each passage, resulting in a poor user experience. Based on this, some embodiments of the present disclosure provide a dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing. First, a first user terminal sends a ticket purchase request to the server, which includes user type information and scenic area reservation information. Then, the server performs the following steps: based on the user type information and the scenic area reservation information, it generates park entry verification method information, which includes either a self-held device progressive entry identifier or an offline facial recognition entry identifier. Thus, based on the user type (e.g., whether it is an elderly person or a child who is not proficient in using smartphones) and the scenic area reservation information (e.g., weather, time of day, etc.), the most suitable verification mode can be automatically matched, distinguishing the needs of different user groups from the source and generating corresponding verification method identifiers. Next, in response to determining that the park entry verification method information includes a self-held device progressive entry identifier, the server obtains terminal device information from the first user terminal, and based on the terminal device information and the scenic area reservation information, generates a dynamic verification code, and controls the first user terminal to perform geofence progressive positioning to activate the dynamic verification code and periodically refresh it after entering the geofence. Therefore, for users who can operate their mobile phones independently, the use of dynamic QR codes combined with geofencing technology ensures that the verification code is only effective and continuously refreshed when the tourist is within the designated area of the scenic spot. This not only prevents ticket theft caused by screenshot sharing, but also ensures a fast passage experience for ordinary users. It allows users with their own mobile phones to complete the verification without removing their equipment when wearing warm and protective gear that covers a large area of their face. This avoids verification failures caused by the gate's facial image acquisition device being unable to capture a complete facial image, and also saves the time spent removing and re-wearing equipment.Subsequently, in response to the determination that the aforementioned park entry verification method information includes an offline facial recognition entry identifier, the facial image of the second user is collected through the first user terminal to generate a static verification code, and the static verification code is sent to the first user terminal for forwarding and sharing to the second user terminal. Thus, for special groups, the offline facial recognition method is used to pre-collect their facial features and generate a static QR code. This QR code can be screenshotted or forwarded and shared by accompanying persons without requiring the individual to possess a smartphone or perform any complex operations. This solves the problem of the elderly and children being unable to use dynamic codes independently, enabling convenient intergenerational sharing and significantly improving the convenience of park entry for such users. Finally, the gate terminal collects the verification code from either the first or second user terminal and, based on the verification code, performs dual-mode adaptive entry code verification to control the motor of the gate drive mechanism to rotate and open the gate. Because it adopts a dual-mode strategy that adaptively selects between dynamic progressive verification and offline facial recognition verification based on user type and scenic spot reservation information, it not only meets the safe and fast passage needs of ordinary users, but also provides a feasible way for special groups to share screenshots. This allows different user groups to complete the park entry verification in the way that best suits their own conditions, thus improving the user experience.
[0087] Figure 2 This is based on the architecture diagram of the ticketing system disclosed herein. Further references... Figure 2 As an implementation of the methods shown in the figures, this disclosure provides some embodiments of a ticketing system 200.
[0088] like Figure 2As shown, the ticketing system in some embodiments includes: a first user terminal 201, a second user terminal 202, a gate terminal 204, and a server 203. The first user terminal 201 is configured to send a ticket purchase request to the server, wherein the ticket purchase request includes user type information and scenic spot reservation information. The server 203 is configured to perform the following steps: based on the user type information and the scenic spot reservation information, generate park entry verification method information, wherein the park entry verification method information includes a personal device-based progressive entry identifier or an offline facial recognition entry identifier; in response to determining that the park entry verification method information includes a personal device-based progressive entry identifier, obtain terminal device information from the first user terminal, and generate a dynamic verification code based on the terminal device information and the scenic spot reservation information, and control the first user terminal to perform geofence progressive positioning, so as to activate the dynamic verification code and refresh it periodically after entering the geofence; in response to determining that the park entry verification method information includes an offline facial recognition entry identifier, collect the face image of the second user through the first user terminal to generate a static verification code, and send the static verification code to the first user terminal so that the first user terminal can forward and share the static verification code to the second user terminal. The gate terminal 204 is configured to collect the verification code from the first user terminal or the second user terminal, and perform dual-mode adaptive entry code verification based on the verification code to control the motor of the gate drive mechanism to rotate and open the gate.
[0089] Figure 3 This is an internal test application scenario diagram based on an embodiment of the present disclosure.
[0090] Figure 4 This is an internal test effect analysis diagram based on an embodiment of the present disclosure.
[0091] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of technical features, but should also cover other technical solutions formed by arbitrary combinations of technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A dual-mode adaptive park entry code verification method for northern climate and intergenerational sharing, applied to a ticketing system comprising a first user terminal, a second user terminal, a gate terminal, and a server, including: The ticket purchase request information sent by the first user terminal to the server includes user type information and scenic spot reservation information; The server performs the following steps: Based on the user type information and the scenic area reservation information, park entry verification method information is generated, wherein the park entry verification method information includes a personal device-based progressive park entry identifier or an offline facial recognition park entry identifier. In response to determining that the park entry verification method information includes the personal progressive park entry identifier, the system obtains terminal device information from the first user terminal, generates a dynamic verification code based on the terminal device information and the scenic area reservation information, and controls the first user terminal to perform geofence progressive positioning so that the dynamic verification code is activated and periodically refreshed after entering the geofence. In response to determining that the park entry verification method information includes an offline facial anchoring park entry identifier, the system collects the face image of the second user through the first user terminal to generate a static verification code, and sends the static verification code to the first user terminal so that the first user terminal can forward and share the static verification code to the second user terminal. The gate terminal collects the verification code from the first user terminal or the second user terminal, and performs dual-mode adaptive entry code verification based on the verification code to control the motor of the gate drive mechanism to rotate and open the gate.
2. The method according to claim 1, wherein, The server is further configured to: In response to receiving the dual-mode adaptive entry code verification failure information sent by the gate terminal, the locally stored failure record information set is updated based on the dual-mode adaptive entry code verification failure information to obtain the updated failure count, wherein the dual-mode adaptive entry code verification failure information includes a one-time random number. In response to the updated failure count being greater than or equal to a preset threshold, the one-time random number is cached in at least one downstream gate terminal so that the downstream gate terminal can perform a pre-check on the one-time random number in any subsequent scanning operation, so as to refuse the user corresponding to the one-time random number from passing through.
3. The method according to claim 1, wherein, The user type information includes a personal identifier and a non-personal identifier; the scenic area reservation information includes the visit date and destination information; and the method for generating entry verification information based on the user type information and the scenic area reservation information includes: In response to determining that the user type information includes a non-personal identifier, the preset offline facial recognition entry identifier is determined as the entry verification method information; In response to determining that the user type information includes a personal identifier, a weather query request containing the travel date and travel destination information is sent to a preset weather information system to obtain the weather condition information of the destination represented by the travel destination information on the travel date, wherein the weather condition information includes weather type information, temperature value and air quality index; Based on the weather information and the destination information, context-aware adaptive entry allocation processing is performed to obtain entry verification method information.
4. The method according to claim 3, wherein, The process of performing context-aware adaptive park entry allocation based on the weather information and the destination information to obtain park entry verification method information includes: In response to determining that the weather type information included in the weather condition information meets the triggering conditions for face occlusion risk weather, the preset personal device-holding progressive entry identifier is determined as the entry verification method information; In response to determining that the temperature value included in the weather condition information is less than the lower temperature threshold or greater than the preset upper temperature threshold, the preset personal device-holding progressive entry identifier is determined as the entry verification method information. In response to determining that the air quality index included in the weather condition information is greater than a preset air quality threshold, the preset personal device-based progressive entry identifier is determined as the entry verification method information; The system queries the scenic area type identifier corresponding to the tourist destination information, and in response to determining that the scenic area type identifier is one of the ski resort type identifier, desert type identifier, or plateau type identifier, it determines the preset personal device-based progressive entry identifier as the entry verification method information. In response to the determination that the weather condition information, including the weather type information, does not meet the triggering conditions for face occlusion risk weather, the temperature value is greater than or equal to the lower limit temperature threshold and less than or equal to the preset upper limit temperature threshold, the air quality index is less than or equal to the preset air quality threshold, and the scenic area type identifier is not one of the ski resort type identifier, desert type identifier, or plateau type identifier, the preset offline face anchor entry identifier is determined as the entry verification method information.
5. The method according to claim 1, wherein, The step of collecting the face image of the second user through the first user terminal to generate a static verification code includes: The first user terminal collects a set of facial video frames of the second user. Adaptive multi-level frame optimization enhancement processing is performed on the face video frame set of the second user to obtain the face image of the second user; The facial image of the second user is processed to extract facial feature information; Generate a one-time random number corresponding to the facial feature information; The facial feature information and the one-time random number are bound together to obtain the bound verification data, and the verification data is encrypted and stored for use in the gate entry detection. The verification data and the preset usage limit are encrypted to obtain static encrypted ciphertext; The static encrypted ciphertext and the preset static verification code identifier are identified as static verification code data; Based on the static verification code data, a static QR code is generated as a static verification code.
6. The method according to claim 1, wherein, The dynamic verification code data includes encrypted ciphertext, the current timestamp, a one-time random number, and a preset dynamic verification code identifier. The method of performing dual-mode adaptive entry code verification based on the verification code to control the motor rotation of the gate drive mechanism to open the gate includes: The verification code to be verified is decoded to obtain decoded data, wherein the decoded data includes dynamic verification code data or static verification code data. In response to determining that the verification code identifier in the decoded data is a preset dynamic verification code identifier, the following dynamic entry code verification is performed on the decoded data, including the dynamic verification code data: Obtain the system time as the current verification time; In response to determining that the time interval between the current timestamp in the dynamic verification code data and the current verification time is less than or equal to a preset time interval, the number of times the verification code has been used is queried based on the one-time random number included in the dynamic verification code data; In response to determining that the number of times the code has been used is less than the preset maximum number of times it can be used, the dynamic verification code data is verified in order to control the motor of the gate drive mechanism to rotate and open the gate. In response to determining that the verification code identifier in the decoded data is a preset static verification code identifier, static entry code verification is performed to control the motor of the gate drive mechanism to rotate and open the gate.
7. A ticketing system, comprising a first user terminal, a second user terminal, a turnstile terminal, and a server: The first user terminal is configured to send a ticket purchase request to the server, wherein... The ticket purchase request information includes user type information and scenic spot reservation information; The server is configured to perform the following steps: Based on the user type information and the scenic area reservation information, generate park entry verification method information, wherein the park entry verification method information includes a personal device-based progressive entry identifier or an offline facial recognition entry identifier; in response to determining that the park entry verification method information includes a personal device-based progressive entry identifier, obtain terminal device information from the first user terminal, and based on the terminal device information and the scenic area reservation information, generate a dynamic verification code, and control the first user terminal to perform geofence progressive positioning, so as to activate the dynamic verification code and periodically refresh it after entering the geofence; in response to determining that the park entry verification method information includes an offline facial recognition entry identifier, collect the face image of the second user through the first user terminal to generate a static verification code, and send the static verification code to the first user terminal so that the first user terminal can forward and share the static verification code to the second user terminal; The gate terminal is configured to collect a verification code from the first user terminal or the second user terminal, and to perform dual-mode adaptive entry code verification based on the verification code, so as to control the motor of the gate drive mechanism to rotate to open the gate.