Background technique
With increasingly developed, the optimization and iteration of the model algorithms such as deep learning, neural network of artificial intelligence, machine is known
Not Chu people accuracy it is very nearly the same with the recognition accuracy of the mankind.Meanwhile based on the body position for identifying people
Using being also more and more.Under the scene of business intelligence, the time-space relationship for clearing object and people is particularly important.It is recorded by camera
Servant interacts situation with object, and the position of identification people is gone to by the method for deep learning, just can know that crowd position sometime
It sets, but how to make good use of the position data of these crowds, under big flow, the scene of big data, still can accurately polymerize people
The temperature distribution of group is particularly important.
Apply for content
In view of this, the embodiment of the present application provides a kind of crowd's thermodynamic chart preparation method and device.
In a first aspect, the embodiment of the present application provides a kind of crowd's thermodynamic chart preparation method, which comprises according to net
Diagrid selects query statement, obtains multiple crowd's heating power distribution maps in the first preset time period;Obtain multiple described crowd's heating power
Coordinate value corresponding to the pedestrian on every crowd's heating power distribution map in distribution map;Preset quantity is fallen according to the coordinate value
Grid in edge data section, obtain the coordinate points for the people that each grid in the grid of the preset quantity stopped
And number;The coordinate points of the people stopped in each grid are averaged, as the average coordinates point of the grid, by people
Number is labeled in the corresponding position of the average coordinates point, forms crowd's thermodynamic chart.
In a possible design, query statement is screened according to grid described, is obtained in the first preset time period
Before multiple crowd's heating power distribution maps, the method also includes: it receives crowd's distributed heat and tries hard to be requested;According to the crowd
Distribution thermodynamic chart is requested, and construction grid screens query statement.
In a possible design, before receiving crowd's distributed heat and trying hard to be requested, the method also includes: from
Compressed data is obtained in message queue;The compressed data is decompressed, is arranged, the image data after being decompressed;Label
Out in image data people key position point;The image data for marking the key position point is stored to the time series data
Library.
In a possible design, from message queue obtain compressed data before, the method also includes: obtain
Position of human body recognition result data;The recognition result data are pre-processed;By pretreated data transmit to
In the message queue.
In a possible design, before the acquisition position of human body recognition result data, the method also includes:
Obtain the video flowing of camera acquisition;Control graphics processor handles the video flowing, obtains the position of human body and knows
Other result data.
Second aspect, the embodiment of the present application provide a kind of crowd's thermodynamic chart acquisition device, and described device includes: heating power point
Cloth module obtains multiple crowd's heating power distribution maps in the first preset time period for screening query statement according to grid;It sits
Scale value obtains module, right for obtaining the pedestrian institute on every crowd's heating power distribution map in multiple described crowd's heating power distribution maps
The coordinate value answered;Grid data module, for falling in the edge data section in the grid of preset quantity according to the coordinate value,
Obtain the coordinate points and number of the people that each grid in the grid of the preset quantity stopped;Thermodynamic chart forms mould
Block, for being averaged the coordinate points of the people stopped in each grid, as the average coordinates point of the grid, by number
It is labeled in the corresponding position of the average coordinates point, forms crowd's thermodynamic chart.
In a possible design, described device further include: request receiving module is tried hard to for receiving crowd's distributed heat
It is requested;Query statement constructing module, for being requested according to the Crowds Distribute thermodynamic chart, construction grid screening inquiry
Sentence.
In a possible design, described device further include: compressed data obtains module, for obtaining from message queue
Take compressed data;Sorting module is decompressed, for being decompressed, being arranged, the image data after being decompressed to the compressed data;
Position mark module, for marking the key position point of people in image data;Data memory module, it is described for that will mark
The image data of key position point is stored to the time series database.
In a possible design, described device further include: result data obtains module, knows for obtaining position of human body
Other result data;Data preprocessing module, for being pre-processed to the recognition result data;Data packing block is used for
Pretreated data are transmitted into the message queue.
In a possible design, described device further include: video flowing acquisition module, for obtaining camera acquisition
Video flowing;Recognition result data module is handled the video flowing for controlling graphics processor, obtains the human body position
Set recognition result data.
In crowd's thermodynamic chart preparation method provided by the embodiments of the present application and device, which comprises according to grid
Query statement is screened, multiple crowd's heating power distribution maps in the first preset time period are obtained;Obtain described multiple crowd's heating power point
Coordinate value corresponding to the pedestrian on every crowd's heating power distribution map in Butut;Preset quantity is fallen according to the coordinate value
Edge data section in grid, obtain the coordinate points for the people that each grid in the grid of the preset quantity stopped with
And number;The coordinate points of the people stopped in each grid are averaged, as the average coordinates point of the grid, by number
It is labeled in the corresponding position of the average coordinates point, forms crowd's thermodynamic chart.It is default that the embodiment of the present application can first obtain first
Multiple crowd's heating power distribution maps in period obtain the corresponding coordinate value of pedestrian on every crowd's heating power distribution map, according to seat
Scale value falls in the edge data section in the grid of preset quantity, obtains coordinate points and the people of the people that each grid stopped
The coordinate points of the people stopped in each grid, are then averaged, as the average coordinates point of the grid, by number mark by number
Note is in corresponding position so that crowd's thermodynamic chart is formed, so that the display of data becomes more intuitive.
Above objects, features, and advantages to enable the embodiment of the present application to be realized are clearer and more comprehensible, be cited below particularly compared with
Good embodiment, and cooperate appended attached drawing, it is described in detail below.
Specific embodiment
First embodiment
Referring to Figure 1, Fig. 1 shows the process signal of crowd's thermodynamic chart preparation method of the application first embodiment offer
Figure, specifically comprises the following steps:
Step S110 screens query statement according to grid, obtains multiple crowd's heating power distribution in the first preset time period
Figure.
Grid screening query statement can be according to the time and carry out screening inquiry, for example, can to shoot one whole for camera
It, and grid screening query statement can choose certain time period, such as August 21 at 4 points in afternoon to 5 points, when then obtaining this
Between multiple crowd's heating power distribution maps in section.
Before step S110, the method also includes: it receives crowd's distributed heat and tries hard to be requested;According to the crowd
Distribution thermodynamic chart is requested, and construction grid screens query statement.
Crowds Distribute thermodynamic chart, which obtains request, specifically can be user by held terminal device initiation, and user initiates
Afterwards, crowd's distributed heat is received by controller to try hard to be requested.Crowd's distributed heat tries hard to obtain request to may include being intended to obtain
Location information corresponding to the temporal information of Crowds Distribute thermodynamic chart, Crowds Distribute.
Image may be made of multiple grids, therefore can construct grid screening query statement to judge in multiple grids
Some specific grid carry out screening inquiry.
Before receiving crowd's distributed heat and trying hard to be requested, Fig. 2 is referred to, further includes following steps:
Step S101, obtains compressed data from message queue.
Fig. 5 is referred to, Fig. 5 shows crowd's thermodynamic chart and obtains system, which includes message queue 13, message subscribing mould
Block 14, data preprocessing module 15, data storage module 16 and database 17.
Data after message queue 13 can mainly identify position of human body are stored in queue, as data source, also conduct
Buffer strip provides subsequent data processing.Data in message queue 13 are to pass through compressed data.Message subscribing module 14
It is mainly responsible for and obtains compressed data from message queue 13.
Fig. 3 is referred to, before step S101, can also be included the following steps:
Step S11 obtains position of human body recognition result data.
Specifically, the video flowing of available camera acquisition;Control graphics processor handles the video flowing,
Obtain the position of human body recognition result data.
Step S12 pre-processes the recognition result data.
Recognition result data are pre-processed, including verifying the correctness of data, arranging data structure and compressed data.
Step S13 transmits pretreated data into the message queue.
It carried out pretreated data and can be packaged to be sent in message queue.
Step S102, decompresses the compressed data, is arranged, the image data after being decompressed.
Data preprocessing module 15 is mainly responsible for decompression data, arranges data structure.
Step S103 marks the key position point of people in image data.
Data preprocessing module 15 can be also responsible for calculating the key point of position of human body simultaneously, it is therefore an objective to obtain the position of people's standing
It sets a little.
Step S104 stores the image data for marking the key position point to the time series database.
Preprocessed good data are mainly saved in database 17 by data storage module 16 according to certain rules.
Step S120, the pedestrian institute obtained on every crowd's heating power distribution map in multiple described crowd's heating power distribution maps are right
The coordinate value answered.
Specifically, the pedestrian on crowd's heating power distribution map can be framed, then obtains the bottom of the corresponding frame of pedestrian
Midpoint, using the midpoint of the bottom as coordinate value corresponding to the pedestrian.It specifically, can be by every crowd's heating power distribution map
Length and it is wide uniformly turn to 0 to 1, for example, if a length of 20cm of crowd's heating power distribution map, width 18cm, certain a group traveling together is at this
The position at the midpoint of the bottom of the frame in figure is a length of 9cm, and width is at 8cm, then corresponding coordinate value is (9/20,8/18), i.e.,
(0.45,0.44).Step S130 falls in the edge data section in the grid of preset quantity according to the coordinate value, obtains institute
State the coordinate points and number of the people that each grid in the grid of preset quantity stopped.
Can be by the length to unitize and wide progress equal part, such as ten equal parts, the number of acquisition can be carried out with wide to long
According to section be 0.1, i.e., 0 to 0.1,0.1 to 0.2,0.2 to 0.3,0.3 to 0.4,0.4 to 0.5,0.5 to 0.6,0.6 to 0.7,
0.7 to 0.8,0.8 to 0.9,0.9 to 1.0.Therefore coordinate value (0.45,0.44) falls in the data field that long section is 0.4 to 0.5
In, in the data interval that wide section is 0.4 to 0.5.Unitized length and the wide bisector for carrying out equal part may be constructed
Grid.
The coordinate points and number of the people that each grid stopped can be obtained through the above way.
The coordinate points of the people stopped in each grid are averaged by step S140, the average seat as the grid
Number is labeled in the corresponding position of the average coordinates point, forms crowd's thermodynamic chart by punctuate.
The coordinate points of the people stopped in each grid are averaged, as the average coordinates point of the grid, for example (,) it is right
In stopping 5 people in grid A, the first preset time period, then coordinate points (abscissa value and the ordinate of 5 people can be obtained
Value), the average of abscissa value and the average of ordinate value, the average abscissa value of acquisition, average vertical seat are then taken respectively
Then scale value is labeled in the corresponding position of average coordinates point for 5, to form crowd's thermodynamic chart as average coordinates point.
The application first embodiment can first obtain multiple crowd's heating power distribution maps in the first preset time period, obtain every
The corresponding coordinate value of pedestrian on Zhang Renqun heating power distribution map, the edge data area in the grid of preset quantity is fallen according to coordinate value
Between, the coordinate points and number of the people that each grid stopped are obtained, then by the coordinate points of the people stopped in each grid
It is averaged, as the average coordinates point of the grid, number is labeled in corresponding position to form crowd's thermodynamic chart, so that
The display of data becomes more intuitive.
Second embodiment
Fig. 4 is referred to, crowd's thermodynamic chart that Fig. 4 shows the offer of the application second embodiment obtains device, the device 300
Include:
Heating power is distributed module 310, for screening query statement according to grid, obtains multiple in the first preset time period
Crowd's heating power distribution map.
Grid dividing module 320, for obtaining every crowd's heating power distribution map in multiple described crowd's heating power distribution maps
On pedestrian corresponding to coordinate value.
Grid data module 330, for for falling in the edge data in the grid of preset quantity according to the coordinate value
Section obtains the coordinate points and number of the people that each grid in the grid of the preset quantity stopped.
Thermodynamic chart forms module 340, for being averaged the coordinate points of the people stopped in each grid, as this
Number is labeled in the corresponding position of the average coordinates point, forms crowd's thermodynamic chart by the average coordinates point of grid.
Described device further include: request receiving module tries hard to be requested for receiving crowd's distributed heat;Query statement structure
Modeling block, for being requested according to the Crowds Distribute thermodynamic chart, construction grid screens query statement.Compressed data obtains mould
Block, for obtaining compressed data from message queue;Sorting module is decompressed, for being decompressed, being arranged to the compressed data,
Image data after being decompressed;Position mark module, for marking the key position point of people in image data;Data storage
Module, for storing the image data for marking the key position point to the time series database.
Result data obtains module, for obtaining position of human body recognition result data;Data preprocessing module, for institute
Recognition result data are stated to be pre-processed;Data packing block, for transmitting pretreated data to the message
In queue.
Video flowing acquisition module, for obtaining the video flowing of camera acquisition;Recognition result data module is used for control figure
Shape processor handles the video flowing, obtains the position of human body recognition result data.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
Specific work process, no longer can excessively be repeated herein with reference to the corresponding process in preceding method.
The application also provides a kind of electronic equipment, comprising: processor, memory and bus, the memory storage is
The executable machine readable instructions of processor are stated, when electronic equipment operation, between the processor and the memory
By bus communication, method described in first embodiment is executed when the machine readable instructions are executed by the processor.
The application also provides a kind of computer readable storage medium, is stored with computer on the computer readable storage medium
Program executes method described in first embodiment when the computer program is run by processor.
The application also provides a kind of computer program product to be made when the computer program product is run on computers
It obtains computer and executes method described in first embodiment.
In crowd's thermodynamic chart preparation method provided by the embodiments of the present application and device, which comprises according to grid
Query statement is screened, multiple crowd's heating power distribution maps in the first preset time period are obtained;Obtain described multiple crowd's heating power point
Coordinate value corresponding to the pedestrian on every crowd's heating power distribution map in Butut;Preset quantity is fallen according to the coordinate value
Edge data section in grid, obtain the coordinate points for the people that each grid in the grid of the preset quantity stopped with
And number;The coordinate points of the people stopped in each grid are averaged, as the average coordinates point of the grid, by number
It is labeled in the corresponding position of the average coordinates point, forms crowd's thermodynamic chart.It is default that the embodiment of the present application can first obtain first
Multiple crowd's heating power distribution maps in period obtain the corresponding coordinate value of pedestrian on every crowd's heating power distribution map, according to seat
Scale value falls in the edge data section in the grid of preset quantity, obtains coordinate points and the people of the people that each grid stopped
The coordinate points of the people stopped in each grid, are then averaged, as the average coordinates point of the grid, by number mark by number
Note is in corresponding position so that crowd's thermodynamic chart is formed, so that the display of data becomes more intuitive.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description
Specific work process, no longer can excessively be repeated herein with reference to the corresponding process in preceding method.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
For device class embodiment, since it is basically similar to the method embodiment, so being described relatively simple, related place ginseng
See the part explanation of embodiment of the method.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through it
Its mode is realized.The apparatus embodiments described above are merely exemplary, for example, the flow chart and block diagram in attached drawing are aobvious
The device of multiple embodiments according to the application, architectural framework in the cards, the function of method and computer program product are shown
It can and operate.In this regard, each box in flowchart or block diagram can represent one of a module, section or code
Point, a part of the module, section or code includes one or more for implementing the specified logical function executable
Instruction.It should also be noted that function marked in the box can also be attached to be different from some implementations as replacement
The sequence marked in figure occurs.For example, two continuous boxes can actually be basically executed in parallel, they sometimes may be used
To execute in the opposite order, this depends on the function involved.It is also noted that each of block diagram and or flow chart
The combination of box in box and block diagram and or flow chart can be based on the defined function of execution or the dedicated of movement
The system of hardware is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.It needs
Illustrate, herein, relational terms such as first and second and the like be used merely to by an entity or operation with
Another entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this realities
The relationship or sequence on border.Moreover, the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability
Contain, so that the process, method, article or equipment for including a series of elements not only includes those elements, but also including
Other elements that are not explicitly listed, or further include for elements inherent to such a process, method, article, or device.
In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element
Process, method, article or equipment in there is also other identical elements.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field
For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair
Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.It should also be noted that similar label and letter exist
Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing
It is further defined and explained.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.