Subway passenger caching method based on image HOG feature vector

By arranging feature cameras and establishing hierarchical configuration files in the subway system, combining AVL trees and LevelDB to store passenger feature pictures, and using HOG and SHA-1 algorithms to achieve fast passenger trajectory restoration, the problems of low storage efficiency and slow retrieval speed of the subway passenger trajectory restoration system are solved, and the system performance is improved.

CN120407446APending Publication Date: 2025-08-01CHINA RAILWAY DESIGN GRP CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510378662.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing subway passenger track restoration system has low storage efficiency, slow retrieval speed, and large disk I/O overhead, especially in high concurrency scenarios.

Method used

The subway passenger caching method based on image HOG feature vector is adopted, and the feature acquisition camera is arranged, the hierarchical subway network configuration files are established, and the passenger feature pictures are stored using AVL trees and LevelDB, and the HOG feature extraction and SHA-1 hashing algorithm are used to perform fast image matching.

Benefits of technology

It improves the efficiency of passenger track restoration and invisible payment, reduces the number of disk I/O times, shortens the response time in high concurrent scenarios, and improves image search efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407446A_ABST
    Figure CN120407446A_ABST
Patent Text Reader

Abstract

The invention discloses a subway passenger caching method based on an image HOG feature vector. The method comprises the following steps: arranging a feature acquisition camera; establishing a subway network configuration file hierarchically; performing cache structure initialization; and performing one-frame caching on the captured passengers based on initialization of a cache structure. According to the subway passenger cache structure based on the image HASH algorithm, the arrival time of each passenger captured by the feature camera of each entrance and the feature picture of the passenger during arrival are cached, and when the passenger leaves the station, the arrival image closest to the departure image is quickly retrieved, so that passenger track restoration is realized. As time goes on and the number of the cameras increases, the response time of the subway passenger cache structure based on the image HASH algorithm in a high-concurrency scene is remarkably shortened, the number of disk I / O times caused by picture storage and loading is reduced, the picture search efficiency is improved, and therefore the passenger track restoration and non-inductive payment efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of subway passenger buffer structure design, and particularly relates to a subway passenger buffering method based on image HOG feature vectors. Background Art

[0002] When realizing contactless payment, it is necessary to quickly determine the trajectory and boarding time of each passenger. The existing restoration of subway passenger trajectories usually relies on traditional conventional file systems to store passenger entry and exit images. These systems directly save each frame of the image to the file system and perform image comparison and passenger trajectory restoration by traversing the image files in the file system.

[0003] The defects of the current technology are as follows:

[0004] Firstly, the storage efficiency is low: as the number of cameras increases, the number of image files in the file system increases sharply, resulting in a decline in storage and retrieval efficiency.

[0005] Secondly, the retrieval speed is slow: due to the linear storage structure of the file system, the time complexity of retrieving a specific image is relatively high, especially in a large-scale subway network, the retrieval time will increase significantly.

[0006] Thirdly, the disk I / O overhead is large: frequent disk read and write operations lead to a decline in system performance, especially in a high-concurrency scenario, the system response time becomes longer. Summary of the Invention

[0007] The present invention is proposed to solve the problems existing in the prior art, and its purpose is to provide a subway passenger buffering method based on image HOG feature vectors.

[0008] The technical solution of the present invention is: a subway passenger buffering method based on image HOG feature vectors, including the following steps:

[0009] A. Arrange feature acquisition cameras;

[0010] B. Hierarchically establish a subway network configuration file;

[0011] C. Initialize the buffer structure;

[0012] D. Based on the initialization of the buffer structure, perform one-frame buffering on the captured passengers.

[0013] Furthermore, for step A of arranging feature acquisition cameras, the specific process is as follows:

[0014] First, obtain the upper and lower hierarchical relationships according to the hierarchical division of the subway network;

[0015] Then, install feature acquisition cameras at each entrance and exit.

[0016] Furthermore, each feature acquisition camera is responsible for the turnstiles at one or two entrances and exits.

[0017] Furthermore, in step B, the subway network configuration file is established hierarchically, and the specific process is as follows:

[0018] First, the subway network is loaded and used in the form of a configuration file;

[0019] Then, the configuration file uses the XML format to define and express the structural information in the subway network.

[0020] Furthermore, in step C, the cache structure is initialized, and the specific process is as follows:

[0021] First, the road network structure information is read from the configuration file;

[0022] Then, the cache structure is hierarchically initialized using the road network structure information;

[0023] After that, the AVL tree nodes of the feature cameras are defined;

[0024] After that, the singly linked list nodes of the passenger feature pictures are defined;

[0025] Finally, the image data is stored.

[0026] Furthermore, the AVL tree nodes of the feature cameras include: the depth where the node is located, the left subtree, the right subtree, the linked list of frame pictures captured by the camera, and the feature camera ID.

[0027] Furthermore, the singly linked list nodes of the passenger feature pictures include the capture time of the picture and the pointer to the next picture.

[0028] Furthermore, in step D, based on the initialization of the cache structure, a one-frame cache is performed for the captured passengers, and the specific process is as follows:

[0029] Whenever the feature camera at the entrance captures a frame of a passenger entering the station image P, a one-frame cache is performed for the captured passenger.

[0030] The beneficial effects of the present invention are as follows:

[0031] The subway passenger cache structure based on the image HASH algorithm of the present invention caches the entry time and the feature pictures of each passenger captured by the feature cameras at each entrance, and when the passenger exits the station, quickly retrieves the entry image closest to the exit image to realize the restoration of the passenger's trajectory.

[0032] As time goes by and the number of cameras increases, the response time of the subway passenger cache structure based on the image HASH algorithm is significantly shortened in high-concurrency scenarios, and the number of disk I / Os caused by picture saving and loading is reduced, improving the search efficiency of pictures, thereby enhancing the efficiency of passenger trajectory restoration and contactless payment. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a deployment schematic diagram of the feature cameras in the present invention;

[0034] Figure 2 is a schematic diagram of the cache structure in the present invention;

[0035] Figure 3 is a schematic diagram of the feature picture linked list in the present invention;

[0036] Figure 4 is a definition fragment of the subway network configuration file in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0037] Hereinafter, the present invention will be described in detail with reference to the drawings and embodiments:

[0038] As Figures 1 to 4 shown, a subway passenger caching method based on image HOG feature vectors includes the following steps:

[0039] A. Arrange feature acquisition cameras;

[0040] B. Hierarchically establish a subway network configuration file;

[0041] C. Initialize the cache structure;

[0042] D. Based on the initialization of the cache structure, perform one-frame caching on the captured passengers.

[0043] The process of arranging feature acquisition cameras in step A is as follows:

[0044] First, obtain the upper and lower hierarchical relationships according to the hierarchical division of the subway network;

[0045] Then, install feature acquisition cameras at each entrance and exit.

[0046] Each feature acquisition camera is responsible for the turnstiles of one or two entrances and exits.

[0047] The process of hierarchically establishing a subway network configuration file in step B is as follows:

[0048] First, the subway network is loaded and used in the form of a configuration file;

[0049] Then, the configuration file uses the XML format to define and express the structural information in the subway network.

[0050] Step C initializes the cache structure, and the specific process is as follows:

[0051] First, read the road network structure information from the configuration file;

[0052] Then, use the road network structure information to perform hierarchical initialization on the cache structure;

[0053] Next, define the AVL tree nodes of the feature cameras;

[0054] Next, define the single linked list nodes of the passenger feature pictures;

[0055] Finally, store the image data.

[0056] The AVL tree nodes of the feature cameras include: the depth where the node is located, the left subtree, the right subtree, the linked list of frame pictures captured by the camera, and the feature camera ID.

[0057] The single linked list nodes of the passenger feature pictures include the capture time of the picture and the pointer to the next picture.

[0058] Step D performs one-frame caching on the captured passengers based on the initialization of the cache structure, and the specific process is as follows:

[0059] Whenever a feature camera at the entrance captures a frame of a passenger entering the station image P, perform one-frame caching on the captured passengers.

[0060] Specifically, in step A, the feature acquisition cameras are deployed at each entrance and exit, and the feature acquisition cameras have unique IDs. The entrances and exits are child nodes of the subway platform, and the subway platform is a child node of the line.

[0061] Specifically, in step B, the configuration file is defined in XML format because XML files have the characteristic of sub-description and can express the hierarchical structure in the subway network.

[0062] Specifically, the definition of the AVL tree nodes of the feature cameras in step C is shown in Table 1

[0063] Table 1

[0064]

[0065]

[0066] As shown in Figure 2 the AVL tree nodes of the feature cameras include the left subtree on the left, the linked list of feature pictures in the middle, and the right subtree on the right.

[0067] Each node may correspond to a linked list of feature images, and the linked list of feature images stores the feature image data related to that node. The use of the linked list of feature images makes the storage and access of data more flexible, and can dynamically add or delete feature images.

[0068] Specifically, the definition of the single linked list node of the passenger feature image in step C is shown in Table 2

[0069] Table 2

[0070] field meaning hash 20-byte long image HASH value timestamp capture time of the picture, UTC pnext pointer to the next picture

[0071] As Figure 3 shown, for each frame of image, first, use the HOG method to obtain the feature vector of the image, then, calculate the SHA-1 value of the feature vector, and finally, use the SHA-1 as the KEY to insert the binary value of the frame image into LevelDB.

[0072] Specifically, step D initializes based on the cache structure and caches one frame of the captured passengers as follows:

[0073] d1. Record the timestamp T of the frame image capture.

[0074] d2. According to the camera ID, CCID, find the node where CID is located in the AVL tree to obtain the pointer L of the linked list of feature images.

[0075] d3. Use the HOG algorithm to obtain the feature vector of P to get the vector matrix.

[0076] d4. Use the SHA-1 algorithm to calculate the HASH value of the vector matrix, and convert the calculated 20 bytes into a string as the KEY of the image.

[0077] d5. Insert the original data of the image into LevelDB.

[0078] d6. Construct a structure IMAGE object image and assign values:

[0079] image.hash = SHA-1, image.ts = T

[0080] d7. Append the image object to the pointer L of the linked list of feature images.

[0081] Specifically, perform image retrieval and comparison

[0082] By traversing the AVL tree and the linked list of feature images, quickly retrieve the inbound image closest to the outbound image to realize the restoration of the passenger trajectory.

[0083] Among them, HOG refers to Histogram of Oriented Gradients, which is used for image feature extraction.

[0084] SHA-1 refers to Secure Hash Algorithm 1, which is a cryptographic hash function used to generate a unique identifier for an image.

[0085] An AVL tree refers to a self-balancing binary search tree that can perform data retrieval efficiently and quickly.

[0086] LevelDB refers to a lightweight key-value storage database used to store image data.

[0087] Embodiment 1

[0088] Use the following two different methods to test the efficiency comparison of saving a frame of image and loading a frame of image:

[0089] (1) Use the cache structure described in this article

[0090] (2) Use a conventional file system to save the frame image to the file system

[0091] The following table is a summary of the test results:

[0092]

[0093] Judging from the test results, the efficiency difference between the two methods in saving images is not significant. However, as the number of cameras increases, the time gap in loading a frame of image is very large, which also shows that the cache data structure described in this article is applicable to the scenario of restoring the passenger trajectory in rail transit. Taking the Shenzhen Metro as an example, the average number of monitoring cameras for each line is between 5,000 and 6,000. Using the cache structure described in this article can improve the efficiency by at least 40% in the scenarios of restoring the passenger trajectory and contactless payment.

[0094] The subway passenger cache structure based on the image HASH algorithm of the present invention caches the entry time and the feature image of each passenger captured by the feature cameras at each entrance, and quickly retrieves the entry image closest to the exit image when the passenger exits, so as to realize the restoration of the passenger trajectory.

[0095] As time goes by and the number of cameras increases, the response time of the subway passenger cache structure based on the image HASH algorithm in a high-concurrency scenario is significantly shortened, and the number of disk I / O operations caused by image saving and loading is reduced, improving the search efficiency of images, thereby enhancing the efficiency of passenger trajectory restoration and contactless payment.

Claims

1. A subway passenger caching method based on image HOG feature vectors, characterized in that: It includes the following steps: A. Arrange feature acquisition cameras; B. Hierarchically establish the subway network configuration file; C. Initialize the cache structure; D. Based on the initialization of the cache structure, perform one-frame caching on the captured passengers.

2. A subway passenger caching method based on the image HOG feature vector according to claim 1, characterized in that: The process of arranging the feature acquisition cameras in step A is as follows: First, obtain the upper and lower hierarchical relationships according to the hierarchical division of the subway network; Then, install feature acquisition cameras at each entrance and exit.

3. A subway passenger caching method based on the image HOG feature vector according to claim 1, characterized in that: Each feature acquisition camera is responsible for the turnstiles of one or two entrances and exits.

4. A subway passenger caching method based on the image HOG feature vector according to claim 1, characterized in that: The process of hierarchically establishing the subway network configuration file in step B is as follows: First, the subway network is loaded and used in the form of a configuration file; Then, the configuration file uses the XML format to define and express the structural information in the subway network.

5. A subway passenger caching method based on the image HOG feature vector according to claim 1, characterized in that: The process of initializing the cache structure in step C is as follows: First, read the road network structure information from the configuration file; Then, use the road network structure information to hierarchically initialize the cache structure; Next, define the AVL tree nodes of the feature cameras; Next, define the single linked list nodes of the passenger feature pictures; Finally, store the image data.

6. A subway passenger caching method based on the HOG feature vector of an image according to claim 5, characterized in that: The AVL tree nodes of the feature cameras include: the depth where the node is located, the left subtree, the right subtree, the linked list of frame pictures captured by the camera, and the feature camera ID.

7. A subway passenger caching method based on the image HOG feature vector according to claim 5, characterized in that: The single linked list nodes of the passenger feature pictures include the capture time of the picture and the pointer to the next picture.

8. A subway passenger caching method based on the image HOG feature vector according to claim 1, characterized in that: The process of performing one-frame caching on the captured passengers based on the initialization of the cache structure in step D is as follows: Whenever a feature camera at the entrance captures a frame of a passenger entering the station image P, perform one-frame caching on the captured passengers.

Citation Information

Patent Citations

  • Data storage and query method based on classification characteristics and balanced binary tree

    CN102521334A

  • Human body HOG feature-based pedestrian traffic statistical method and statistical system

    CN105825166A

  • Metro face-scanning payment method and device

    CN112766978A

  • Track road network generation method

    CN113902830A

  • Zero-knowledge identity authentication method and device based on block chain and biological characteristics

    CN117254912A