Temporal heat map generation method, device, electronic device and storage medium

Through local calculation and clustering of image data, real-time temporal heat maps are generated, which solves the real-time and customizable problems of heat map drawing in large traffic and big data scenarios, and achieves efficient data display and accurate user demand satisfaction. .

CN114491116BActive Publication Date: 2024-10-15GUANGZHOU TUPU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210128682.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2024-10-15
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

In large traffic and big data scenarios, the drawing of temporal heat maps has the problems of low real-time performance and weak search customization, making it difficult to effectively use crowd information for valuable visual display.

Method used

Through local calculation and clustering of image data, based on the dimension reduction of time domain and grid domain, a real-time temporal heat map is generated, and the preset filter conditions and message queue are used to realize customized search and visual display.

Benefits of technology

It improves the real-time and customized search of temporal heat maps, reduces computing resource usage, improves data accuracy and drawing efficiency, and meets users' customization needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491116B_ABST
    Figure CN114491116B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and storage medium for generating a temporal heat map, and relates to the field of drawing technology. The method comprises: receiving a request signal for obtaining a temporal heat map, the request signal comprising a preset filtering condition, the preset filtering condition comprising a time parameter and a grid parameter; calculating a dimension reduction parameter according to the time parameter and the grid parameter, and dividing the image data to obtain a coarse grid domain unit and a coarse time domain unit; determining a dimension reduction calculation operation for the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter to obtain a playback sequence; determining the thermal distribution of each frame in the temporal heat map according to the order of the playback sequence, obtaining the playback parameters of the temporal heat map, and drawing and returning the temporal heat map based on the playback parameters. The method provided in the present application can be used to perform local calculations and clustering on the image data, and a real-time temporal heat map can be drawn.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of pattern recognition technology, and in particular to a method, device, electronic device and storage medium for generating a temporal heat map. Background Art

[0002] In various business scenarios, in order to clarify the relationship between people, scenes and objects, we can deploy cameras, and have each camera record the interaction between people and scenes as well as people and objects. By using deep learning methods to identify the crowd, we can know the distribution of the crowd at each moment. However, it is particularly important to make good use of the information of these people and make valuable visual displays.

[0003] Heatmap is an intuitive way to visualize the value of data, but static heatmap can only reflect the situation in a certain period of time. If you want to obtain more valuable information, you need a dynamically changing heatmap, that is, a temporal heatmap. Especially in the scenario of large traffic and big data, the drawing of temporal heatmap will have the problems of low real-time performance and weak search customization. Summary of the invention

[0004] Based on this, the purpose of the embodiments of the present application is to provide a temporal heat map generation method, device, electronic device and storage medium, which are used to perform local calculation and clustering of image data and draw a real-time temporal heat map.

[0005] In a first aspect, an embodiment of the present application provides a method for generating a temporal heat map, comprising:

[0006] Receiving a request signal for obtaining a temporal heat map, the request signal including a preset filtering condition, the preset filtering condition including a time parameter and a grid parameter;

[0007] Calculating a dimension reduction parameter according to the time parameter and the grid parameter, and dividing the image data to obtain a coarse grid domain unit and a coarse time domain unit;

[0008] Performing a dimension reduction calculation operation on the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter to obtain a playback sequence;

[0009] The heat distribution of each frame in the temporal heat map is determined according to the order of the playback sequence, the playback parameters of the temporal heat map are obtained, and the temporal heat map is drawn and returned based on the playback parameters.

[0010] In the above implementation process, the image is locally calculated and clustered based on the preset filtering conditions, the time domain and grid domain of the image data are reduced to improve data accuracy, and a real-time temporal heat map is drawn from the large amount of data obtained from the camera sensor and the image data with a long time span, so as to realize customized search and visual display. Since the screening of data is based on local calculation, it can also improve computing efficiency and reduce the occupation of computing resources.

[0011] Optionally, before receiving a request signal for acquiring a temporal heat map, the method may include:

[0012] Performing pedestrian recognition on the image data to obtain a pedestrian recognition result, compressing and encrypting the pedestrian recognition result, and writing the encrypted pedestrian recognition result into a message queue;

[0013] Obtaining the pedestrian recognition result from the corresponding message queue according to the user's subscription information;

[0014] The pedestrian recognition result is decompressed and decrypted to obtain the decrypted pedestrian recognition result, and the pedestrian recognition result is stored in a database.

[0015] In the above implementation process, image data is obtained from the camera sensor through message queues and message subscriptions, which can realize customized searches by users and improve the effectiveness of drawing temporal heat maps. The architecture based on message queues can realize business decoupling, data buffering, peak shaving and distribution functions, which can improve data acquisition efficiency. Consuming data in the message queue based on message subscription can also ensure consistency in the data consumption process and improve data reliability.

[0016] Optionally, the pedestrian recognition result may include a pedestrian frame, and storing the pedestrian recognition result in a database may include:

[0017] Based on the detection information of the pedestrian representing the pedestrian, the midpoint of the bottom edge of the pedestrian frame or the center point of the pedestrian frame is calculated according to the coordinate information of the pedestrian frame;

[0018] The coordinates of the midpoint or the center point are combined with the pedestrian recognition result, and the combined pedestrian recognition result is stored in the database.

[0019] In the above implementation process, the coordinates of the midpoint or center point of the pedestrian box are combined with the pedestrian recognition result to characterize the recognition result of each pedestrian and its corresponding position information, so that the corresponding temporal heat map can be generated based on the customized filtering conditions, thereby improving the efficiency of drawing the temporal heat map.

[0020] Optionally, the dimension reduction calculation operation may include:

[0021] Dividing the time span of the image data according to the coarse time domain units to obtain a first coarse time domain sequence, and calculating a coarse time domain sequence clustering statement according to the first coarse time domain sequence;

[0022] splicing and executing a global filtering statement and the coarse time domain sequence clustering statement to obtain the first coarse time domain sequence clustering result, selecting and sorting the time domain with data from the first coarse time domain sequence clustering result to obtain a second coarse time domain sequence, wherein the global filtering statement is obtained based on the preset filtering condition;

[0023] Calculate each of the coarse grid domain units according to the second coarse time domain sequence with data to obtain a coarse grid sequence clustering statement;

[0024] splicing and executing the global filtering statement and the coarse grid sequence clustering statement to obtain the first coarse grid domain sequence clustering result, selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain a coarse grid domain sequence;

[0025] The dimension reduction calculation operation of the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter includes:

[0026] It is determined whether the dimension reduction calculation operation needs to be continued according to the dimension reduction parameter, and when the dimension reduction calculation operation does not need to be continued, the coarse grid domain sequence is used as the playback sequence.

[0027] In the above implementation process, the coarse-grained time domain and the coarse-grained grid domain are combined to obtain a complete time series of thermal values. The thermal value information in the image data can be locally clustered and filtered by reducing the dimension of the image data in the time domain and the grid domain. The thermal value information required by the user can be screened out from the image data, and the temporal thermal map can be drawn based on the screened thermal value information, which can reduce the occupation of computing resources and improve drawing efficiency and data accuracy.

[0028] Optionally, the method may further include:

[0029] When it is necessary to continue the dimension reduction calculation operation, the number of times the dimension reduction calculation operation needs to be continued is determined according to a calculation sub-parameter, and the calculation sub-parameter is obtained by the preset filtering condition.

[0030] Optionally, after determining the number of operations of continuing the dimension reduction calculation operation according to the calculation times parameter, the method may further include:

[0031] Repeat the steps of dividing the time span of the image data according to the coarse time domain units into the splicing and executing the global filtering statement and the coarse grid sequence clustering statement according to the number of operations to obtain the first coarse grid domain sequence clustering result, and selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain the playback sequence.

[0032] In the above implementation process, the coarse-grained domain information can be refined to obtain fine-grained domain information, which can improve the refinement of data clustering and make the drawn temporal heat map more consistent with the user's specified attributes.

[0033] Optionally, the preset filtering condition includes a thermal value type, and the thermal value type represents a display mode of the thermal value when drawing a thermal map. Returning the temporal thermal map may include:

[0034] At least one of a heat map of the number of people, a heat map of the number of times of travel, and a heat map of the length of time a pedestrian stays is returned based on the heat value type.

[0035] In the above implementation process, different thermal value types can be selected to meet different thermal distribution requirements, which can meet the user's customized search needs.

[0036] In a second aspect, an embodiment of the present application provides a temporal heat map generation device, comprising:

[0037] A signal receiving module, used to receive a request signal for obtaining a temporal heat map, wherein the request signal includes a preset filtering condition, and the preset filtering condition includes a time parameter and a grid parameter;

[0038] A division module, used for calculating a dimension reduction parameter according to the time parameter and the grid parameter, and dividing the image data to obtain a coarse grid domain unit and a coarse time domain unit;

[0039] An analysis and calculation module, configured to perform a dimension reduction calculation operation on the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter to obtain a playback sequence;

[0040] A drawing module is used to determine the heat distribution of each frame in the temporal heat map according to the order of the playback sequence, obtain the playback parameters of the temporal heat map, draw and return the temporal heat map based on the playback parameters.

[0041] In the above implementation process, the image is locally calculated and clustered based on the preset filtering conditions, the time domain and grid domain of the image data are reduced to improve data accuracy, and a real-time temporal heat map is drawn from the large amount of data obtained from the camera sensor and the image data with a long time span, so as to realize customized search and visual display. Since the screening of data is based on local calculation, it can also improve computing efficiency and reduce the occupation of computing resources.

[0042] Optionally, the temporal heat map generating device may further include a preprocessing module, which is used to perform pedestrian recognition on the image data to obtain a pedestrian recognition result, perform data compression and encryption on the pedestrian recognition result, and write the encrypted pedestrian recognition result into a message queue; obtain the pedestrian recognition result from the corresponding message queue according to the user's subscription information; and perform data decompression and decryption on the pedestrian recognition result to obtain the decrypted pedestrian recognition result, and store the pedestrian recognition result into a database.

[0043] In the above implementation process, image data is obtained from the camera sensor through message queues and message subscriptions, which can realize customized searches by users and improve the effectiveness of drawing temporal heat maps. The architecture based on message queues can realize business decoupling, data buffering, peak shaving and distribution functions, which can improve data acquisition efficiency. Consuming data in the message queue based on message subscription can also ensure consistency in the data consumption process and improve data reliability.

[0044] Optionally, the pedestrian recognition result may include a pedestrian frame, and the preprocessing module may be specifically used to calculate the midpoint of the bottom edge of the pedestrian frame or the center point of the pedestrian frame based on the detection information of the pedestrian frame, according to the coordinate information of the pedestrian frame; and combine the coordinates of the midpoint or the center point with the pedestrian recognition result, and store the combined pedestrian recognition result in the database.

[0045] In the above implementation process, the coordinates of the midpoint or center point of the pedestrian box are combined with the pedestrian recognition result to characterize the recognition result of each pedestrian and its corresponding position information, so that the corresponding temporal heat map can be generated based on the customized filtering conditions, thereby improving the efficiency of drawing the temporal heat map.

[0046] Optionally, the analysis and calculation module may be specifically used for:

[0047] Dividing the time span of the image data according to the coarse time domain units to obtain a first coarse time domain sequence, and calculating a coarse time domain sequence clustering statement according to the first coarse time domain sequence;

[0048] splicing and executing a global filtering statement and the coarse time domain sequence clustering statement to obtain the first coarse time domain sequence clustering result, selecting and sorting the time domain with data from the first coarse time domain sequence clustering result to obtain a second coarse time domain sequence, wherein the global filtering statement is obtained based on the preset filtering condition;

[0049] Calculate each of the coarse grid domain units according to the second coarse time domain sequence with data to obtain a coarse grid sequence clustering statement;

[0050] splicing and executing the global filtering statement and the coarse grid sequence clustering statement to obtain the first coarse grid domain sequence clustering result, selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain a coarse grid domain sequence;

[0051] The dimension reduction calculation operation of the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter includes:

[0052] It is determined whether the dimension reduction calculation operation needs to be continued according to the dimension reduction parameter, and when the dimension reduction calculation operation does not need to be continued, the coarse grid domain sequence is used as the playback sequence.

[0053] In the above implementation process, the coarse-grained time domain and the coarse-grained grid domain are combined to obtain a complete time series of thermal values. The thermal value information in the image data can be locally clustered and filtered by reducing the dimension of the image data in the time domain and the grid domain. The thermal value information required by the user can be screened out from the image data, and the temporal thermal map can be drawn based on the screened thermal value information, which can reduce the occupation of computing resources and improve drawing efficiency and data accuracy.

[0054] Optionally, the analysis and calculation module may also be used to determine the number of times the dimensionality reduction calculation operation needs to be continued according to a calculation sub-parameter when the dimensionality reduction calculation operation needs to be continued, and the calculation sub-parameter is obtained by the preset filtering condition.

[0055] Optionally, the analysis and calculation module can also be used to repeat the steps of dividing the time span of the image data according to the coarse time domain units into the splicing and executing the global filtering statement and the coarse grid sequence clustering statement according to the number of operations to obtain the first coarse grid domain sequence clustering result, and selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain the playback sequence.

[0056] In the above implementation process, the coarse-grained domain information can be refined to obtain fine-grained domain information, which can improve the refinement of data clustering and make the drawn temporal heat map more consistent with the user's specified attributes.

[0057] Optionally, the preset filtering condition may include a thermal value type, which represents a display mode of the thermal value when drawing a thermal map. The drawing module may be specifically used for:

[0058] At least one of a heat map of the number of people, a heat map of the number of times of travel, and a heat map of the length of time a pedestrian stays is returned based on the heat value type.

[0059] In the above implementation process, different thermal value types can be selected to meet different thermal distribution requirements, which can meet the user's customized search needs.

[0060] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any of the above implementation methods.

[0061] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the steps in any of the above-mentioned implementation methods are executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0063] Figure 1 A schematic diagram of the steps of the method for generating a temporal heat map provided in an embodiment of the present application;

[0064] Figure 2 A schematic diagram of the steps of preprocessing image data provided in an embodiment of the present application;

[0065] Figure 3 A schematic diagram of the steps of storing pedestrian recognition results in a database provided in an embodiment of the present application;

[0066] Figure 4 A schematic diagram of the steps of the dimension reduction calculation operation provided in the embodiment of the present application; and

[0067] Figure 5A schematic diagram of a temporal heat map generating device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented by a dedicated hardware-based system that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.

[0069] During the research process, the applicant found that in various business scenarios, in order to clarify the relationship between people, places and objects, cameras will be deployed, and each camera will record the interaction between people, scenes and objects. Crowds will be identified through deep learning methods to obtain the distribution of crowds at various times, but how to make good use of the information of these crowds and make valuable visualizations is particularly important. Among them, heat maps are an intuitive way to present the value of visual data, but static heat maps can only reflect the situation in a certain time period. If you want to obtain more valuable information, you need a dynamically changing heat map, that is, a temporal heat map. However, in scenarios with large traffic and big data, the drawing of temporal heat maps will face problems such as non-real-time, weak search customization, large time span, large amount of data, many calculations, long time consumption, and resource occupation.

[0070] Based on this, the embodiment of the present application provides a temporal heat map generation method, which is based on the method of reducing the time domain and grid domain of the image data, and only performs local calculation and clustering on the image data, so that a real-time temporal heat map can be drawn based on a customized search statement. Please refer to Figure 1 , Figure 1 The following is a schematic diagram of the steps of the method for generating a temporal heat map provided in an embodiment of the present application. The implementation method for generating a temporal heat map may include the following steps:

[0071] In step S11, a request signal for acquiring a temporal heat map is received, wherein the request signal includes a preset filtering condition, and the preset filtering condition includes a time parameter and a grid parameter.

[0072] The preset filtering conditions may be input by the user through the terminal, or the terminal may provide multiple options from which the user may select, wherein the time parameter is the time span displayed by the temporal heat map, and the grid parameter is the size and number of grids generated in the temporal heat map. In addition, the preset filtering conditions may also include the acquisition area of ​​the image data and the customer name, such as selecting a camera for acquiring image data, which may correspond to a customer or a store, and determining to generate a temporal heat map corresponding to the image data acquired by the camera.

[0073] In step S12, a dimension reduction parameter is calculated according to the time parameter and the grid parameter, and the image data is divided to obtain a coarse grid domain unit and a coarse time domain unit.

[0074] The coarse grid domain unit represents a segment obtained by dividing the image data into grids, and the coarse time domain unit represents a segment obtained by dividing the image data according to the time span.

[0075] In step S13, a dimension reduction calculation operation is performed on the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter to obtain a playback sequence.

[0076] Among them, the valid data is the data that meets the preset filtering conditions in the divided image data segments. The dimension reduction calculation operation on the coarse grid domain can be exemplarily understood as reducing the unit with a length of 8 grids and a width of 5 grids to a unit with a length of 6 and a width of 5 grids, so as to improve the accuracy of the thermal map by reducing the area of ​​the grid domain. The dimension reduction calculation operation on the coarse time domain unit can be exemplarily understood as shortening the image data with a time length of 1 minute to 30 seconds, so as to improve the accuracy of the thermal map by reducing the time domain.

[0077] In step S14, the heat distribution of each frame in the temporal heat map is determined according to the order of the playback sequence, the playback parameters of the temporal heat map are obtained, and the temporal heat map is drawn and returned based on the playback parameters.

[0078] Exemplarily, the user can set parameter conditions from the client, and filter the image data by inputting or selecting customer store area cameras and pedestrian attributes, so as to view only a certain part of the data, such as selecting to generate a temporal heat map of male customers aged 25 to 30 from a certain camera in a certain store in a certain area; the time span can refer to a time range of N hours, N days or N months, such as the last 5 hours, or yesterday; the playback parameter can refer to playback in units of N minutes, which can be combined according to the time span. If the time span is 1 hour, the playback parameter can be 1 minute. If the time span is 1 day, the playback parameter is set to 10 minutes; the grid accuracy can refer to the number of long grids and wide grids of the grid division, such as dividing the image data into 4 long grids and 3 wide grids. At this time, a grid of 12 grids can be divided, and the image accuracy is controlled by the number of long grids and the number of wide grids.

[0079] Optionally, when the terminal provides options to the user, a preset recommended configuration can be provided. For example, if the time span is 1 hour, the playback parameter is recommended to be 1 minute unit. If the time span is between 1 hour and 1 day, the playback parameter can be recommended to be 3 to 5 minutes. If the time span is greater than or equal to 1 day, it can be recommended to set the playback parameter to 5 to 10 minutes. If the time span is greater than 7 days, it can be recommended to set the playback parameter to 30 minutes. For grid accuracy, it can be recommended to select a 4*4 or 5*5 grid.

[0080] Users can also choose the thermal value type and thermal value change type for drawing the temporal heat map. The thermal value type refers to the type of thermal value when drawing the heat map, which can be set to a person value, a person-time value, or a stay duration value. The thermal value change type refers to whether each thermal value change is cumulatively calculated or changes independently of each other.

[0081] It can be seen that the embodiment of the present application performs local calculation and clustering on the image based on preset filtering conditions, improves data accuracy by reducing the time domain and grid domain of the image data, and draws a real-time temporal heat map from the large amount of data obtained by the camera sensor and the image data with a long time span, thereby enabling customized search and visual display. Since the screening of data is based on local calculation, it can also improve computing efficiency and reduce the occupation of computing resources.

[0082] In an optional embodiment, before receiving the request signal for obtaining the temporal heat map in step S11, the present application embodiment provides an implementation step for preprocessing the image data, see Figure 2 , Figure 2 A schematic diagram of a step of preprocessing image data provided in an embodiment of the present application, the steps of preprocessing image data may include the following:

[0083] In step S21, pedestrian recognition is performed on the image data to obtain a pedestrian recognition result, data compression and encryption are performed on the pedestrian recognition result, and the encrypted pedestrian recognition result is written into a message queue.

[0084] Pedestrians represent people that appear in the image data. People who walk or stand in the image are all in the category of "pedestrians" in this application. Pedestrian recognition results may include the unique ID of the pedestrian, the pedestrian's attributes, such as age, gender, direction, clothing, etc., and the pedestrian's affiliation, such as customer, store, region, camera, etc. By recognizing the image data, recognition results for pedestrians can be obtained one by one, so that the data is stored in units of pedestrians.

[0085] In step S22, the pedestrian recognition result is obtained from the corresponding message queue according to the user's subscription information.

[0086] Among them, the message queue is a linked list of messages. The message can be regarded as a record with a specific format and a specific priority. The process with write permission to the message queue can add new messages to the message queue according to certain rules; the process with read permission to the message queue can read messages from the message queue. The user receives a subset of all published messages by sending subscription information to the message queue, and obtains the messages that need to be received or processed by filtering. Furthermore, the message filtering method can be based on the topic or content. The topic-based filtering method will receive all messages on the subscribed topic, and the content-based filtering method allows the user to define the conditions of the message he is interested in. Only when the attributes or content of the message meet the conditions defined by the subscriber will the message be delivered to the user.

[0087] In step S23, the pedestrian recognition result is decompressed and decrypted to obtain the decrypted pedestrian recognition result, and the pedestrian recognition result is stored in a database.

[0088] It can be seen that the embodiment of the present application obtains image data from the camera sensor through message queues and message subscriptions, which can realize customized searches by users and improve the effectiveness of drawing temporal heat maps. The architecture based on message queues can realize business decoupling, data buffering, peak shaving and distribution functions, which can improve data acquisition efficiency. Consuming data in the message queue based on message subscription can also ensure consistency in the data consumption process and improve data reliability.

[0089] In an optional embodiment, the pedestrian recognition result may also include a pedestrian frame. For step S23, the embodiment of the present application also provides an implementation method for storing the pedestrian recognition result in a database. Figure 3 , Figure 3A schematic diagram of the steps of storing the pedestrian recognition results in a database provided in an embodiment of the present application, wherein the steps of storing the pedestrian recognition results in a database may include:

[0090] In step S31, based on the detection information of the pedestrian frame representing the pedestrian, the midpoint of the bottom edge of the pedestrian frame or the center point of the pedestrian frame is calculated according to the coordinate information of the pedestrian frame.

[0091] Among them, when calculating the coordinates of the midpoint of the bottom edge of the pedestrian frame, the coordinates of the two points on the bottom edge of the pedestrian frame can be added and divided by two to obtain the coordinates of the midpoint of the bottom edge. When calculating the coordinates of the center point of the pedestrian frame, the coordinates of the two points on any diagonal of the pedestrian frame can be added and divided by two to obtain the coordinates of the center point.

[0092] In step S32, the coordinates of the midpoint or the center point are combined with the pedestrian recognition result, and the combined pedestrian recognition result is stored in the database.

[0093] For example, the combined pedestrian recognition results may be stored in a database based on certain rules, such as by customer name, store name, or date. The database storing the pedestrian recognition results may be a time series database.

[0094] It can be seen that the embodiment of the present application combines the coordinates of the midpoint or center point of the pedestrian box with the pedestrian recognition result to characterize the recognition result of each pedestrian and its corresponding position information, so that the corresponding temporal heat map can be generated based on customized filtering conditions, thereby improving the efficiency of drawing the temporal heat map.

[0095] Optionally, with respect to the dimension reduction calculation operation in the above step S13, the present application embodiment provides an implementation method for performing dimension reduction calculation operation on the coarse grid domain unit and the coarse time domain unit, please refer to Figure 4 , Figure 4 A schematic diagram of the steps of the dimension reduction calculation operation provided in an embodiment of the present application, the steps of the dimension reduction calculation operation may include:

[0096] In step S41, the time span of the image data is divided according to the coarse time domain units to obtain a first coarse time domain sequence, and a coarse time domain sequence clustering statement is calculated according to the first coarse time domain sequence.

[0097] Exemplarily, the image data can be divided proportionally based on the obtained coarse time domain units to obtain a first coarse time domain sequence. By extracting similar elements in the first coarse time domain sequence, a clustering statement for the coarse time domain sequence can be constructed. This can be clustering image data with pedestrians from the coarse time domain sequence, or the number of classification clusters can be generated based on certain parameters input by the user, such as store or customer name.

[0098] In step S42, the global filtering statement and the coarse time domain sequence clustering statement are concatenated and executed to obtain the first coarse time domain sequence clustering result, and the time domain with data is selected and sorted from the first coarse time domain sequence clustering result to obtain the second coarse time domain sequence.

[0099] Among them, the global filtering statement is obtained based on the preset filtering conditions. If the preset filtering conditions input by the user are such as a store in a certain area, camera A, male, and the temporal heat map of customers aged 25 to 30, then the global filtering statement can be a programming language converted based on the above filtering conditions. By splicing and executing the global filtering statement and the time domain sequence clustering statement, the coarse time domain unit is further filtered, and the thermal value information that the user needs to search is selected from the clustered results. The time domain of the thermal value information that still exists after filtering is arranged in chronological order to obtain a second coarse time domain sequence, thereby representing the completion of the screening of the thermal value information in the time domain.

[0100] In step S43, calculation is performed on each of the coarse grid domain units according to the second coarse time domain sequence having data to obtain a coarse grid sequence clustering statement.

[0101] In step S44, the global filtering statement and the coarse grid sequence clustering statement are concatenated and executed to obtain the first coarse grid domain sequence clustering result, and grid domains with data are selected and sorted from the first coarse grid domain sequence clustering result to obtain a coarse grid domain sequence.

[0102] Exemplarily, the screening step of thermal value information in the grid domain can refer to the screening in the time domain in the above steps S41 to S42, and similar elements in the first coarse grid domain sequence are extracted to construct a clustering statement for the coarse grid domain sequence, and the coarse grid domain units are further filtered based on the splicing of global filtering statements and coarse grid sequence clustering statements, and the grid domains of thermal value information that still exist after filtering are arranged according to the number of grids or grid positions to obtain a second coarse time domain sequence, thereby representing the completion of the screening of thermal value information in the grid domain.

[0103] In step S45, it is determined whether the dimension reduction calculation operation needs to be continued according to the dimension reduction parameter. When the dimension reduction calculation operation does not need to be continued, the coarse grid domain sequence is used as the playback sequence.

[0104] Among them, the dimension reduction parameter can be calculated according to the preset filtering conditions, such as time span, playback parameters, grid accuracy or heat map thermal value type, so as to determine the number of times the data is reduced. For example, the grid accuracy is generally selected as 4*4 or 5*5. If the grid accuracy is 5, it is determined that the grids after the dimension reduction calculation operation can be 16, 9 and 4 respectively. The lowest option is 4. If it is 4, it is determined that 3 dimension reduction calculation operations are performed. If it is 16, only 1 dimension reduction calculation operation is performed. After determining the number of grid domain reduction operations , the time domain reduction can also be determined. The number of time domain reductions can be the playback unit value*(grid domain reduction number+1). For example, if the playback unit value is 10 minutes, the number of grid domain reductions is 3 times. It is determined that the time domains after the dimension reduction calculation operation are 30, 20 and 10 respectively. Then a set of dimension reduction parameter change values ​​can be obtained. The grid domain dimension reduction parameters are 25~16~9~4, of which the first 25 is a coarse grid domain unit. The time domain dimension reduction parameters are 40~30~20~10, of which the first 40 is a coarse time domain unit.

[0105] When only one dimensionality reduction calculation operation is performed, the obtained coarse grid domain sequence is used as the playback sequence, and the thermal distribution of different sequence frames is drawn in order on the base map to obtain a sequence of thermal distribution maps. For the temporal thermal maps of multiple camera sensors, the dimensionality reduction calculation operation can be performed in turn to obtain each camera sensor base map and their respective playback sequences, and the temporal thermal map is drawn based on the playback sequence.

[0106] It can be seen that the embodiment of the present application combines the coarse-grained time domain and the coarse-grained grid domain to obtain a complete time series of thermal values. By performing dimensionality reduction calculations on the image data in the time domain and the grid domain, the thermal value information in the image data can be locally clustered and filtered, thereby filtering out the thermal value information required by the user from the image data, and drawing a temporal thermal map based on the filtered thermal value information, which can reduce the occupancy of computing resources and improve drawing efficiency and data accuracy.

[0107] Optionally, when it is necessary to continue the dimension reduction calculation operation, the number of times the dimension reduction calculation operation needs to be continued is determined according to a calculation sub-parameter, and the calculation sub-parameter is obtained by the preset filtering condition.

[0108] Among them, continuing to take the grid domain dimension reduction parameters of 25~16~9~4 and the time domain dimension reduction parameters of 40~30~20~10 in the above content as an example, wherein the first dimension reduction calculation operation reduces the grid domain from 25 to 16 and the time domain from 40 to 30. Therefore, based on the grid domain dimension reduction parameters and the time domain dimension reduction parameters, it can be determined that the number of operations for continuing the dimension reduction calculation operation is two, respectively reducing the grid domain from 16 to 9 and then to 4 again, and reducing the time domain from 30 to 20 and then to 10 again.

[0109] In an optional embodiment, when multiple dimensionality reduction calculation operations are required, the above step S41 can be repeated according to the number of repetitions determined by the calculation parameters to divide the time span of the image data according to the coarse time domain units to step S44 to splice and execute the global filtering statement and the coarse grid sequence clustering statement to obtain the first coarse grid domain sequence clustering result, and select and sort the grid domains with data from the first coarse grid domain sequence clustering result to obtain the playback sequence.

[0110] Exemplarily, when a dimension reduction calculation operation is performed once, and it is determined based on the calculation of secondary parameters that the dimension reduction calculation operation needs to be continued, the coarse grid domain sequence obtained by the first dimension reduction calculation operation can be dimensionally reduced in the time domain and the grid domain again. The steps of the dimension reduction calculation operation can refer to the process of the above steps S41 to S44, and the fine time domain sequence and the fine grid domain sequence are obtained in sequence, and the corresponding fine query statement is obtained based on the fine time domain sequence and the fine grid domain sequence. According to the global filtering statement and the fine query statement, a second search clustering is performed to obtain the clustering result of the fine query sequence. When the current dimension reduction calculation operation is the last dimension reduction calculation operation, a complete minimum unit playback sequence is obtained. For a time domain without data, the data can be enlarged to the playback domain, but the value is 0. Finally, based on the obtained playback sequence, the thermal distribution of different sequence frames is sequentially drawn on the base map to obtain a sequence of thermal distribution maps. For the temporal thermal maps of multiple camera sensors, the dimension reduction calculation operation can be performed in sequence to obtain each camera sensor base map and their respective playback sequences, and the temporal thermal map is drawn based on the playback sequence.

[0111] It can be seen that the embodiment of the present application can perform fine-grained processing on coarse-grained domain information to obtain fine-grained domain information, which can improve the precision of data clustering and make the drawn temporal heat map more consistent with the user's specified attributes.

[0112] In an optional embodiment, the preset filtering condition may include a thermal value type, the thermal value type represents a display method of the thermal value when drawing a thermal map, and returning the temporal thermal map may include:

[0113] At least one of a heat map of the number of people, a heat map of the number of times of travel, and a heat map of the length of time a pedestrian stays is returned based on the heat value type.

[0114] It can be seen that the embodiment of the present application can select different thermal value types to meet different thermal distribution requirements and can meet the user's customized search needs.

[0115] Based on the same inventive concept, the present application embodiment also provides a temporal heat map generating device 50, please refer to Figure 5 , Figure 5 A schematic diagram of a temporal heat map generating device provided in an embodiment of the present application, the temporal heat map generating device 50 may include:

[0116] The signal receiving module 51 is used to receive a request signal for obtaining a temporal heat map, wherein the request signal includes a preset filtering condition, and the preset filtering condition includes a time parameter and a grid parameter.

[0117] The division module 52 is used to calculate the dimension reduction parameter according to the time parameter and the grid parameter, and divide the image data to obtain coarse grid domain units and coarse time domain units.

[0118] The analysis and calculation module 53 is used to perform a dimension reduction calculation operation on the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter to obtain a playback sequence.

[0119] The drawing module 54 is used to determine the heat distribution of each frame in the temporal heat map according to the order of the playback sequence, obtain the playback parameters of the temporal heat map, draw and return the temporal heat map based on the playback parameters.

[0120] Optionally, the temporal heat map generating device 50 may further include a preprocessing module, which is used to perform pedestrian recognition on the image data to obtain a pedestrian recognition result, perform data compression and encryption on the pedestrian recognition result, and write the encrypted pedestrian recognition result into a message queue; obtain the pedestrian recognition result from the corresponding message queue according to the user's subscription information; and perform data decompression and decryption on the pedestrian recognition result to obtain the decrypted pedestrian recognition result, and store the pedestrian recognition result into a database.

[0121] Optionally, the pedestrian recognition result may include a pedestrian frame, and the preprocessing module may be specifically used to calculate the midpoint of the bottom edge of the pedestrian frame or the center point of the pedestrian frame based on the detection information of the pedestrian frame, according to the coordinate information of the pedestrian frame; and combine the coordinates of the midpoint or the center point with the pedestrian recognition result, and store the combined pedestrian recognition result in the database.

[0122] Optionally, the analysis and calculation module 53 may be specifically used for:

[0123] Dividing the time span of the image data according to the coarse time domain units to obtain a first coarse time domain sequence, and calculating a coarse time domain sequence clustering statement according to the first coarse time domain sequence;

[0124] splicing and executing a global filtering statement and the coarse time domain sequence clustering statement to obtain the first coarse time domain sequence clustering result, selecting and sorting the time domain with data from the first coarse time domain sequence clustering result to obtain a second coarse time domain sequence, wherein the global filtering statement is obtained based on the preset filtering condition;

[0125] Calculate each of the coarse grid domain units according to the second coarse time domain sequence with data to obtain a coarse grid sequence clustering statement;

[0126] splicing and executing the global filtering statement and the coarse grid sequence clustering statement to obtain the first coarse grid domain sequence clustering result, selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain a coarse grid domain sequence;

[0127] The dimension reduction calculation operation of the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter includes:

[0128] It is determined whether the dimension reduction calculation operation needs to be continued according to the dimension reduction parameter, and when the dimension reduction calculation operation does not need to be continued, the coarse grid domain sequence is used as the playback sequence.

[0129] Optionally, the analysis and calculation module 53 may also be used to determine the number of times the dimension reduction calculation operation needs to be continued according to a calculation sub-parameter when the dimension reduction calculation operation needs to be continued, and the calculation sub-parameter is obtained by the preset filtering condition.

[0130] Optionally, the analysis and calculation module 53 can also be used to repeat the steps of dividing the time span of the image data according to the coarse time domain units into the splicing and executing the global filtering statement and the coarse grid sequence clustering statement according to the number of operations to obtain the first coarse grid domain sequence clustering result, and selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain the playback sequence.

[0131] Optionally, the preset filtering condition may include a thermal value type, which represents a display mode of the thermal value when drawing a thermal map. The drawing module 54 may be specifically used for:

[0132] At least one of a heat map of the number of people, a heat map of the number of times of travel, and a heat map of the length of time a pedestrian stays is returned based on the heat value type.

[0133] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein program instructions are stored in the memory, and when the processor reads and runs the program instructions, the steps in any of the above implementation methods are executed.

[0134] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the steps in any of the above implementation methods are executed.

[0135] The computer-readable storage medium may be a random access memory (RAM), 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 any other medium that can store program codes. The storage medium is used to store the program, and the processor executes the program after receiving the execution instruction. The method executed by the electronic terminal of the process definition disclosed in any embodiment of the present invention can be applied to the processor or implemented by the processor.

[0136] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0137] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0139] Alternatively, the present invention may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the present invention may 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 process or function described in the embodiment of the present invention is generated in whole or in part.

[0140] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0141] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0142] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating a temporal heat map, characterized in that: include: Receive a request signal for obtaining a temporal heat map; wherein the request signal includes a preset filtering condition, and the preset filtering condition includes a time parameter and a grid parameter; Calculating a dimension reduction parameter according to the time parameter and the grid parameter, and dividing the image data to obtain a coarse grid domain unit and a coarse time domain unit; Performing a dimension reduction calculation operation on the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter to obtain a playback sequence; and Determine the heat distribution of each frame in the temporal heat map according to the order of the playback sequence, obtain the playback parameters of the temporal heat map, and draw and return the temporal heat map based on the playback parameters; The dimension reduction calculation operation includes: Dividing the time span of the image data according to the coarse time domain units to obtain a first coarse time domain sequence, and calculating a coarse time domain sequence clustering statement according to the first coarse time domain sequence; splicing and executing a global filtering statement and the coarse time domain sequence clustering statement to obtain the first coarse time domain sequence clustering result, selecting and sorting the time domain with data from the first coarse time domain sequence clustering result to obtain a second coarse time domain sequence; wherein the global filtering statement is obtained based on the preset filtering condition; Calculating each of the coarse grid domain units according to the second coarse time domain sequence having data to obtain a coarse grid sequence clustering statement; and splicing and executing the global filtering statement and the coarse grid sequence clustering statement to obtain the first coarse grid domain sequence clustering result, selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain a coarse grid domain sequence; Among them, the dimension reduction calculation operation based on the dimension reduction parameters on the coarse grid domain units and the coarse time domain units containing valid data includes: judging whether it is necessary to continue the dimension reduction calculation operation according to the dimension reduction parameters, and when it is not necessary to continue the dimension reduction calculation operation, using the coarse grid domain sequence as the playback sequence.

2. The method according to claim 1, characterized in that Before receiving a request signal for acquiring a temporal heat map, the method further includes: Performing pedestrian recognition on the image data to obtain a pedestrian recognition result, compressing and encrypting the pedestrian recognition result, and writing the encrypted pedestrian recognition result into a message queue; Obtaining the pedestrian recognition result from the corresponding message queue according to the user's subscription information; and The pedestrian recognition result is decompressed and decrypted to obtain the decrypted pedestrian recognition result, and the pedestrian recognition result is stored in a database.

3. The method according to claim 2, characterized in that in, The pedestrian recognition result includes a pedestrian frame; and storing the pedestrian recognition result in a database includes: Based on the detection information of the pedestrian representing the pedestrian, the midpoint of the bottom edge of the pedestrian frame or the center point of the pedestrian frame is calculated according to the coordinate information of the pedestrian frame; and The coordinates of the midpoint or the center point are combined with the pedestrian recognition result, and the combined pedestrian recognition result is stored in the database.

4. The method according to claim 1, characterized in that: The method further comprises: When it is necessary to continue the dimension reduction calculation operation, the number of times the dimension reduction calculation operation needs to be continued is determined according to a calculation sub-parameter; wherein the calculation sub-parameter is obtained by the preset filtering condition.

5. The method according to claim 4, characterized in that After determining the number of operations of continuing the dimension reduction calculation operation according to the calculation sub-parameter, the method further includes: Repeat the steps of dividing the time span of the image data according to the coarse time domain units into the splicing and executing the global filtering statement and the coarse grid sequence clustering statement according to the number of operations to obtain the first coarse grid domain sequence clustering result, and selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain the playback sequence.

6. The method according to any one of claims 1 to 5, characterized in that: in, The preset filtering condition includes a thermal value type, and the thermal value type represents the display mode of the thermal value when drawing a thermal map; and the returning of the temporal thermal map includes: At least one of a heat map of the number of people, a heat map of the number of times of travel, and a heat map of the length of time a pedestrian stays is returned based on the heat value type.

7. A temporal heat map generation device, characterized in that: include: A signal receiving module, used to receive a request signal for obtaining a temporal heat map; wherein the request signal includes a preset filtering condition, and the preset filtering condition includes a time parameter and a grid parameter; A division module, used for calculating a dimension reduction parameter according to the time parameter and the grid parameter, and dividing the image data to obtain a coarse grid domain unit and a coarse time domain unit; an analysis and calculation module, configured to perform a dimension reduction calculation operation on the coarse grid domain unit and the coarse time domain unit containing valid data based on the dimension reduction parameter to obtain a playback sequence; and A drawing module, used to determine the heat distribution of each frame in the temporal heat map according to the order of the playback sequence, obtain the playback parameters of the temporal heat map, and draw and return the temporal heat map based on the playback parameters; The analysis and calculation module is specifically used for: Dividing the time span of the image data according to the coarse time domain units to obtain a first coarse time domain sequence, and calculating a coarse time domain sequence clustering statement according to the first coarse time domain sequence; splicing and executing a global filtering statement and the coarse time domain sequence clustering statement to obtain the first coarse time domain sequence clustering result, selecting and sorting the time domain with data from the first coarse time domain sequence clustering result to obtain a second coarse time domain sequence; wherein the global filtering statement is obtained based on the preset filtering condition; Calculating each of the coarse grid domain units according to the second coarse time domain sequence having data to obtain a coarse grid sequence clustering statement; and splicing and executing the global filtering statement and the coarse grid sequence clustering statement to obtain the first coarse grid domain sequence clustering result, selecting and sorting the grid domains with data from the first coarse grid domain sequence clustering result to obtain a coarse grid domain sequence; Among them, the dimension reduction calculation operation based on the dimension reduction parameters on the coarse grid domain units and the coarse time domain units containing valid data includes: judging whether it is necessary to continue the dimension reduction calculation operation according to the dimension reduction parameters, and when it is not necessary to continue the dimension reduction calculation operation, using the coarse grid domain sequence as the playback sequence.

8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores program instructions, and when the processor runs the program instructions, the steps in the method according to any one of claims 1 to 6 are executed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps in the method according to any one of claims 1 to 6 are executed.