Character trajectory tracking method and device, equipment and storage medium

By obtaining the video stream data of the surveillance camera, extracting and matching portrait feature values, and generating character trajectories, the problem of low character trajectory tracking efficiency in multi-camera environments is solved, and efficient, accurate and real-time trajectory tracking is achieved.

CN120236304APending Publication Date: 2025-07-01GUANGDONG ESHORE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311841789.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The prior art has low efficiency in character tracking, poor real-time performance and prone to errors in a multi-camera environment, and requires manual processing.

Method used

By obtaining the video stream data of multiple surveillance cameras, extracting portrait feature values ​​and matching them with pre-stored feature values, determining the target camera and time information, sorting and generating character trajectories, and using multi-threaded parallel processing and redis cluster deduplication, achieving efficient matching and alarm.

Benefits of technology

It improves the efficiency, accuracy and real-time nature of character tracking, reduces the burden of human processing, and supports real-time alarms and efficient management of target characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236304A_ABST
    Figure CN120236304A_ABST
Patent Text Reader

Abstract

The invention provides a character trajectory tracking method, device and equipment and a storage medium, and the method comprises the steps: obtaining the video stream data of a plurality of monitoring cameras, extracting a first portrait feature value of a character in each video stream data, matching the first portrait feature value with a pre-stored second portrait feature value, and obtaining a first portrait feature value of the character in each video stream data; and when the matching is successful, determining a target monitoring camera corresponding to the successfully matched target first portrait feature value, the position information of the target monitoring camera and the time information of the video stream data of the target monitoring camera, sorting the position information according to the time information, and generating a figure trajectory. And the efficiency, the accuracy and the real-time performance can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a method, apparatus, device, and storage medium for tracking a person's trajectory. Background Art

[0002] As a type of information recognition technology, image recognition technology has been applied in many fields of life and can effectively identify characteristic information such as human faces, clothing, vehicles, and license plates. However, currently, image recognition technology cannot track a person's trajectory in actual applications. Even after a human face is recognized, it is still necessary to manually reverse the video or find each human face for manual comparison and then manually depict the trajectory to achieve person tracking. Especially when tracking the trajectories of multiple people from different cameras, it is very time-consuming and laborious, with low efficiency, poor real-time performance, and is prone to errors. There is a need to provide an effective trajectory tracking method. Summary of the Invention

[0003] Embodiments of this application provide a method, apparatus, device, and storage medium for tracking a person's trajectory to solve at least one problem existing in the related art. The technical solutions are as follows:

[0004] In a first aspect, embodiments of this application provide a method for tracking a person's trajectory, including:

[0005] Obtain video stream data of a plurality of monitoring cameras, and extract first human portrait feature values of persons in each of the video stream data;

[0006] Match the first human portrait feature values with pre-stored second human portrait feature values;

[0007] When the matching is successful, determine the target monitoring camera corresponding to the successfully matched target first human portrait feature value, the location information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera;

[0008] Sort the location information according to the time information to generate a person's trajectory.

[0009] In an implementation manner, the obtaining video stream data of a plurality of monitoring cameras and extracting first human portrait feature values of persons in each of the video stream data includes:

[0010] Obtain video stream data of a plurality of monitoring cameras in real time through a message queue service;

[0011] Construct a thread pool with multiple threads, and parallelly identify and extract the video stream data through the thread pool to extract the first human portrait feature values of persons in each of the video stream data.

[0012] In an implementation manner, the method further includes:

[0013] Cache the first portrait feature value into the redis cluster;

[0014] Compare all the first portrait feature values with each other to determine the duplicate third portrait feature values;

[0015] If the third portrait feature value is from the video stream data of the same monitoring camera, determine the cache time when the third portrait feature value is cached in the redis cluster;

[0016] Taking the earliest cache time as the timing starting point, delete the third portrait feature values corresponding to the cache times within the valid time after the timing starting point.

[0017] In one implementation, when the matching is successful, determining the target monitoring camera corresponding to the successfully matched target first portrait feature value, the location information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera includes:

[0018] When the matching is successful, determine the target monitoring camera corresponding to the successfully matched target first portrait feature value;

[0019] Determine the identity identifier of the target monitoring camera and obtain the time information of the video stream data;

[0020] According to the identity identifier, determine the location information of the target monitoring camera from the deployed camera information database.

[0021] In one implementation, the method further includes:

[0022] When the matching fails, perform portrait feature persistence on the first portrait feature value that fails to match;

[0023] When performing the portrait feature persistence, generate a feature code for the first portrait feature value that fails to match, and store the feature code and the first portrait feature value that fails to match in the non-target portrait feature value information library.

[0024] In one implementation, generating the feature code for the first portrait feature value that fails to match includes:

[0025] Determine the acquisition time of the video stream data corresponding to the first portrait feature value that fails to match, the monitoring camera corresponding to the video stream data, and the identity identifier of the monitoring camera corresponding to the video stream data;

[0026] Generate a record ID for the first portrait feature value that fails to match;

[0027] Through a preset sub-table logic, perform splicing processing according to the acquisition time, the record ID, and the identity identifier to obtain the feature code.

[0028] In one embodiment, the method further includes:

[0029] When the matching is successful, an alarm is issued through the target monitoring camera;

[0030] And / or,

[0031] When the matching is successful, the alarm information is pushed to the system display page through websocket.

[0032] In a second aspect, an embodiment of the present application provides a device for tracking a person's trajectory, including:

[0033] An acquisition module, configured to acquire video stream data of a plurality of monitoring cameras, and extract the first portrait feature value of a person in each of the video stream data;

[0034] A matching module, configured to match the first portrait feature value with a pre-stored second portrait feature value;

[0035] A determination module, configured to, when the matching is successful, determine the target monitoring camera corresponding to the successfully matched target first portrait feature value, the location information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera;

[0036] A generation module, configured to sort the location information according to the time information to generate a person's trajectory.

[0037] In one embodiment, the acquisition module is further configured to:

[0038] Cache the first portrait feature value into a redis cluster;

[0039] Compare all the first portrait feature values with each other to determine the duplicate third portrait feature values;

[0040] If the third portrait feature value is from the video stream data of the same monitoring camera, determine the cache time when the third portrait feature value is cached into the redis cluster;

[0041] Taking the earliest cache time as the timing starting point, delete the third portrait feature value corresponding to the cache time within the valid time after the timing starting point.

[0042] In one embodiment, the matching module is further configured to:

[0043] When the matching fails, perform portrait feature persistence on the first portrait feature value that fails to match;

[0044] When the portrait feature is persisted, a feature code of the first portrait feature value with a matching failure is generated, and the feature code and the first portrait feature value with a matching failure are stored in the non-target portrait feature value information library.

[0045] In one implementation, the matching module is further configured to:

[0046] When the matching is successful, an alarm is generated through the target monitoring camera;

[0047] And / or,

[0048] The alarm information is pushed to the system display page through websocket.

[0049] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory. Instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method in any one of the above aspects.

[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed, the method in any one of the above aspects is implemented.

[0051] The beneficial effects in the above technical solutions at least include:

[0052] By acquiring the video stream data of a plurality of monitoring cameras, extracting the first portrait feature value of the person in each video stream data, matching the first portrait feature value with the pre-stored second portrait feature value, when the matching is successful, determining the target monitoring camera corresponding to the target first portrait feature value with a successful matching, the position information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera, sorting the position information according to the time information, and generating a person trajectory. Compared with manual processing, it is beneficial to improve efficiency, accuracy, and real-time performance.

[0053] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the above-described illustrative aspects, embodiments, and features, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In the drawings, unless otherwise specified, the same reference numerals throughout the drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0055] Figure 1Schematic diagram of the steps of a method for tracking a person's trajectory according to an embodiment of the present application;

[0056] Figure 2 Block diagram of the structure of a device for tracking a person's trajectory according to an embodiment of the present application;

[0057] Figure 3 Block diagram of the structure of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0058] In the following, only some exemplary embodiments are briefly described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature and not restrictive.

[0059] Referring to Figure 1 , a flowchart of a method for tracking a person's trajectory according to an embodiment of the present application is shown. The method for tracking a person's trajectory can at least include steps S100 - S400:

[0060] S100. Obtain video stream data of a plurality of monitoring cameras, and extract the first portrait feature values of the people in each video stream data.

[0061] S200. Match the first portrait feature values with the pre - stored second portrait feature values.

[0062] S300. When the matching is successful, determine the target monitoring camera corresponding to the successfully - matched target first portrait feature value, the location information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera.

[0063] S400. Sort the location information according to the time information to generate a person's trajectory.

[0064] The method for tracking a person's trajectory according to an embodiment of the present application can be executed by terminals such as a computer, a mobile phone, a tablet, a vehicle - mounted terminal, etc., or can be executed by a cloud server, for example, executed by a system installed in the cloud server or the computer.

[0065] The technical solution of the embodiment of the present application, by obtaining the video stream data of a plurality of monitoring cameras, extracting the first portrait feature values of the people in each video stream data, matching the first portrait feature values with the pre - stored second portrait feature values, when the matching is successful, determining the target monitoring camera corresponding to the successfully - matched target first portrait feature value, the location information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera, and sorting the location information according to the time information to generate a person's trajectory, is beneficial to improving the efficiency, accuracy, and real - time performance compared with manual processing.

[0066] In one embodiment, step S100 includes steps S110 - S120:

[0067] S110. Real - time obtain video stream data of several monitoring cameras through a message queue service.

[0068] In the embodiment of the present application, the system constructs a rabbitmq message queue service, and real - time obtains video stream data of several monitoring cameras through the rabbitmq message queue service.

[0069] S120. Construct a multi - threaded thread pool, and parallelly identify and extract the video stream data through the thread pool to extract the first portrait feature values of the people in each video stream data.

[0070] In the embodiment of the present application, a multi - threaded thread pool is constructed in the system. Each thread in the thread pool parallelly identifies and extracts the video stream data. During this process, the thread will consume the messages in the rabbitmq message queue service, and identify and extract the video stream data by means including but not limited to convolutional neural networks, Fisherfaces, Eigenfaces, etc., so as to extract the first portrait feature values of the people in each video stream data. Optionally, in the embodiment of the present application, ThreadPoolExecutor is used to manage the threads, and the threads are reused through pooling technology, thereby reducing the resources consumed by creating threads.

[0071] It should be noted that when performing identification and extraction, frame - intercepting processing can be performed on the video stream, and then identification and extraction are carried out after determining each frame of the picture; in each frame of the picture of each video stream data, there may be one or more people. Therefore, the first portrait feature value may include the portrait feature values of one person or multiple people, such as the first portrait feature value of person A and the first portrait feature value of person B, etc.

[0072] In one embodiment, in step S200, the first portrait feature value is matched with the pre - stored second portrait feature value, for example, similarity calculation is performed. When the similarity calculation result is greater than or equal to the similarity threshold, the similarity calculation result of the first portrait feature value of person A and the pre - stored second portrait feature value is greater than or equal to the similarity threshold. At this time, it is considered that the match is successful, and the target first portrait feature value determined to be successfully matched is the first portrait feature value of person A. It should be noted that the second portrait feature value can be identified and stored in the database in advance, or pictures can be provided in real - time, and then the second portrait feature value is identified after identifying the pictures and stored in the cache. The second portrait feature value can be determined immediately according to actual needs for matching, which is beneficial to improving the real - time performance and flexibility of the second portrait feature value and improving the matching efficiency.

[0073] In one implementation, before step S300, duplicate removal processing of portrait feature values can also be performed to reduce the data processing burden, data storage volume, and computing resource occupancy for subsequent generation of person trajectories. Optionally, the duplicate removal processing may include steps S210 - S240:

[0074] S210. Cache the first portrait feature value to the redis cluster.

[0075] S220. Compare all the first portrait feature values with each other to determine the duplicate third portrait feature values.

[0076] Optionally, cache all the obtained first portrait feature values to the redis cluster and then compare them with each other. For example, in the video stream data of surveillance camera X, the first portrait feature value of person A is recognized once, the first portrait feature value of person B is recognized once, and the first portrait feature value of person C is recognized twice. Compare all the first portrait feature values with each other to determine the duplicate third portrait feature values, that is, the two first portrait feature values of person C.

[0077] S230. If the third portrait feature value is from the video stream data of the same surveillance camera, determine the cache time of the third portrait feature value cached to the redis cluster.

[0078] For example, the two third portrait feature values of person C are both from the video stream data of surveillance camera X. Then determine the cache time of the first third portrait feature value of person C cached to the redis cluster, denoted as time A, and determine the cache time of the second third portrait feature value of person C cached to the redis cluster, denoted as time B.

[0079] S240. Starting from the earliest cache time as the timing origin, delete the third portrait feature values corresponding to the cache times within the valid time after the timing origin.

[0080] It should be noted that the valid time can be set according to actual needs, such as 30s. Starting from the earliest cache time as the timing origin, delete the third portrait feature values corresponding to the cache times within the valid time after the timing origin, thereby achieving duplicate removal. For example, time A is 11:33:41 and time B is 11:33:45. At this time, the time difference is within 30s, and at this time, the second third portrait feature value is deleted.

[0081] It should be noted that when locating the redis service where the monitoring camera is located, based on the identity identifier of the monitoring camera, such as but not limited to the device number of the monitoring camera, the ASCII values of each character of the device number are taken, and then calculated in sequence with 31 as the weight (when the data volume is greater than or equal to the data volume threshold), and then the remainder is taken. According to the remainder, the redis service where the device is located can be quickly located. Calculation formula (1):

[0082] (s[n - 1]*31^(n - 1)+s[n - 2]*31^(n - 2).....+s[0])%n

[0083] Among them, s is the character array of the device code, and n is the length of the device code array. redis is deployed in a cluster mode. The role of locating the redis service where the device is located is to quickly find the redis server storing the data of this monitoring camera, so as to perform data reading, writing, and deletion operations. By quickly locating the redis service where the device is located, the performance and efficiency of the system can be improved, and at the same time, the effective management and monitoring of the portrait capture data of the monitoring camera can be realized.

[0084] In one implementation manner, step S300 includes steps S310 - S330:

[0085] S310. When the matching is successful, determine the target monitoring camera corresponding to the target first portrait feature value with successful matching.

[0086] Optionally, when the matching is successful, determine the target monitoring camera corresponding to the target first portrait feature value with successful matching. For example, the first portrait feature value of person A is recognized in the video stream data Y of monitoring camera X, and the first portrait feature value of person A is successfully matched. At this time, the target first portrait feature value with successful matching is the first portrait feature value of person A, and the corresponding target monitoring camera is monitoring camera X.

[0087] S320. Determine the identity identifier of the target monitoring camera and obtain the time information of the video stream data.

[0088] Optionally, the identity identifier includes but is not limited to the device number of the monitoring camera. For example, in the above example, the time information of the video stream data Y is obtained, such as the acquisition time.

[0089] S330. According to the identity identifier, determine the location information of the target monitoring camera from the database of deployed camera information.

[0090] Optionally, the surveillance camera information database has the identity identifiers of each surveillance camera and the corresponding location information, such as longitude and latitude information, etc. Therefore, after determining the identity identifier, the location information of the target surveillance camera can be determined from the surveillance camera information database using the identity identifier.

[0091] In one implementation, in step S400, after determining the time information and location information, the location information can be sorted based on the chronological order of the time information, thereby generating the person trajectory of the target person to be tracked, and the person trajectory is displayed on the system page, which is convenient and fast. It should be noted that relevant content such as the matched target first portrait feature value, location information, and time information can be stored in the target person trajectory information database, and can be searched in the target person trajectory information database to generate the person trajectory of the target person from individual queries.

[0092] In one implementation, the person trajectory tracking method of the embodiments of the present application may further include steps S510 and / or S520:

[0093] S510: When the matching is successful, an alarm is issued through the target surveillance camera.

[0094] In the embodiments of the present application, when the matching is successful, that is, when there is a target person to be tracked, an alarm is issued through the target surveillance camera, including but not limited to playing an alarm sound, so as to remind the on-site staff to take corresponding measures.

[0095] S520: When the matching is successful, the alarm information is pushed to the system display page through websocket.

[0096] In the embodiments of the present application, when the matching is successful, the alarm information can also be pushed to the system display page through websocket to ensure the real-time nature of the alarm and guarantee the concealment, so that the staff can take corresponding measures without alarming the target person.

[0097] In one implementation, the person trajectory tracking method of the embodiments of the present application may further include steps S610 - S620:

[0098] S610: When the matching fails, the first portrait feature value of the failed matching is persisted for portrait features.

[0099] In the embodiments of the present application, when the matching fails, there is no target person, and the first portrait feature value of the failed matching is persisted for portrait features. For example, if the first portrait feature value of person D in the video stream data C of surveillance camera Y fails to match, it can be considered that person D is a non-target person, and the first portrait feature value of person D is persisted.

[0100] S620. When the portrait features are persisted, generate a feature code for the first portrait feature value with a matching failure, and store the feature code and the first portrait feature value with a matching failure in the non-target portrait feature value information database.

[0101] In the embodiments of the present application, when the portrait features are persisted, since the data volume of non-target persons is extremely large, a sub-table method is adopted for persisting the trajectory information data of non-target persons. Optionally, generate a feature code for the first portrait feature value with a matching failure through a preset sub-table logic, and then store the feature code and the first portrait feature value with a matching failure in the non-target portrait feature value information database.

[0102] Optionally, generating the feature code for the first portrait feature value with a matching failure includes steps S6201 - S6203:

[0103] S6201. Determine the acquisition time of the video stream data corresponding to the first portrait feature value with a matching failure, the monitoring camera corresponding to the video stream data, and the identity identifier of the monitoring camera corresponding to the video stream data.

[0104] For example, if the first portrait feature value of person D in the video stream data C of monitoring camera Y fails to match, then determine the acquisition time of the video stream data C corresponding to the first portrait feature value of person D, as well as the monitoring camera Y corresponding to the video stream data C and the identity identifier of monitoring camera Y (including but not limited to the device number).

[0105] S6202. Generate a record ID for the first portrait feature value with a matching failure.

[0106] For example, use the auto-increment operation of Redis: Redis provides the INCR command, which can increment the value of a key, and this feature can be used to generate a record ID.

[0107] For example, in one embodiment, a total of multiple first portrait feature values such as person A, person C, and person D are recognized in the video stream data C. Each time a first portrait feature value is obtained, it can be considered that the value of a key is incremented. The first portrait feature value of person D is the 9th recognized first portrait feature value. At this time, the record ID of the first portrait feature value of person D with a matching failure can be 9.

[0108] S6203. Through the preset sub-table logic, perform splicing processing according to the acquisition time, record ID, and identity identifier to obtain a feature code.

[0109] Exemplarily, the preset sub-table logic is to splice the acquisition time, the remainder result of the hash value of the device number calculated based on the identity identifier such as the device number according to the above formula (1), and the record ID to generate the feature code featureCode. For example, the acquisition time is 20230101, the remainder result of the hash value of the device number is 09, and the record ID is 1. At this time, the feature code featureCode is: table_20230101091. It should be noted that in other embodiments, the identity identifier can be directly used as a part of the feature code featureCode without calculating the remainder result of the hash value, or other data can be used for splicing, which is not specifically limited.

[0110] Similarly, the corresponding location information and time information can be determined based on the portrait feature values of non-target persons to generate the trajectory information of non-target persons; or retrieval can be performed from the non-target portrait feature value information library. The retrieval logic is to obtain a list of featureCodes of feature values with a certain similarity through the comparison of feature values in the non-target portrait feature value information library, and obtain the trajectory information of non-target persons through retrieval. It should be noted that in portrait recognition, a high similarity of face features means that two faces have a high similarity in features, which means that they have similar features in some aspects, such as facial contours, eyes, noses, etc.

[0111] Optionally, the video stream data of all surveillance cameras can be stored in the capture basic library.

[0112] Through the method of the embodiments of the present application, the situation of missing the target person is effectively avoided, which is convenient for tracking the trajectory after the target person appears. It also supports the case where the target person is missed during the current manual tracking and recognition. By uploading the portrait picture of the target person for recognition, retrieval can be performed in the capture basic library to obtain the personnel trajectory. Secondly, based on the personnel recognition alarm and trajectory tracking based on portrait feature value matching, the control of the target person is more real-time, and the behavior trajectory of the target person can be better tracked and managed, improving the safety management level, and having good promotion and application value.

[0113] Refer to Figure 2 , which shows the structural block diagram of the personnel trajectory tracking device according to an embodiment of the present application. The device may include:

[0114] An acquisition module, configured to acquire the video stream data of a plurality of surveillance cameras and extract the first portrait feature values of the persons in each video stream data;

[0115] A matching module, configured to match the first portrait feature values with the pre-stored second portrait feature values;

[0116] A determination module, configured to determine, when the matching is successful, a target monitoring camera corresponding to a target first portrait feature value that matches successfully, location information of the target monitoring camera, and time information of video stream data of the target monitoring camera;

[0117] A generation module, configured to sort the location information according to the time information to generate a person trajectory.

[0118] In one implementation, the acquisition module is further configured to:

[0119] Cache the first portrait feature value into a redis cluster;

[0120] Compare all the first portrait feature values with each other to determine duplicate third portrait feature values;

[0121] If the third portrait feature value is from video stream data of the same monitoring camera, determine the cache time when the third portrait feature value is cached into the redis cluster;

[0122] Taking the earliest cache time as the timing starting point, delete the third portrait feature values corresponding to the cache times within the valid time after the timing starting point.

[0123] In one implementation, the matching module is further configured to:

[0124] When the matching fails, perform portrait feature persistence on the first portrait feature value that fails to match;

[0125] When performing portrait feature persistence, generate a feature code for the first portrait feature value that fails to match, and store the feature code and the first portrait feature value that fails to match into a non-target portrait feature value information library.

[0126] In one implementation, the matching module is further configured to:

[0127] When the matching is successful, give an alarm through the target monitoring camera;

[0128] And / or,

[0129] Push an alarm message to the system display page through websocket.

[0130] For the functions of the modules in each device of the embodiments of the present application, reference may be made to the corresponding descriptions in the above methods, which will not be elaborated herein.

[0131] Refer to Figure 3, which shows a structural block diagram of an electronic device according to an embodiment of the present application. The electronic device includes: a memory 310 and a processor 320. Instructions that can run on the processor 320 are stored in the memory 310. The processor 320 loads and executes the instructions to implement the method for tracking the trajectory of a person in the above embodiment. Among them, the number of the memory 310 and the processor 320 can be one or more.

[0132] In one implementation, the electronic device further includes a communication interface 330, which is used to communicate with external devices and perform data interaction and transmission. If the memory 310, the processor 320, and the communication interface 330 are implemented independently, the memory 310, the processor 320, and the communication interface 330 can be interconnected through a bus and complete communication with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 3 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0133] Optionally, in specific implementation, if the memory 310, the processor 320, and the communication interface 330 are integrated on a chip, the memory 310, the processor 320, and the communication interface 330 can complete communication with each other through an internal interface.

[0134] The embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method for tracking the trajectory of a person provided in the above embodiment.

[0135] The embodiment of the present application further provides a chip, which includes a processor for calling and running instructions stored in a memory from the memory, so that a communication device installed with the chip executes the method provided in the embodiment of the present application.

[0136] The embodiment of the present application further provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0137] It should be understood that the above-mentioned processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the advanced RISC machines (ARM) architecture.

[0138] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0139] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0140] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0141] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of" means two or more unless otherwise specifically defined.

[0142] Any process or method description represented in the flowchart or described in other ways herein can be understood as representing a module, segment, or part of the code of executable instructions including one or more steps for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the involved functions, rather than in the order shown or discussed.

[0143] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices.

[0144] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0145] In addition, each functional unit in various embodiments of the present application can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk, an optical disc, etc.

[0146] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various changes or substitutions, and these should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for tracking a person's trajectory, characterized in that, Including: Obtain the video stream data of a plurality of monitoring cameras, and extract the first portrait feature value of the person in each of the video stream data; Match the first portrait feature value with the pre-stored second portrait feature value; When the matching is successful, determine the target monitoring camera corresponding to the successfully matched target first portrait feature value, the location information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera; Sort the location information according to the time information to generate a person trajectory.

2. The method for tracking a person's trajectory according to claim 1, characterized in that: The obtaining the video stream data of a plurality of monitoring cameras and extracting the first portrait feature value of the person in each of the video stream data includes: Obtain the video stream data of a plurality of monitoring cameras in real time through a message queue service; Construct a multi-threaded thread pool, and parallelly identify and extract the video stream data through the thread pool to extract the first portrait feature value of the person in each of the video stream data.

3. The method for tracking a person's trajectory according to claim 2, wherein: The method further includes: Cache the first portrait feature value to a redis cluster; Compare all the first portrait feature values with each other to determine the duplicate third portrait feature values; If the third portrait feature value is from the video stream data of the same monitoring camera, determine the cache time when the third portrait feature value is cached to the redis cluster; Taking the earliest cache time as the timing starting point, delete the third portrait feature values corresponding to the cache times within the effective time after the timing starting point.

4. The method for tracking a person's trajectory according to any one of claims 1-3, characterized in that: The when the matching is successful, determining the target monitoring camera corresponding to the successfully matched target first portrait feature value, the location information of the target monitoring camera, and the time information of the video stream data of the target monitoring camera includes: When the matching is successful, determine the target monitoring camera corresponding to the successfully matched target first portrait feature value; Determine the identity identifier of the target monitoring camera and the time information for obtaining the video stream data; According to the identity identifier, determine the location information of the target monitoring camera from the surveillance camera information database.

5. The method for tracking a person's trajectory according to any one of claims 1 to 3, characterized in that: The method further includes: When the matching fails, perform portrait feature persistence on the first portrait feature value that fails to match; When performing the portrait feature persistence, generate a feature code for the first portrait feature value that fails to match, and store the feature code and the first portrait feature value that fails to match in a non-target portrait feature value information library.

6. The method for tracking a person's trajectory according to claim 5, wherein: The generating the feature code for the first portrait feature value that fails to match includes: Determine the acquisition time of the video stream data corresponding to the first portrait feature value that fails to match, the monitoring camera corresponding to the video stream data, and the identity identifier of the monitoring camera corresponding to the video stream data; Generate a record ID for the first portrait feature value that fails to match; Through a preset sub-table logic, perform splicing processing according to the acquisition time, the record ID, and the identity identifier to obtain a feature code.

7. The method for tracking a person's trajectory according to any one of claims 1 to 3, characterized in that: The method further includes: When the matching is successful, give an alarm through the target monitoring camera; And / or When the matching is successful, push the alarm information to the system display page through websocket.

8. A device for tracking a person's trajectory, characterized in that, Including: An acquisition module, configured to acquire video stream data of a plurality of monitoring cameras, and extract first portrait feature values of persons in each of the video stream data; A matching module, configured to match the first portrait feature values with pre-stored second portrait feature values; A determination module, configured to, when the matching is successful, determine a target monitoring camera corresponding to the target first portrait feature value for which the matching is successful, location information of the target monitoring camera, and time information of the video stream data of the target monitoring camera; A generation module, configured to sort the location information according to the time information to generate a person trajectory.

9. An electronic device, characterized in that, Comprising: A processor and a memory, wherein instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the method according to any one of claims 1 - 7 is implemented.