Automatic ticket checking method, device and system

By introducing high-definition passenger image acquisition and low-definition monitoring image acquisition between automatic ticket vending machines and ticket gates, and combining them with artificial intelligence algorithms to extract passenger features, the problem of slow passage speed of automatic ticket vending and ticket gate systems during peak hours has been solved, and the authentication effect has been achieved before reaching the gate.

CN117789316BActive Publication Date: 2026-07-10BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
Filing Date
2023-12-26
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

The automated fare collection system slows down the flow of people during peak hours, becoming a bottleneck for passage.

Method used

By introducing high-resolution passenger image acquisition and low-resolution surveillance image acquisition between automatic ticket vending machines and automatic ticket gates, and combining them with artificial intelligence algorithms, passenger characteristics are extracted and authentication is completed before they arrive at the gate, reducing gate waiting time.

Benefits of technology

This system enables authentication to be completed before passengers arrive at the gate, improving passenger flow speed and solving the problem of slow passage speed of the automatic fare collection system during peak hours.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117789316B_ABST
    Figure CN117789316B_ABST
Patent Text Reader

Abstract

This application discloses an automatic ticket checking method, apparatus, and system. The method includes: using an automatic ticket vending machine (TVM) to collect passenger images during the ticket dispensing process; using a first image acquisition device deployed within the target station where the TVM is located to collect images of passing passengers; storing the collected passenger images in a local database at the target station; using a second image acquisition device to collect surveillance images at a preset distance from the entrance of the automatic ticket checking machine (AGM); matching the surveillance images collected by the second image acquisition device with the passenger image of a target passenger from the local database; authenticating the target passenger using the matched passenger image; and, upon successful authentication, controlling the automatic ticket checking machine (AGM) to allow the target passenger to pass. This application solves the technical problem of slow passenger flow at ticket gates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to an automatic ticket checking method, apparatus, and system. Background Technology

[0002] This section is intended to provide background or context for the content set forth in the claims or specification, and the content described herein is not acknowledged as prior art simply because it is included in this section.

[0003] AFC stands for Auto Fare Collection, referring to an automated fare collection system. It's an automated ticketing and fare collection system integrating computer technology, information collection and processing technology, and mechanical manufacturing, possessing strong intelligent functions. The convenience and accuracy of automated fare collection systems far surpass traditional paper ticketing methods. It overcomes the inherent disadvantages of manual fare collection, such as slow speed, numerous financial loopholes, high error rates, and high labor intensity. It effectively prevents counterfeit tickets, eliminates preferential treatment in ticketing, prevents staff cheating, improves management efficiency, and reduces labor intensity. It is not only a trend in the development of subway and transportation systems but also an important manifestation of urban informatization.

[0004] However, the current automatic ticketing system is expensive and slow, especially during peak hours and other extreme situations, where the ticket gates become a bottleneck affecting passage.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This application provides an automatic ticket checking method, apparatus, and system to at least solve the technical problem of slow pedestrian flow at gates.

[0007] According to one aspect of the embodiments of this application, an automatic ticket checking system is provided, comprising: an automatic ticket vending machine (TVM) for collecting passenger images during the process of providing tickets to passengers; a first image acquisition device deployed in the target station where the TVM is located for collecting passenger images of passing passengers; a local database for storing the passenger images collected by the TVM and the passenger images collected by the first image acquisition device locally at the target station; an automatic ticket checking machine (AGM) and a second image acquisition device used in conjunction, the second image acquisition device being used to collect monitoring images at a preset distance from the entrance of the AGM; and a computer device connected to the TVM, the local database, the AGM, the first image acquisition device, and the second image acquisition device, wherein the computer device is used to match the passenger image of a target passenger from the local database based on the monitoring image collected by the second image acquisition device, authenticate the target passenger using the matched passenger image, and control the AGM to allow the target passenger to pass after successful authentication; the computer device is also used to delete passenger images in the local database that have reached a set validity period, wherein the target passenger is the passenger in the monitoring image.

[0008] According to another aspect of the embodiments of this application, an automatic ticket checking method is also provided, comprising: collecting passenger images using an automatic ticket vending machine (TVM) during the process of providing travel tickets, and collecting passenger images of passing passengers using a first image acquisition device, wherein the first image acquisition device is deployed within the target station where the automatic ticket vending machine (TVM) is located; storing the passenger images collected by the automatic ticket vending machine (TVM) and the passenger images collected by the first image acquisition device in a local database of the target station, wherein passenger images in the local database that have reached a set validity period are deleted; collecting monitoring images at a preset distance from the entrance of the automatic ticket checking machine (AGM) using a second image acquisition device; matching the passenger image of a target passenger from the local database based on the monitoring images collected by the second image acquisition device, wherein the target passenger is the passenger in the monitoring images; authenticating the target passenger using the matched passenger image, and controlling the automatic ticket checking machine (AGM) to release the target passenger after successful authentication.

[0009] Optionally, the passenger images captured by the automatic ticket vending machine (TVM) and the passenger images captured by the first image acquisition device are stored in a local database at the target station. This includes: segmenting the passenger images of human body contour regions from the original images captured by the TVM and the first image acquisition device using artificial intelligence algorithms; identifying multiple features from the passenger images, wherein the multiple features are divided into first-class features and second-class features according to their complexity from low to high. The first-class features include necessary features and unnecessary features. Necessary features are features that will not change during the journey, while unnecessary features are features that may change during the journey; generating a unique passenger code for each passenger in the passenger image; and saving the data encoding record generated for the passenger code, which includes multiple features, passenger image, timestamp, and passenger location, to the local database.

[0010] Optionally, generating a unique passenger code for a passenger in a passenger image includes: if the necessary features of the passenger image to be saved are different from the necessary features of passenger images in the local database, then the first N bits of the passenger code of the passenger image to be saved are set to a first preset value, and the last M bits are generated, wherein the first preset value is used to indicate that the necessary features of the corresponding passenger image are unique in the local database, and the positive integer N is less than the positive integer M; if the necessary features and at least one non-necessary feature of the passenger image to be saved are different from the necessary features and corresponding non-necessary features of passenger images in the local database, then the first N bits of the passenger code of the passenger image to be saved are set to a second preset value, and the last M bits are generated, wherein the second preset value is used to indicate that the necessary features and at least one non-necessary feature of the corresponding passenger image are unique in the local database; wherein the last M bits of the code values ​​of any two passenger images in the local database are different.

[0011] Optionally, multiple features are identified from the passenger image, including: the color of the shirt, pants, hat, shoes, height-to-shoulder-width ratio, and human body contour features. The first type of features includes the color of the pants, shoes, height-to-shoulder-width ratio, shirt, and hat. The second type of features includes human body contour features and image features of the passenger image. The necessary features include the color of the pants, shoes, and height-to-shoulder-width ratio, while the non-necessary features include the color of the shirt and hat.

[0012] Optionally, matching the passenger image of the target passenger from the local database based on the monitoring image acquired by the second image acquisition device includes: determining the target gate where the second image acquisition is located and obtaining the queue of the target gate, wherein the queue stores data encoding records from the local database; if there is a first data encoding record in the queue whose necessary features match the target passenger in the monitoring image, obtaining the encoding value of the first N bits of the first data encoding record; if the encoding value of the first N bits of the first data encoding record is a first preset value, determining the passenger image of the first data encoding record as the passenger image of the target passenger; if the encoding value of the first N bits of the first data encoding record is a second preset value, comparing the unnecessary features of the target passenger in the monitoring image with the unnecessary features in the first data encoding record; if the unnecessary features of the target passenger in the monitoring image match the unnecessary features in the first data encoding record, determining the passenger image of the first data encoding record as the passenger image of the target passenger.

[0013] Optionally, before obtaining the queue of the target gate, the method further includes: for each data encoding record in the local database, calculating the walking time t1 required for the passenger to reach the gate based on the distance L between the passenger's location and the gate and the passenger's speed S in the data encoding record; estimating the time t = t0 + t1 for the passenger to arrive at the gate based on the timestamp t0 and the walking time t1 in the data encoding record; maintaining a queue for each gate, storing multiple data encoding records in the queue, wherein the absolute value of the difference between the time t for the passenger to arrive at the gate and the current time T in the data encoding records stored in the queue is less than or equal to a preset duration, and the multiple data encoding records are arranged in the queue in ascending order of the absolute value of the difference.

[0014] According to another aspect of the embodiments of this application, an automatic ticket checking device is also provided, comprising: a first acquisition unit, configured to acquire passenger images using an automatic ticket vending machine (TVM) during the process of providing travel tickets, and to acquire passenger images of passing passengers using a first image acquisition device, wherein the first image acquisition device is deployed within the target station where the automatic ticket vending machine (TVM) is located; a storage unit, configured to store the passenger images acquired by the automatic ticket vending machine (TVM) and the passenger images acquired by the first image acquisition device in a local database of the target station, wherein passenger images in the local database that have reached a set validity period are deleted; a second acquisition unit, configured to acquire monitoring images at a preset distance from the entrance of the automatic ticket checking machine (AGM) using the second image acquisition device; a matching unit, configured to match the passenger image of a target passenger from the local database based on the monitoring images acquired by the second image acquisition device, wherein the target passenger is the passenger in the monitoring images; and a control unit, configured to authenticate the target passenger using the matched passenger images, and, after successful authentication, control the automatic ticket checking machine (AGM) to allow the target passenger to pass.

[0015] Optionally, the storage unit is also used to: segment passenger images of human body contour regions from the original images captured by the automatic ticket vending machine TVM and the original images captured by the first image acquisition device using artificial intelligence algorithms; identify multiple features from the passenger images, wherein the multiple features are divided into first-class features and second-class features according to their complexity from low to high, the first-class features include necessary features and unnecessary features, necessary features are features that will not change during the ride, and unnecessary features are features that may change during the ride; generate a unique passenger code for the passenger in the passenger image; and save the data encoding record generated for the passenger code, including multiple features, passenger image, timestamp, and passenger location, to the local database.

[0016] Optionally, the storage unit is further configured to: if the necessary features of the passenger image to be saved are different from the necessary features of the passenger images in the local database, then set the first N bits of the passenger code of the passenger image to be saved to a first preset value and generate the last M bits, wherein the first preset value is used to indicate that the necessary features of the corresponding passenger image are unique in the local database, and the positive integer N is less than the positive integer M; if the necessary features and at least one non-necessary feature of the passenger image to be saved are different from the necessary features and corresponding non-necessary features of the passenger images in the local database, then set the first N bits of the passenger code of the passenger image to be saved to a second preset value and generate the last M bits, wherein the second preset value is used to indicate that the necessary features and at least one non-necessary feature of the corresponding passenger image are unique in the local database; wherein the last M bits of the code values ​​of any two passenger images in the local database are different.

[0017] Optionally, the storage unit is also used to: identify the color of the top, pants, hat, shoes, height-to-shoulder-width ratio, and human body contour features from the passenger image, wherein the first type of features includes the color of the pants, shoes, height-to-shoulder-width ratio, top, and hat; the second type of features includes human body contour features and image features of the passenger image; necessary features include the color of the pants, shoes, and height-to-shoulder-width ratio; and non-necessary features include the color of the top and hat.

[0018] Optionally, the matching unit is further configured to: determine the target gate where the second image acquisition is located, and obtain the queue of the target gate, wherein the queue stores data encoding records from a local database; if there is a first data encoding record in the queue whose necessary features match the target passenger in the monitoring image, obtain the encoding value of the first N bits of the first data encoding record; if the encoding value of the first N bits of the first data encoding record is a first preset value, determine that the passenger image of the first data encoding record is the passenger image of the target passenger; if the encoding value of the first N bits of the first data encoding record is a second preset value, compare the unnecessary features of the target passenger in the monitoring image with the unnecessary features in the first data encoding record; if the unnecessary features of the target passenger in the monitoring image match the unnecessary features in the first data encoding record, determine that the passenger image of the first data encoding record is the passenger image of the target passenger.

[0019] Optionally, the matching unit is also used to: before obtaining the queue of the target gate, for each data encoding record in the local database, calculate the walking time t1 required for the passenger to reach the gate based on the distance L between the passenger's position and the gate and the passenger's speed S in the data encoding record; estimate the time t = t0 + t1 for the passenger to arrive at the gate based on the timestamp t0 and walking time t1 in the data encoding record; maintain a queue for each gate, and store multiple data encoding records in the queue, wherein the absolute value of the difference between the time t for the passenger to arrive at the gate and the current time T in the data encoding records stored in the queue is less than or equal to a preset duration, and the multiple data encoding records are arranged in the queue in ascending order of the absolute value of the difference.

[0020] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium including a stored program that executes the above-described method when the program is run.

[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the above-described method through the computer program.

[0022] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the embodiments of the methods described above.

[0023] In this embodiment, a ticket vending machine (TVM) collects passenger images while distributing tickets, and a first image acquisition device is deployed within the target station where the TVM is located. The passenger images collected by the TVM and the first image acquisition device are stored in a local database at the target station, where images that have reached a set validity period are deleted. A second image acquisition device collects surveillance images at a preset distance from the entrance of the automatic ticket gate (AGM). Based on the surveillance images collected by the second image acquisition device, a passenger image of the target passenger is matched from the local database; the target passenger is the passenger in the surveillance image. The matched passenger image is used to authenticate the target passenger, and upon successful authentication, the AGM is controlled to allow the target passenger to pass. By fusing high-resolution passenger images and low-resolution surveillance images, authentication can be completed before the passenger reaches the gate, eliminating the need to wait for authentication at the gate and solving the technical problem of slow passenger flow at the gate. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0025] Figure 1 This is a schematic diagram of an optional automatic ticket checking system according to an embodiment of this application;

[0026] Figure 2 This is a flowchart of an optional automatic ticket checking method according to an embodiment of this application;

[0027] Figure 3 This is a schematic diagram of an optional automatic ticket checking device according to an embodiment of this application; and,

[0028] Figure 4 This is a structural block diagram of a terminal according to an embodiment of this application. Detailed Implementation

[0029] According to one aspect of the embodiments of this application, an embodiment of an automatic ticket checking system is provided. For example... Figure 1 As shown, it includes:

[0030] TVM 101 is an automatic ticket vending machine used to capture passenger images during the process of providing tickets to passengers.

[0031] An automatic ticket vending machine (TVM) consists of modules such as a single-journey ticket issuing unit, a coin processing unit, a banknote recognition and change dispensing unit, a passenger ticket printer, a passenger display touchscreen, an operating status display screen, a recharge card slot, a maintenance display screen, a power module, a main control unit, a ticket reader / writer, and a QR code reader. The TVM is placed in the non-paid area of ​​the station and features coin recognition and change dispensing, banknote recognition and change dispensing, QR code scanning payment, and facial recognition payment.

[0032] The first image acquisition device 102 is deployed in the target station where the automatic ticket vending machine TVM is located, and is used to acquire passenger images of passing passengers.

[0033] Local database 103 is used to store passenger images captured by the automatic ticket vending machine TVM and passenger images captured by the first image acquisition device at the target station.

[0034] The automatic ticket gate (AGM) 104 and the second image acquisition device 105 used in conjunction with it are used to acquire monitoring images at a preset distance (e.g., 10 meters) from the entrance of the automatic ticket gate (AGM).

[0035] An automatic ticket gate (AGM) consists of a single-journey ticket collection unit, a passenger display screen, a maintenance display screen, a power module, a main control unit, a ticket reader / writer, and a QR code reader. It automatically checks tickets using contactless cards, QR codes, or facial recognition, enabling automatic passenger entry, exit, and payment.

[0036] Computer device 106 is connected to automatic ticket vending machine (TVM), local database, automatic ticket gate machine (AGM), first image acquisition device, and second image acquisition device. The computer device is used to match the passenger image of the target passenger from the local database based on the monitoring image acquired by the second image acquisition device, authenticate the target passenger using the matched passenger image (such as whether the passenger has purchased a ticket or can make a direct facial recognition payment), and control the automatic ticket gate machine (AGM) to allow the target passenger to pass after successful authentication. The computer device is also used to delete passenger images in the local database that have reached a set validity period. The target passenger is the passenger in the monitoring image.

[0037] Figure 2 This is a flowchart of an optional automatic ticket checking method according to an embodiment of this application, such as... Figure 2 As shown, the method may include the following steps:

[0038] Step S202: The automatic ticket vending machine (TVM) collects passenger images during the process of providing travel tickets, and the first image acquisition device is deployed in the target station where the automatic ticket vending machine (TVM) is located to collect passenger images of the passing passengers.

[0039] Step S204: Passenger images captured by the automatic ticket vending machine TVM and passenger images captured by the first image acquisition device are stored in the local database of the target station. Passenger images that have reached the set validity period in the local database will be deleted.

[0040] In the above scheme, artificial intelligence algorithms can be used to segment passenger images of human body contour regions from the original images collected by the automatic ticket vending machine (TVM) and the original images collected by the first image acquisition device; multiple features are identified from the passenger images, and these features are divided into first-class features (i.e., complex features) and second-class features (i.e., simple features) according to their complexity from low to high. The first-class features include necessary features and unnecessary features. Necessary features are features that will not change during the ride, while unnecessary features are features that may change during the ride; a unique passenger code is generated for each passenger in the passenger image; and the data encoding record generated for the passenger code, including multiple features, passenger image, timestamp, and passenger location, is saved to a local database.

[0041] The aforementioned features include the color of the top, the color of the pants, the color of the hat, the color of the shoes, the height-to-shoulder-width ratio, and human body contour features. Among them, the first category of features includes the color of the pants, the color of the shoes, the height-to-shoulder-width ratio, the color of the top, and the color of the hat. The second category of features includes human body contour features and image features of the passenger image. The necessary features include the color of the pants, the color of the shoes, and the height-to-shoulder-width ratio, while the non-necessary features include the color of the top and the color of the hat.

[0042] It should be noted that if the necessary features of the passenger image to be saved are different from the necessary features of passenger images in the local database, the first N bits of the passenger code of the passenger image to be saved are set to a first preset value, and the last M bits are generated. The first preset value is used to indicate that the necessary features of the corresponding passenger image are unique in the local database, and the positive integer N is less than the positive integer M. If the necessary features and at least one non-necessary feature of the passenger image to be saved are different from the necessary features and corresponding non-necessary features of passenger images in the local database, the first N bits of the passenger code of the passenger image to be saved are set to a second preset value, and the last M bits are generated. The second preset value is used to indicate that the necessary features and at least one non-necessary feature of the corresponding passenger image are unique in the local database. The last M bits of the code values ​​of any two passenger images in the local database are different.

[0043] Step S206: Use the second image acquisition device to acquire monitoring images at a preset distance from the entrance of the automatic ticket gate (AGM), such as when the distance to the gate is 10 meters.

[0044] Step S208: Match the passenger image of the target passenger from the local database based on the monitoring image acquired by the second image acquisition device. The target passenger is the passenger in the monitoring image.

[0045] For each data encoding record in the local database, calculate the walking time t1 required for the passenger to reach the gate based on the distance L between the passenger's location and the gate and the passenger's speed S in the data encoding record; estimate the passenger's arrival time at the gate t = t0 + t1 based on the timestamp t0 in the data encoding record and the walking time t1; maintain a queue for each gate, storing multiple data encoding records in the queue, wherein the absolute value of the difference between the passenger's arrival time t and the current time T in the data encoding records stored in the queue is less than or equal to a preset duration, and the multiple data encoding records are arranged in the queue in ascending order of the absolute value of the difference.

[0046] In the above scheme: First, the target gate where the second image is acquired can be determined, and the queue of the target gate can be obtained. The queue stores data encoding records from the local database. If there is a first data encoding record in the queue whose necessary features match the target passenger in the monitoring image, the encoding value of the first N bits of the first data encoding record can be obtained. If the encoding value of the first N bits of the first data encoding record is a first preset value, the passenger image of the first data encoding record is determined to be the passenger image of the target passenger. If the encoding value of the first N bits of the first data encoding record is a second preset value, the non-essential features of the target passenger in the monitoring image are compared with the non-essential features in the first data encoding record. If the non-essential features of the target passenger in the monitoring image match the non-essential features in the first data encoding record, the passenger image of the first data encoding record is determined to be the passenger image of the target passenger.

[0047] Step S210: Authenticate the target passenger using the matched passenger image, and control the automatic ticket gate (AGM) to allow the target passenger to pass after successful authentication.

[0048] Through the above steps, the TVM (Ticket Vending Machine) collects passenger images while distributing tickets, and a first image acquisition device (deployed within the target station where the TVM is located) captures images of passing passengers. The passenger images captured by the TVM and the first image acquisition device are stored in a local database at the target station, where images reaching a set validity period are deleted. A second image acquisition device captures surveillance images at a preset distance from the entrance of the AGM (Automatic Ticket Gate). Based on the surveillance images captured by the second image acquisition device, the target passenger's image is matched against the local database. The target passenger is the passenger in the surveillance image. The matched passenger image is used to authenticate the target passenger, and upon successful authentication, the AGM releases the target passenger. By fusing high-resolution passenger images and low-resolution surveillance images, authentication can be completed before passengers reach the gate, eliminating the need to wait for authentication at the gate and solving the technical problem of slow passenger flow at the gate.

[0049] As an optional embodiment, the technical solution of this application is further described in detail below with reference to specific embodiments:

[0050] Step 1: As passengers continue to enter the station, high-definition cameras at the entrance capture surveillance images.

[0051] The acquired images were processed as follows:

[0052] 1) Use artificial intelligence to segment passenger images of human body areas from complete surveillance images.

[0053] 1.1) Data preparation: Collect a dataset of images containing human bodies and label these images by assigning a category label to each pixel, for example, the human body area is the foreground (human body) category and other areas are the background category.

[0054] 1.2) Constructing a semantic segmentation model: Select a suitable deep learning model (such as U-Net, Mask R-CNN, DeepLab, etc.) for semantic segmentation. These models usually consist of an encoder and a decoder, which are used to extract image features and generate segmentation results.

[0055] The encoder is responsible for extracting high-level semantic features from the input image. It consists of multiple convolutional and pooling layers, which gradually reduce the size and number of channels of the feature map. Through this layer-by-layer reduction, the encoder can capture the global contextual information of the image and extract important features. The decoder is responsible for converting the feature map extracted by the encoder into a segmentation result of the same size as the input image. It consists of upsampling and convolutional layers, which gradually restore the size and number of channels of the feature map. The role of the decoder is to remap the abstract features extracted by the encoder back to the original image space and generate pixel-level segmentation results.

[0056] Between the encoder and decoder, there is also a connection path to pass low-level features from the encoder to the decoder to help recover detailed information. This connection path can be implemented through skip connections, such as in the U-Net model, where the feature map in the encoder is concatenated with the corresponding layer feature map in the decoder.

[0057] By using the encoder and decoder structure, the semantic segmentation model can simultaneously consider the global contextual information and local detail information of the image, thereby classifying each pixel in the image more accurately and achieving precise segmentation results.

[0058] 1.3) Data Preprocessing: Image data is preprocessed, including resizing, normalization, and cropping. Preprocessing helps improve the performance and robustness of the model.

[0059] Resizing: First, the original image is resized to a fixed size. Considering the primary purpose of image processing in this application is face recognition (payment or authentication), high resolution is required. The specific size can be determined based on the actual scenario, for example, fixing the height-to-width ratio (e.g., 5:1, 6:1, etc.) and the resolution (e.g., 5000*1000, 6000*1000, etc.). Additionally, this image also needs to meet the size requirements of the deep learning model for input images.

[0060] Normalization: Normalizing an image makes it easier for the model to learn and converge. This can be achieved by scaling the pixel values ​​of an image to between 0 and 1, or by standardizing the image using the mean and standard deviation. Normalization can also be done by dividing each pixel value by 255 (if the pixel value is an 8-bit unsigned integer).

[0061] Cropping or Filling: After resizing, the image size may not match the model's input requirements. If the image size is smaller than the model's required size, you can choose to fill the image to the specified size. Filling usually uses zero fill or fills according to the image content. If the image size is larger than the model's required size, you can choose to crop the image to the specified size.

[0062] Channel adjustment: Depending on the model's input requirements, the channel order of the image needs to be adjusted. For example, if the model requires the input channel order to be RGB, but the image channel order is BGR, then the image channel order needs to be adjusted.

[0063] Data type conversion: Convert the image data type to the data type required by the model. Deep learning models require the input to be a floating-point number, so the image data type needs to be converted to a floating-point number.

[0064] These data preprocessing steps can be adjusted and combined according to specific application requirements. The goal of preprocessing is to match the input data with the model's requirements and provide better data quality and consistency to improve the model's performance and robustness.

[0065] 1.4) Data augmentation: To increase the diversity of data and the generalization ability of the model, data augmentation techniques can be applied, such as random rotation, flipping, scaling, etc.

[0066] Considering that this application is applied to a specific scenario, the above-mentioned random rotation, flipping, and scaling are all performed within a specific range. The face image after rotation, scaling, and flipping still needs to meet the requirements of face recognition.

[0067] Flip: Flip an image horizontally or vertically. This can be achieved by mirroring the image. Horizontal flip means flipping the image left and right, while vertical flip means flipping the image up and down. This transformation can handle situations where the left and right relationships of objects in the image remain unchanged.

[0068] Rotation: Rotate the image by a random angle (for example, a frontal view of a person, the maximum rotation angle is ±30°). Rotation can make the model more robust to rotation invariance.

[0069] Scaling: Scaling the image at random ratios. Scaling can make the model scale invariant. For example, the scaling ratio can be any ratio between 0.8 and 1.2.

[0070] Translation: Randomly translate the image horizontally and vertically. Translation can make the model position invariant. The range of translation can be a certain proportion of the image width and height.

[0071] Brightness Adjustment: Randomly adjusts the brightness of an image, which can be achieved by adjusting the pixel values ​​of the image, such as increasing or decreasing the brightness value of each pixel.

[0072] Color adjustment: Randomly adjusting the colors of an image, such as contrast, saturation, and hue. This can be achieved by modifying the image's color space, such as the HSV space.

[0073] Noise addition: Adding random noise, such as Gaussian noise or salt and pepper noise, to the image can make the model more robust to noise and interference.

[0074] The above are just some illustrative data augmentation operations. In practical applications, appropriate augmentation methods can be selected according to the specific situation and the characteristics of the dataset. The goal of data augmentation is to generate more diverse training samples through random transformations and augmentation operations, thereby improving the model's generalization ability and robustness, and thus improving the model's performance in real-world scenarios.

[0075] 1.5) Model Training: The semantic segmentation model is trained using the prepared dataset. During training, the model's weights and parameters are updated using the backpropagation algorithm by comparing the model's output with the labels, so as to gradually improve the model's accuracy.

[0076] Then, the collected surveillance images are input into the trained model to identify human body contours. It should be noted that any image may include more than one human body contour.

[0077] Extract passenger images corresponding to the human body contours from the original surveillance images.

[0078] 2) Record passenger features from passenger images.

[0079] Identify the colors of the passenger's shirt, pants, hat, and shoes, as well as the height-to-shoulder-width ratio and human body contour features (i.e., the ring around the edge of the human body used to identify body shape) from the passenger image, and enter the above data into the local database in a specified manner.

[0080] The data encoding records are as follows: passenger code - trouser color - shoe color - height to shoulder width ratio - shirt color - hat color - human body contour features - image features of passenger image - timestamp - location (the location can be replaced by the ID of the image acquisition device, because the location of the image acquisition device is fixed and can also be used to represent the location). Each data encoding record has a valid duration, such as 1 hour, to avoid the database becoming too large.

[0081] It should be noted that the above passenger features are divided into two categories: complex (human body contour features, image features of passenger images) and simple (other features). The simple features are further divided into two subcategories: one is necessary features, which are features that will not change during the passenger's journey, such as the color of pants, the color of shoes, and the ratio of height to shoulder width; the other is non-necessary features, which are features that may change during the passenger's journey, such as the color of the top and the color of the hat.

[0082] For a passenger image, if its essential features are unique in the local database, a first preset value can be set for the first N bits of its encoding (to indicate that its essential features are unique in the local database); if its essential features plus at least one non-essential feature are unique in the local database, a second preset value can be set for the first N bits of its encoding (to indicate the aforementioned uniqueness).

[0083] For example: if its essential feature is unique in the local database, the first three digits are 000; if its essential feature plus the color of the top is unique in the local database, the first three digits are 001; if its essential feature plus the color of the hat is unique in the local database, the first three digits are 010; if its essential feature plus all non-essential features is unique in the local database, the first three digits are 011.

[0084] The above coding method allows for quick identification of passengers during subsequent passenger recognition processes, reducing identification time.

[0085] Step 2: After passengers enter the station, high-definition cameras (such as those at passageways, security checkpoints, and automatic ticket vending machines) are used to capture surveillance images.

[0086] The specific implementation method is similar to step 1. The following focuses on describing the differences from step 1.

[0087] For passenger images already existing in the local database, denoted as passenger image 1, and for passenger images newly acquired in step 2, denoted as passenger image 2, during the process of identifying passenger features for passenger image 2 (before storing it in the local database), the passenger features of passenger image 2 are matched with the data encoding of passenger image 1 already existing in the local database:

[0088] 1) Identify the necessary features of passenger image 2 (passenger code, trouser color, shoe color, height to shoulder width ratio).

[0089] 2) Perform necessary feature matching in the local database.

[0090] If a matching passenger image 1 exists in the local database, and the first N bits of the encoding of passenger image 1 are the first preset value, it means that its essential features are unique in the local database. That is, the passenger in passenger image 2 is the same person as the passenger in passenger image 1. At this time, the clarity and fit of passenger image 2 and passenger image 1 can be compared (to indicate the fit with the facial recognition payment and verification scenario), and one of the more suitable images can be saved to the data encoding record. At the same time, its timestamp and position can be updated (i.e., if the image in the data encoding record changes).

[0091] It should be noted that, in order to increase security and improve matching accuracy, in addition to the above, matching of human body contour features can be added. If the match is consistent, the above merging operation can then be performed.

[0092] If a matching passenger image 1 does not exist in the local database, a data encoding record is generated for passenger image 2 in the manner described above and saved to the local database.

[0093] 3) Perform matching of necessary features and non-necessary features in the local database.

[0094] If a matching passenger image 1 exists in the local database, and the first N bits of the encoding of passenger image 1 are the second preset value, it means that its necessary feature plus at least one non-necessary feature is unique in the local database. Then, continue comparing its non-necessary features. If the corresponding non-necessary features also match, considering that the passenger corresponding to the second preset value (necessary feature + at least one non-necessary feature) is unique in the local database, it means that the passenger in passenger image 2 is the same person as the passenger in passenger image 1. At this point, the clarity and fit of passenger image 2 and passenger image 1 can be compared, and the more suitable one can be saved to the data encoding record. Simultaneously, its timestamp and location can be updated.

[0095] Continuing with the previous example, if the first three digits of passenger image 1 are 000, then its feature combination is the necessary feature + the color of the upper garment. At this point, it is also necessary to identify the non-necessary feature of the color of the upper garment. If they are the same, it means that it is the same passenger.

[0096] The identification method for other types of necessary feature + non-necessary feature combinations is the same, and will not be repeated here.

[0097] It should be noted that, in order to increase security and improve matching accuracy, in addition to the above, matching of human body contour features can be added. If the match is consistent, the above merging operation can then be performed.

[0098] If non-essential features do not match, considering that users may remove their shirts or hats in scenarios such as the subway, although there is no match, there is still a possibility that the user may be the same as a passenger in the local database. In this case, we continue with subsequent steps to match image features.

[0099] 4) Perform image feature matching of passenger images in the local database.

[0100] The image feature matching mentioned above mainly refers to the matching of facial features.

[0101] First, face detection is performed to locate the faces in passenger image 2 (the faces in passenger image 1 in the local database have all been located). This can be achieved using a cascaded classifier based on Haar features or a face detection algorithm based on deep learning (such as MTCNN, SSD, etc.).

[0102] Then, face alignment is performed. For the detected faces, face alignment is performed to adjust the faces to a uniform pose and size. For example, alignment algorithms based on key points (such as face key point localization) and alignment algorithms based on geometric transformations can be used to achieve this.

[0103] Then feature extraction is performed, extracting feature representations from the aligned face images, such as using Local Binary Patterns (LBP), face feature standardization (such as Eigenfaces, Fisherfaces), and deep learning methods (such as feature extraction based on convolutional neural networks).

[0104] The facial features of passenger image 2 are matched with those of passenger image 1 in the local database. The facial features extracted from the two images are compared and matched, such as by calculating Euclidean distance, cosine similarity, etc.

[0105] Finally, the similarity is determined. Based on the result of feature matching, it is determined whether the faces in the two images are the same. A threshold can be set. When the similarity of feature matching exceeds the threshold, it is determined to be the same face; otherwise, it is not.

[0106] If a match is found, meaning the passenger in passenger image 2 is the same person as the passenger in passenger image 1, then the clarity and fit of passenger image 2 and passenger image 1 can be compared. The more suitable one can be saved to the data encoding record, and its timestamp and position can be updated (i.e., if the image in the data encoding record changes).

[0107] If a matching passenger image 1 does not exist in the local database, a data encoding record is generated for passenger image 2 in the manner described above and saved to the local database.

[0108] It should be noted that the images captured on the automatic ticket vending machine (TVM) in step 2 are highly suitable and clear, considering that many passengers will use facial recognition for payment. The images saved in this scenario will be very beneficial for subsequent use.

[0109] Step 3: During the process of passengers passing through the gate, facial recognition is performed by combining the gate's camera and database. The database here includes two parts: one is the local database mentioned above, and the other is an online database (which can be understood as a database connected to a public platform that provides legitimate facial images).

[0110] There are various ways to verify tickets at the automatic ticket gate (AGM), such as QR code, facial recognition, NFC, and physical card.

[0111] For users purchasing single-journey tickets at the TVM (Ticket Vending Machine), they can choose to use facial recognition instead of a physical card, which will significantly reduce subway operating costs. Passengers traveling together using mobile phone QR codes, NFC, etc., can also use facial recognition through their mobile phone settings. This solution mainly involves how to integrate images collected by cameras throughout the subway platform to help users quickly pass through the turnstiles; therefore, this will be the main focus of the subsequent discussion.

[0112] This solution is applicable to various gate access scenarios. Firstly, the cameras installed on the gates have low resolution (in existing technology, passengers need to be close to the camera and facing it directly for accurate recognition). Secondly, multiple people cannot pass through a single gate simultaneously (in existing technology, only one passenger can pass through a gate at a time, and there needs to be a waiting interval between passengers). Thirdly, the gates do not have individual cameras installed on each gate, but only one camera is installed above the gate facing both the entry and exit directions. Hereinafter, these three scenarios will all be referred to as gate cameras.

[0113] 1) When the passenger is far away (i.e., more than a certain distance threshold, such as 10 meters), the passenger image (denoted as passenger image 3) is collected. The segmented passenger image 3 here is one or more (depending on the number of human bodies that can be completely segmented from the actual original image). The following description uses an example of one passenger image 3.

[0114] 2) Identify the necessary features of passenger image 3 (passenger code, trouser color, shoe color, height to shoulder width ratio).

[0115] It should be noted that passenger image matching can be performed in the following manner:

[0116] First, sort the data encoding records in the database.

[0117] For each data encoding record in the local database, the required walking time t1 to reach the gate is calculated based on the distance L between the record's location and each gate, and the passenger's speed S. Thus, the arrival time t = t0 + t1 can be estimated based on the timestamps t0 and t1 in the record. If there are multiple gates, then each data encoding record stores multiple t.

[0118] The passenger speed mentioned above has a default value. If a passenger is captured in multiple images, the S value can be calculated based on the distance between the shooting positions of two images and the shooting time interval.

[0119] Maintain a queue for each gate. This queue stores several data encoding records. Specifically, with the current time T as the center, obtain all data encoding records within a certain time period (such as 5 minutes) before and after the current time, and sort them in ascending order according to the value of |tT|.

[0120] For each gate, when retrieving data from the database, it is read in the order of the queue from front to back, which can improve its accuracy.

[0121] 3) Perform necessary feature matching in the local database. In practice, the matching is first performed in the queue of this gate. If no match is found, the matching is then performed in the entire local database. Considering that the data in the queue comes from the local database, it will be uniformly represented by the database in the future.

[0122] If a passenger image 1 with matching necessary features exists in the local database, and the first N bits of the encoding of passenger image 1 are the first preset value, it means that its necessary features are unique in the local database. That is, the passenger in passenger image 3 is the same person as the passenger in passenger image 1. Considering that the clarity of passenger image 3 is poor (due to shooting distance, camera quality, etc.), it is still sufficient to verify who it is. However, the quality of passenger image 1 is much higher than that of passenger image 3. In this case, passenger image 1 can be directly used as the passenger's proof of passage through the gate (such as proof of payment, electronic ticket, etc.). In this way, the gate can be opened in advance, allowing passengers to pass through without noticing.

[0123] It should be noted that, in addition to the above, to increase security and improve matching accuracy, matching of human body contour features can be added. If a match is found, the process can then proceed.

[0124] In addition, for security reasons, after verifying the user's identity in the above manner, a photo can be taken when the passenger passes through the gate. Since the photo is taken at close range, the clarity is acceptable and it can be used for secondary verification of the user's identity. However, this verification process will not affect the user traveling together.

[0125] It should be noted that if the verification fails, the previous deductions will be rolled back, and relevant information will be sent to the actual passengers traveling together to remind them of the deductions.

[0126] If the passenger image 1 with the necessary feature matching does not exist in the local database, a match is made in the online database, and the corresponding authentication operations (such as identity recognition and deduction) are performed before the passenger is allowed to pass through the gate.

[0127] 4) Perform matching of necessary features and non-necessary features in the local database.

[0128] If a passenger image 1 with the necessary features exists in the local database, and the first N bits of the passenger image 1 are encoded with the second preset value, then it means that its necessary features plus at least one non-necessary feature are unique in the local database.

[0129] At this point, we continue to compare its non-essential features. If the corresponding non-essential features also match, considering that the passenger corresponding to the second preset value (essential features + at least one non-essential feature) is unique in the local database, it means that the passenger in passenger image 3 is the same person as the passenger in passenger image 1.

[0130] Considering that passenger image 3 has poor clarity but is sufficient to identify the passenger, while passenger image 1 is of much higher quality than passenger image 3, passenger image 1 can be directly used as the passenger's pass-through credential (such as for fare deduction or electronic ticket verification). This allows the gate to be opened in advance, enabling passengers to pass through seamlessly.

[0131] For example, if the first three digits of passenger image 1 are 000, then its feature combination is the necessary feature + the color of the upper garment. At this point, it is also necessary to identify the non-necessary feature of the color of the upper garment. If they are the same, it means that it is the same passenger.

[0132] The identification method for other types of necessary feature + non-necessary feature combinations is the same, and will not be repeated here.

[0133] It should be noted that, in order to increase security and improve the accuracy of matching, in addition to the above, matching of human body contour features can be added. If the match is consistent, the above release operation can then be performed.

[0134] If non-essential features do not match, considering that users may remove their shirts or hats in scenarios such as the subway, although there is no match, there is still a possibility that the user may be the same as a passenger in the local database. In this case, we continue with subsequent steps to match image features.

[0135] In addition, for security reasons, after verifying the user's identity in the above manner, a photo can be taken when the passenger passes through the gate. Since the photo is taken at close range, the clarity is acceptable and it can be used for secondary verification of the user's identity. However, this verification process will not affect the user traveling together.

[0136] It should be noted that if the verification fails, the previous deductions will be rolled back, and relevant information will be sent to the actual passengers traveling together to remind them of the deductions.

[0137] 5) Perform image feature matching of passenger images in the local database.

[0138] The image feature matching mentioned above mainly refers to the matching of facial features.

[0139] First, face detection is performed to locate the faces in passenger image 3 (the faces in passenger image 1 in the local database have all been located). This can be achieved using a cascaded classifier based on Haar features or a face detection algorithm based on deep learning (such as MTCNN, SSD, etc.).

[0140] Then, face alignment is performed. For the detected faces, face alignment is performed to adjust the faces to a uniform pose and size. For example, alignment algorithms based on key points (such as face key point localization) and alignment algorithms based on geometric transformations can be used to achieve this.

[0141] Then feature extraction is performed, extracting feature representations from the aligned face images, such as using Local Binary Patterns (LBP), face feature standardization (such as Eigenfaces, Fisherfaces), and deep learning methods (such as feature extraction based on convolutional neural networks).

[0142] The facial features of passenger image 3 are matched with those of passenger image 1 in the local database. The facial features extracted from the two images are compared and matched, such as by calculating Euclidean distance, cosine similarity, etc.

[0143] Finally, the similarity is determined. Based on the result of feature matching, it is determined whether the faces in the two images are the same. A threshold can be set. When the similarity of feature matching exceeds the threshold, it is determined to be the same face; otherwise, it is not.

[0144] If a match is found, meaning the passenger in passenger image 3 is the same person as the passenger in passenger image 1, considering that passenger image 3 has lower resolution but is still sufficient to identify the person, while passenger image 1 is of much higher quality, passenger image 1 can be directly used as the passenger's pass-through credential (e.g., for fare deduction, electronic ticketing, etc.). This allows the gate to be opened in advance, enabling passengers to pass through seamlessly.

[0145] It should be noted that, in order to increase security and improve the accuracy of matching, in addition to the above, matching of human body contour features can be added. If the match is consistent, the above release operation can then be performed.

[0146] In addition, for security reasons, after verifying the user's identity in the above manner, a photo can be taken when the passenger passes through the gate. Since the photo is taken at close range, the clarity is acceptable and it can be used for secondary verification of the user's identity. However, this verification process will not affect the user traveling together.

[0147] It should be noted that if the verification fails, the previous deductions will be rolled back, and relevant information will be sent to the actual passengers traveling together to remind them of the deductions.

[0148] If a matching passenger image 1 is not found in the local database, a match is made in the online database, and the corresponding authentication operations (such as identity verification and deduction) are performed before allowing passage through the gate.

[0149] The technical solution adopted in this application has the following advantages: 1) It saves costs, as cameras do not need to be installed on the turnstiles; instead, a monitoring camera above the turnstile can be used. Alternatively, the turnstile can use only a low-cost camera, and security can be guaranteed. 2) It adopts a specially designed data structure, which avoids passenger identification under complex image processing conditions, significantly reduces the requirements for related equipment, reduces processing time, and improves data processing efficiency. 3) Passengers can walk together seamlessly, greatly improving the ability to travel together in crowded scenarios such as subways, trains, and airplanes.

[0150] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0152] According to another aspect of the embodiments of this application, an automatic ticket checking device for implementing the above-described automatic ticket checking method is also provided. Figure 3 This is a schematic diagram of an optional automatic ticket checking device according to an embodiment of this application, as shown below. Figure 3 As shown, the device may include:

[0153] The first acquisition unit 31 is used to acquire passenger images during the process of providing tickets using the automatic ticket vending machine TVM, and to acquire passenger images of passing passengers using the first image acquisition device, wherein the first image acquisition device is deployed in the target station where the automatic ticket vending machine TVM is located.

[0154] Storage unit 33 is used to store passenger images collected by automatic ticket vending machine TVM and passenger images collected by first image acquisition device in the local database of the target station, wherein passenger images that have reached a set validity period in the local database will be deleted;

[0155] The second acquisition unit 35 is used to acquire monitoring images at a preset distance from the entrance of the automatic ticket gate (AGM) using the second image acquisition device;

[0156] The matching unit 37 is used to match the passenger image of the target passenger from the local database based on the monitoring image acquired by the second image acquisition device, wherein the target passenger is the passenger in the monitoring image;

[0157] The control unit 39 is used to authenticate the target passenger using the matched passenger image, and after successful authentication, controls the automatic ticket gate (AGM) to allow the target passenger to pass.

[0158] The above modules utilize a Ticket Vending Machine (TVM) to collect passenger images while distributing tickets, and a first image acquisition device (deployed within the target station where the TVM is located) to capture images of passing passengers. The passenger images captured by both the TVM and the first image acquisition device are stored in a local database at the target station, where images reaching a set validity period are deleted. A second image acquisition device captures surveillance images at a preset distance from the entrance of the Automatic Ticket Gate (AGM). Based on the surveillance images captured by the second image acquisition device, the system matches the target passenger's image from the local database. The target passenger is the passenger in the surveillance image. The matched passenger image is used to authenticate the target passenger, and upon successful authentication, the AGM releases the target passenger. By fusing high-resolution passenger images and low-resolution surveillance images, authentication can be completed before passengers reach the gate, eliminating the need to wait for authentication at the gate and solving the technical problem of slow passenger flow at the gate.

[0159] Optionally, the storage unit is also used to: segment passenger images of human body contour regions from the original images captured by the automatic ticket vending machine TVM and the original images captured by the first image acquisition device using artificial intelligence algorithms; identify multiple features from the passenger images, wherein the multiple features are divided into first-class features and second-class features according to their complexity from low to high, the first-class features include necessary features and unnecessary features, necessary features are features that will not change during the ride, and unnecessary features are features that may change during the ride; generate a unique passenger code for the passenger in the passenger image; and save the data encoding record generated for the passenger code, including multiple features, passenger image, timestamp, and passenger location, to the local database.

[0160] Optionally, the storage unit is further configured to: if the necessary features of the passenger image to be saved are different from the necessary features of the passenger images in the local database, then set the first N bits of the passenger code of the passenger image to be saved to a first preset value and generate the last M bits, wherein the first preset value is used to indicate that the necessary features of the corresponding passenger image are unique in the local database, and the positive integer N is less than the positive integer M; if the necessary features and at least one non-necessary feature of the passenger image to be saved are different from the necessary features and corresponding non-necessary features of the passenger images in the local database, then set the first N bits of the passenger code of the passenger image to be saved to a second preset value and generate the last M bits, wherein the second preset value is used to indicate that the necessary features and at least one non-necessary feature of the corresponding passenger image are unique in the local database; wherein the last M bits of the code values ​​of any two passenger images in the local database are different.

[0161] Optionally, the storage unit is also used to: identify the color of the top, pants, hat, shoes, height-to-shoulder-width ratio, and human body contour features from the passenger image, wherein the first type of features includes the color of the pants, shoes, height-to-shoulder-width ratio, top, and hat; the second type of features includes human body contour features and image features of the passenger image; necessary features include the color of the pants, shoes, and height-to-shoulder-width ratio; and non-necessary features include the color of the top and hat.

[0162] Optionally, the matching unit is further configured to: determine the target gate where the second image acquisition is located, and obtain the queue of the target gate, wherein the queue stores data encoding records from a local database; if there is a first data encoding record in the queue whose necessary features match the target passenger in the monitoring image, obtain the encoding value of the first N bits of the first data encoding record; if the encoding value of the first N bits of the first data encoding record is a first preset value, determine that the passenger image of the first data encoding record is the passenger image of the target passenger; if the encoding value of the first N bits of the first data encoding record is a second preset value, compare the unnecessary features of the target passenger in the monitoring image with the unnecessary features in the first data encoding record; if the unnecessary features of the target passenger in the monitoring image match the unnecessary features in the first data encoding record, determine that the passenger image of the first data encoding record is the passenger image of the target passenger.

[0163] Optionally, the matching unit is also used to: before obtaining the queue of the target gate, for each data encoding record in the local database, calculate the walking time t1 required for the passenger to reach the gate based on the distance L between the passenger's position and the gate and the passenger's speed S in the data encoding record; estimate the time t = t0 + t1 for the passenger to arrive at the gate based on the timestamp t0 and walking time t1 in the data encoding record; maintain a queue for each gate, and store multiple data encoding records in the queue, wherein the absolute value of the difference between the time t for the passenger to arrive at the gate and the current time T in the data encoding records stored in the queue is less than or equal to a preset duration, and the multiple data encoding records are arranged in the queue in ascending order of the absolute value of the difference.

[0164] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of the device, can run in a corresponding hardware environment, and can be implemented through software or hardware, wherein the hardware environment includes a network environment.

[0165] According to another aspect of the embodiments of this application, a server or terminal for implementing the above-described automatic ticket checking method is also provided.

[0166] Figure 4 This is a structural block diagram of a terminal according to an embodiment of this application, such as... Figure 4 As shown, the terminal may include: one or more ( Figure 4 Only one of the following is shown: processor 401, memory 403, and transmission device 405, as shown in the image. Figure 4 As shown, the terminal may also include input / output devices 407.

[0167] The memory 403 can be used to store software programs and modules, such as the program instructions / modules corresponding to the automatic ticket checking method and device in this embodiment. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 403, thereby realizing the aforementioned automatic ticket checking method. The memory 403 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 403 may further include memory remotely located relative to the processor 401, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0168] The aforementioned transmission device 405 is used to receive or send data via a network, and can also be used for data transfer between the processor and memory. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 405 includes a Network Interface Controller (NIC), which can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 405 is a radio frequency (RF) module used for wireless communication with the Internet.

[0169] Specifically, memory 403 is used to store application programs.

[0170] The processor 401 can invoke the application program stored in the memory 403 via the transmission device 405 to perform the following steps:

[0171] The system collects passenger images during the process of providing tickets using a TVM (Ticket Vending Machine). A first image acquisition device is deployed within the target station where the TVM is located. The passenger images collected by the TVM and the first image acquisition device are stored in a local database at the target station. Passenger images that have reached a set validity period in the local database are deleted. A second image acquisition device collects surveillance images at a preset distance from the entrance of an AGM (Automatic Ticket Gate Machine). Based on the surveillance images collected by the second image acquisition device, a passenger image of a target passenger is matched from the local database. The target passenger is the passenger in the surveillance images. The matched passenger image is used to authenticate the target passenger, and upon successful authentication, the AGM is controlled to allow the target passenger to pass.

[0172] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0173] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. The terminal can be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, the terminal may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.

[0174] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0175] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to execute program code for an automatic ticket checking method.

[0176] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.

[0177] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:

[0178] The system collects passenger images during the process of providing tickets using a TVM (Ticket Vending Machine). A first image acquisition device is deployed within the target station where the TVM is located. The passenger images collected by the TVM and the first image acquisition device are stored in a local database at the target station. Passenger images that have reached a set validity period in the local database are deleted. A second image acquisition device collects surveillance images at a preset distance from the entrance of an AGM (Automatic Ticket Gate Machine). Based on the surveillance images collected by the second image acquisition device, a passenger image of a target passenger is matched from the local database. The target passenger is the passenger in the surveillance images. The matched passenger image is used to authenticate the target passenger, and upon successful authentication, the AGM is controlled to allow the target passenger to pass.

[0179] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0180] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0181] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0182] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0183] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0184] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0185] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0186] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0187] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. An automatic ticket checking method, characterized in that, include: The automatic ticket vending machine (TVM) collects passenger images during the process of providing travel tickets, and a first image acquisition device collects passenger images of passing passengers, wherein the first image acquisition device is deployed in the target station where the automatic ticket vending machine (TVM) is located. The passenger images captured by the automatic ticket vending machine TVM and the passenger images captured by the first image acquisition device are stored in the local database of the target station, wherein passenger images that have reached a set validity period in the local database will be deleted; The second image acquisition device is used to acquire monitoring images at a preset distance from the entrance of the automatic ticket gate (AGM); The target passenger is matched with the passenger image in the local database based on the monitoring image captured by the second image acquisition device, wherein the target passenger is the passenger in the monitoring image; The target passenger is authenticated using the matched passenger image, and the automatic ticket gate (AGM) is controlled to allow the target passenger to pass after successful authentication. The passenger images captured by the automatic ticket vending machine (TVM) and the passenger images captured by the first image acquisition device are stored in the local database of the target station, including: Passenger images with human body contour regions are segmented from the original images captured by the automatic ticket vending machine (TVM) and the original images captured by the first image acquisition device using artificial intelligence algorithms; Multiple features are identified from passenger images. These features are divided into two categories based on their complexity, from low to high: first-class features and second-class features. The first-class features include necessary features and unnecessary features. Necessary features are those that will not change during the ride, while unnecessary features are those that may change during the ride. Generate a unique passenger code for each passenger in a passenger image; The data encoding records generated for the passenger, including the various features, passenger image, timestamp, and passenger location, are saved to the local database.

2. The method according to claim 1, characterized in that, Generate unique passenger codes for passengers in passenger images, including: If the necessary features of the passenger image to be saved are different from the necessary features of the passenger images in the local database, then the first N bits of the passenger code of the passenger image to be saved are set to a first preset value, and the last M bits are generated. The first preset value is used to indicate that the necessary features of the corresponding passenger image are unique in the local database, and the positive integer N is less than the positive integer M. If the necessary features and at least one unnecessary feature of the passenger image to be saved are different from the necessary features and corresponding unnecessary features of the passenger image in the local database, then the first N bits of the passenger code of the passenger image to be saved are set to a second preset value, and the last M bits are generated. The second preset value is used to indicate that the necessary features and at least one unnecessary feature of the corresponding passenger image are unique in the local database. In this context, the last M bits of the encoding values ​​for any two passenger images in the local database are different.

3. The method according to claim 1, characterized in that, Multiple features were identified from passenger images, including: The system identifies the colors of the passenger's clothing, pants, hat, shoes, height-to-shoulder-width ratio, and human body contour features from the passenger image. The first type of features includes the colors of the pants, shoes, height-to-shoulder-width ratio, clothing, and hat. The second type of features includes human body contour features and image features of the passenger image. The essential features include the colors of the pants, shoes, and height-to-shoulder-width ratio. The non-essential features include the colors of the clothing and hat.

4. The method according to claim 1, characterized in that, Based on the monitoring images captured by the second image acquisition device, passenger images of the target passenger are matched from the local database, including: The target gate where the second image acquisition is located is determined, and the queue of the target gate is obtained, wherein the queue stores data encoding records from the local database; If there is a first data encoding record in the queue that matches the necessary features of the target passenger in the surveillance image, obtain the encoding value of the first N bits of the first data encoding record; If the first N bits of the first data encoding record have a first preset value, the passenger image of the first data encoding record is determined to be the passenger image of the target passenger. When the encoding value of the first N bits of the first data encoding record is a second preset value, the unnecessary features of the target passenger in the monitoring image are compared with the unnecessary features in the first data encoding record; If the non-essential features of the target passenger in the surveillance image match the non-essential features in the first data encoding record, the passenger image in the first data encoding record is determined to be the passenger image of the target passenger.

5. The method according to claim 4, characterized in that, Before acquiring the queue of the target gate, the method further includes: For each data encoding record in the local database, the walking time t1 required for the passenger to reach the gate is calculated based on the distance L between the passenger's location and the gate and the passenger's speed S in the data encoding record. Based on the timestamp t0 and walking time t1 in the data encoding record, the estimated time for the passenger to arrive at the gate is t = t0 + t1. A queue is maintained for each gate, and multiple data encoding records are stored in the queue. The absolute value of the difference between the passenger's arrival time t and the current time T in the data encoding records stored in the queue is less than or equal to a preset duration. The multiple data encoding records are arranged in the queue in ascending order of the absolute value of the difference.

6. An automatic ticket checking device, characterized in that, include: The first acquisition unit is used to acquire passenger images during the process of providing tickets using the automatic ticket vending machine TVM, and to acquire passenger images of passing passengers using the first image acquisition device, wherein the first image acquisition device is deployed in the target station where the automatic ticket vending machine TVM is located. The storage unit is used to store the passenger images captured by the automatic ticket vending machine TVM and the passenger images captured by the first image acquisition device in the local database of the target station, wherein passenger images that have reached a set validity period in the local database will be deleted; The second acquisition unit is used to acquire monitoring images at a preset distance from the entrance of the automatic ticket gate (AGM) using the second image acquisition device; A matching unit is configured to match a passenger image of a target passenger from the local database based on a surveillance image captured by the second image acquisition device, wherein the target passenger is the passenger in the surveillance image; The control unit is used to authenticate the target passenger using the matched passenger image, and after successful authentication, control the automatic ticket gate (AGM) to allow the target passenger to pass. In the storage unit, passenger images captured by the automatic ticket vending machine (TVM) and passenger images captured by the first image acquisition device are stored in the local database of the target station, including: Passenger images with human body contour regions are segmented from the original images captured by the automatic ticket vending machine (TVM) and the original images captured by the first image acquisition device using artificial intelligence algorithms; Multiple features are identified from passenger images. These features are divided into two categories based on their complexity, from low to high: first-class features and second-class features. The first-class features include necessary features and unnecessary features. Necessary features are those that will not change during the ride, while unnecessary features are those that may change during the ride. Generate a unique passenger code for each passenger in a passenger image; The data encoding records generated for the passenger, including the various features, passenger image, timestamp, and passenger location, are saved to the local database.

7. A storage medium, characterized in that, The storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 5 when it is run.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the method described in any one of claims 1 to 5 through the computer program.