CN110636258A - Method, device, equipment and storage medium for analyzing peer personnel - Google Patents

Method, device, equipment and storage medium for analyzing peer personnel Download PDF

Info

Publication number
CN110636258A
CN110636258A CN201910846226.6A CN201910846226A CN110636258A CN 110636258 A CN110636258 A CN 110636258A CN 201910846226 A CN201910846226 A CN 201910846226A CN 110636258 A CN110636258 A CN 110636258A
Authority
CN
China
Prior art keywords
snapshot
time
records
record
personnel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910846226.6A
Other languages
Chinese (zh)
Other versions
CN110636258B (en
Inventor
吴翔
王夷
吴鹏
葛华
魏宝辉
郭晓丹
俞楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Dongfang Wangli Technology Co Ltd
Netposa Technologies Ltd
Original Assignee
Sichuan Dongfang Wangli Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Dongfang Wangli Technology Co Ltd filed Critical Sichuan Dongfang Wangli Technology Co Ltd
Priority to CN201910846226.6A priority Critical patent/CN110636258B/en
Publication of CN110636258A publication Critical patent/CN110636258A/en
Application granted granted Critical
Publication of CN110636258B publication Critical patent/CN110636258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a peer analysis method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a snapshot record of each snapshot device at each snapshot time; grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment; aiming at the snapshot records of each snapshot device in each group, determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence, and updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time of which the time difference with the current snapshot time is smaller than a preset time interval and the previous snapshot time of the current snapshot time for the snapshot time of each snapshot record; and comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing personnel data included in two snapshot records with a time interval smaller than a preset time interval so as to determine the personnel in the same row. The operation efficiency in the calculation task of the same row of the personnel is improved.

Description

Method, device, equipment and storage medium for analyzing peer personnel
Technical Field
The invention relates to the technical field of intelligent security and protection, in particular to a method, a device, equipment and a storage medium for analyzing peer personnel.
Background
In the field of intelligent security, the face snapshot camera undertakes important information acquisition work, and the snapshot face photos and the data after the face photo feature extraction provide powerful technical support for public security organs to break and obtain cases and prevent crime cases. The face snapshot camera is applied to the field of face comparison, and can analyze the co-operation condition of people through the result of the face snapshot camera so as to help a public security organization dig out more hidden relations according to the co-operation condition of the face, further help the public security organization to break cases and attack illegal groups.
With the increase of face snapshot devices, the number of the snapshot photos can reach ten million or more every day, and the application of the traditional statistical method to perform personnel peer-to-peer calculation consumes a large amount of time and is low in efficiency.
Disclosure of Invention
In view of this, a peer analysis method, device, apparatus and storage medium are provided to solve the problems of large calculation amount and low efficiency when analyzing peer by using snapshot technology in the prior art.
The invention adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a peer analysis method, where the method includes:
acquiring a snapshot record of each snapshot device at each snapshot time;
grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment;
determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence aiming at the snapshot records of each snapshot device in each group, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval;
for the snapshot time of each snapshot record, updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time with the time difference with the current snapshot time being smaller than a preset time interval and the previous snapshot time of the current snapshot time;
and comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing personnel data included in two snapshot records with the preset time interval to determine the personnel in the same row.
In a second aspect, an embodiment of the present application provides a peer analysis apparatus, including:
the snapshot record acquisition module is used for acquiring snapshot records of each snapshot device at each snapshot time;
the grouping module is used for grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment;
the initial time window determining module is used for determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence aiming at the snapshot records of each snapshot device in each group, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval;
the time window updating module is used for updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time with the time difference with the current snapshot time being smaller than a preset time interval and the previous snapshot time of the current snapshot time for the snapshot time of each snapshot record;
and the peer personnel analysis module is used for comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing personnel data included in two snapshot records with a preset time interval to determine the peer personnel.
In a third aspect, an embodiment of the present application provides an apparatus, including:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the peer analysis method according to the first aspect of the embodiment of the present application;
the processor is used for calling and executing the computer program in the memory.
In a fourth aspect, an embodiment of the present application provides a storage medium, where the storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps in the peer analysis method according to the first aspect.
By adopting the technical scheme, the invention obtains the snapshot record of each snapshot device at each snapshot time; grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment; therefore, a large-scale parallel computing task can be divided into a plurality of small-scale computing tasks which are executed concurrently, so that the computing efficiency is improved, and the computing time is reduced; in addition, aiming at the snapshot records of each snapshot device in each group, the time window comprising the snapshot records is determined according to the preset time sequence, and then the time window is updated according to the current snapshot time, so that the strategy ensures that the current snapshot time is not required to be compared with other snapshot times outside the time window, and only the current snapshot time is required to be compared with the snapshot time of the snapshot records in the time window, and personnel data in two snapshot records which are smaller than the preset time interval are analyzed to determine the personnel in the same row, thereby reducing the calculated amount and improving the calculation efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a peer analysis method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another peer analysis method provided by the embodiment of the invention;
fig. 3 is a schematic structural diagram of a peer analysis apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
First, a scene applicable to the embodiment of the present application is described, a face snapshot device may capture a face picture through the device, and then based on the picture/picture information, it may be calculated which people have been in the same bank at what time, so that an analysis result may be provided to a public security officer to help the public security officer to perform a case handling. Illustratively, the condition that two persons are in the same line is set to pass through the same face snapshot device within t seconds, and t is a parameter and can be adjusted according to actual needs.
Examples
Fig. 1 is a flowchart of a peer analysis method according to an embodiment of the present invention, where the method may be executed by a peer analysis apparatus according to an embodiment of the present invention, and the apparatus may be implemented in software and/or hardware. Referring to fig. 1, the method may specifically include the following steps:
s101, capturing the capturing records of the capturing devices at the capturing moments.
The capturing device in the embodiment of the present application may be a face capturing device, and exemplarily, the face capturing device may be a face recognition capturing camera. The face recognition snapshot camera can track, recognize and intelligently amplify faces, belongs to a high-definition monitoring intelligent camera, overcomes the defect that a traditional camera can only see the approximate outline of a person, can directly capture the faces, and can capture and record the faces as long as the face recognition snapshot camera enters a monitoring range.
Specifically, in combination with an actual application scenario, in peer personnel analysis, capturing records of each capturing device at each capturing time are usually obtained, and each capturing device may be distributed at different positions, for example, at an intersection, a hospital, a restaurant, or a school doorway. In the peer-to-peer analysis, a time interval is usually set, for example, a peer-to-peer situation of people in a certain date range, for example, a peer-to-peer situation of people in a range from 0 point 7/29/2018 to 24 points 3/8/2018 is analyzed. The respective capturing times may be determined by capturing when a pedestrian is detected to pass. Therefore, in a certain time interval, a plurality of snapshot records exist in each snapshot device.
Optionally, the snapshot record includes a serial number of the snapshot record and snapshot data in the snapshot record. In order to distinguish each snapshot record, each snapshot record is numbered, and the numbering principle can be that the serial number carries the device information of the snapshot device, or the serial number is numbered according to a certain rule after the snapshot is completed, and the numbering is not limited here. In addition, the numbers of different snapshot records in the same snapshot device can be distinguished. And the snapshot data may be face data included in the snapshot picture, or the like.
And S102, grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment.
Specifically, in an actual application process, hundreds or even thousands of snapshot devices are arranged in a certain time interval to be researched and a certain set area, and at the moment, in order to shorten the overall calculation time and improve the calculation efficiency, the snapshot records are grouped, so that the calculation task can be decomposed into a plurality of small calculation tasks for parallel calculation, the calculation efficiency can be improved, and the calculation time can be reduced. During grouping calculation, the final calculation result is not influenced as long as the snapshot records of the same snapshot device are guaranteed to be calculated in the same group. Therefore, the snapshot records are grouped according to the equipment numbers and the grouping numbers of the snapshot equipment, so that the snapshot records after the grouping can be processed in parallel, and the recorded data difference processed by each subtask can be ensured not to be large.
Optionally, the number of packets is determined according to the number of cores of a central processing unit of the server. In a specific example, the number of groups to be calculated in parallel is set to be an integer n, where n depends on the number of cores of a Central Processing Unit (CPU) of a server used for calculation, so that the data amount allocated to each group is as consistent as possible, and further, the calculation is finished in a short time for each group, thereby effectively reducing the calculation time. And then the defect that the computing capacity of the CPU can not be fully utilized when n is less than the number of the CPU cores is avoided, and the defect that the computing efficiency can not be effectively improved because one CPU core needs to compute two or more tasks simultaneously when n is more than the number of the CPU cores is also avoided. This distributes the snapshot records into n packets. In this way, the parallel computing task with large computing amount is decomposed into a plurality of tasks with small computing amount for parallel computing, a plurality of CPU cores of the server are fully utilized, and the overall computing time is shortened.
S103, aiming at the snapshot records of each snapshot device in each group, determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval.
Each group is discussed below as an example, and other groups are processed in the same flow to identify peer members. In a group, there are several capturing devices, and then, a capturing device in a group is taken as an example to illustrate how to determine the fellow passenger.
The concept of a time window, which may also be referred to as a recording window, is defined here, each device being assigned a time window, the starting and ending instants of which and the respective instants included in between being variable, the instants here being referred to as snapshot instants. For the time window, it is invariable that the time difference between the snapshot times included in the time window all the time does not exceed the preset time interval, and each snapshot time has a snapshot record. The preset time interval is a parameter set manually, and may be adjusted, and in a specific example, may be 5 seconds.
Specifically, each snapshot record corresponds to a snapshot time, and for each snapshot record of one snapshot device, an initial time window is determined according to a first snapshot time and a second snapshot time according to a preset time sequence, wherein a time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval. The second snapshot time is not the snapshot time corresponding to the second snapshot record in the time sequence, but needs to satisfy the snapshot time corresponding to the snapshot record of which the time difference with the first snapshot time is smaller than the preset time interval. Thus, an initial time window is first determined and then continuously updated.
And S104, updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time with the time difference with the current snapshot time being smaller than the preset time interval and the previous snapshot time of the current snapshot time for the snapshot time of each snapshot record.
Specifically, the time window is updated in real time, and the purpose of updating is to analyze the personnel in the same group with the snapshot record of the current snapshot time by using the latest time window. The time window is updated by removing the snapshot record with a smaller time label and adding the snapshot record with a larger time label, and the specific removing and adding modes include a plurality of modes, wherein the modes are not listed one by one. Regarding the snapshot time of each snapshot record, taking the current snapshot time as a standard, taking the maximum snapshot time with the time difference from the current snapshot time smaller than a preset time interval as the starting time of the target time window, and taking the previous snapshot time of the current snapshot time as the ending time, so that the initial time window can be updated to obtain the corresponding target time window. Thus the amount of data in each recording window is limited and the amount of computation within the packet is further reduced.
And S105, sequentially comparing the current snapshot time with each snapshot time included in the target time window, and analyzing personnel data included in two snapshot records with a time interval smaller than a preset time interval so as to determine the personnel in the same row.
Specifically, in the process of analyzing the snapshot record of each snapshot time, the current snapshot time may be sequentially compared with the respective snapshot times included in the target time window, for example, if the target time window corresponding to the current snapshot time includes record 1 with snapshot time of 10:00:00 and record 2 with snapshot time of 10:00:01, the preset time interval is 5 seconds, and the record 3 with current snapshot time of 10:00:03, then record 3 and record 1, and the time difference between record 3 and record 2 is smaller than the preset time interval, it is determined that record 1 and record 2 are the same-row record, and record 2 and record 3 are the same-row record, so that the same-row person in record 1 and record 2, and the same-row person in record 2 and record 3 can be determined.
By adopting the technical scheme, the invention obtains the snapshot record of each snapshot device at each snapshot time; grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment; therefore, a large-scale parallel computing task can be divided into a plurality of small-scale computing tasks which are executed concurrently, so that the computing efficiency is improved, and the computing time is reduced; in addition, aiming at the snapshot records of each snapshot device in each group, the time window comprising the snapshot records is determined according to the preset time sequence, and then the time window is updated according to the current snapshot time, so that the strategy ensures that the current snapshot time is not required to be compared with other snapshot times outside the time window, and only the current snapshot time is required to be compared with the snapshot time of the snapshot records in the time window, and personnel data in two snapshot records which are smaller than the preset time interval are analyzed to determine the same-row personnel, thereby reducing the calculated amount and improving the calculation efficiency.
Fig. 2 is a flowchart of a peer analysis method according to another embodiment of the present invention, which is implemented on the basis of the foregoing embodiment. Referring to fig. 2, the method may specifically include the following steps:
s201, capturing records of each capturing device at each capturing moment.
S202, carrying out hash operation on the equipment numbers of the snapshot equipment to obtain hash values of the equipment numbers.
The hash is to transform an input of an arbitrary length into an output of a fixed length by a hash algorithm, and the output is a hash value. The hash function is a mathematical equation that can generate a code of a message digest by using a text, and the hash operation is a processing method of performing an operation by using a hash algorithm. In this way, after the source data is converted into the mark, the mark is closely associated with each byte of the source data, in the embodiment of the present application, the data mentioned here is the device number of each snapshot device, and the mark mentioned here is the hash value of the corresponding device number. Therefore, in the embodiment of the present application, hash operations are performed on the device numbers of the respective snapshot devices to obtain hash values of the respective numbers. The hash values of the device number change obtained by different devices are different.
S203, carrying out modular operation on the grouped numbers by the hash value of each equipment number to obtain each modular value.
The number of packets n is 20, for example, so that the hash value of each device number is modulo. Modular arithmetic is used in computer terminology, and for integers a and b, modular arithmetic is performed by first calculating the integer quotient c of a divided by b, and then the modular value is equal to a-b c. Thus, when the number n of groups is 20, and when a large number of snapshot devices exist, 20 modulus values are obtained according to the principle of modulus operation, wherein the modulus values are integers between 0 and 19 respectively.
And S204, dividing the snapshot records of the snapshot devices corresponding to the same modulus value into a group.
Specifically, the grouping number still takes 20 as an example, the snapshot records of the snapshot device corresponding to the module value 0 are divided into one group, the snapshot records of the snapshot device corresponding to the module value 1 are divided into one group, and so on, so that 20 grouping results can be obtained. Each group of grouping results comprises at least one snapshot record of the snapshot device, so that the snapshot records of the same snapshot device are ensured to be in the same group. The grouping strategy can ensure that the snapshot records of each snapshot device are in the same subtask, and can also ensure that the recorded data processed by each subtask has small difference.
It should be noted that, in the grouping process, the serial numbers of the respective devices and the number of groups need to be known in advance, and the number of groups is related to the number of cores of the central processing unit of the server, so that the grouping policy can be determined by mainly knowing the above information, and it is not necessary to obtain the snapshot records of the respective snapshot devices at the respective snapshot times. Therefore, the flow chart in fig. 2 is only an example, and S202-S204 occur after S201, but in practical applications, the invention is not limited thereto.
S205, aiming at the snapshot records of each snapshot device in each group, determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval.
And S206, determining a target time window according to the maximum snapshot time and the previous snapshot time of the current snapshot time, wherein the time difference between the maximum snapshot time and the current snapshot time is smaller than the preset time interval, and the maximum snapshot time is used as the starting time and the previous snapshot time is used as the ending time for the snapshot time of each snapshot record.
S207, comparing the current snapshot time with each snapshot time included in the target time window in sequence, analyzing personnel data included in any two snapshot records smaller than a preset time interval in sequence, and marking the personnel in the two snapshot records as same-row personnel.
And S208, outputting the serial numbers of the snapshot records belonging to the same-row personnel in each group.
Specifically, the output peer record may include a serial number of the snapshot record of the peer person, and after receiving the serial number of the snapshot record, the user or the administrator may obtain the snapshot record corresponding to the serial number according to the serial number to analyze the information of the peer person in the snapshot record. For example, whether the same person in each two snapshot records is the same person or not is analyzed by applying an image processing technology and a face recognition technology. It should be noted that this is merely an example, and other analysis may be performed by the number of the snapshot record, which is not limited.
In order to make the technical solution of the present application easier to understand, an example of a processing sub-flow of one capturing apparatus within one group is described below. And aiming at the snapshot records in each group, firstly sequencing according to the snapshot time and sequentially processing each snapshot record. And each piece of snapshot equipment is allocated with a time window, which can also be called a record window, when data enters the record window, the data is compared with the first snapshot record of the record window, if the time difference between the snapshot moments of the two snapshot records exceeds a preset time interval, the first snapshot record is considered to have no influence or contact on the subsequent snapshot records, and the first snapshot record is removed from the record window, which is also an updating process of the record window. Repeating the previous operation until the time difference between the first record and the current record of the record window is within a preset time interval, forming a peer relationship between each snapshot record in the record window and the current record within t seconds, outputting the records of the peers in the same peer, then adding the current record to the last record in the record window, and then adding the next record until all the snapshot records in the group are processed, and ending the current sub-process and returning to the main process. When each sub-process is processed, the collection of the same-row record relation records output by all the sub-processes is the output of the whole same-row calculation task.
In addition, in order to make the description of S206-S208 in the present application clearer, a specific example is used to describe the calculation logic of the time window, so as to describe the marking and output flow of the peer. The preset time interval t is 5 seconds as an example, and it is assumed that the record of a certain snapshot device is as follows:
TABLE 1 Snapshot record Table of certain device
Record number Time of taking a snapshot
1 10:00:00
2 10:00:01
3 10:00:04
4 10:00:07
5 10:00:15
Sequencing each snapshot record from small to large according to the snapshot time, firstly, allocating a time window for the snapshot equipment, wherein no record exists in the time window, directly adding the record 1 to the last record of the time window, and the record of the current time window is {1 }; at this time, a record {1} exists in the time window, and if the time difference between the record 2 and the record 1 is 1 second and is less than t, the record <1,2> of the same line is output, the record 2 is added, and the record of the current window is {1,2 }. In this example, the first snapshot time is 10:00:00 and the second snapshot time is 10:00:01, so that the initial time window may be composed of record 1 and record 2. It should be noted that this is merely an example, and does not form a specific limitation.
At this time, there are records {1,2} in the window, the time difference between record 3 and record 1 is 4 seconds, which is smaller than t, records <1,3> and <2,3> in the same line are output, record 3 is added, and the current window record is {1,2,3 }. Records {1,2 and 3} exist in the window, the time difference between record 4 and record 1 is 7 seconds and is larger than t, record 1 is deleted, the time difference between record 2 and record 4 is 6 and is larger than t, record 2 is deleted, the same-row record <3,4> is output, record 4 is added, and the record of the current window is {3,4 }. In this example, the operations of deleting record 2 and appending record 4 are the update process of the time window, and it should be noted that this is only an example and is not limited in particular.
At this time, there are records {3,4} in the window, the time difference between record 5 and record 3 is 11 seconds, if t is greater than t, record 3 is deleted, the time difference between record 5 and record 4 is 8 seconds, if t is greater than t, record 5 is deleted, there is no record in the window, the same-row record is not output, record 5 is added, and the current window record is {5 }. Finally, the inline records { <1,2>, <1,3>, <2,3>, <3,4> }areoutput.
In the embodiment of the application, modular operation is performed on the grouped numbers through the hash value of the equipment number of each snapshot device, and the snapshot records with the same module value are divided into one group, so that the snapshot records of each snapshot device are ensured to be in the same subtask, and the difference of the record data processed by each subtask can be ensured to be small. And further, the calculation time is saved, and the calculation efficiency is improved.
Fig. 3 is a schematic structural diagram of a peer analysis apparatus according to an embodiment of the present invention, which is suitable for executing a peer analysis method according to an embodiment of the present invention. As shown in fig. 3, the apparatus may specifically include: a snapshot record acquisition module 301, a grouping module 302, an initial time window determination module 303, a time window update module 304, and a peer analysis module 305.
The snapshot record acquisition module 301 is configured to acquire a snapshot record of each snapshot device at each snapshot time; a grouping module 302, configured to group the snapshot records according to the device numbers and the grouping numbers of the snapshot devices; an initial time window determining module 303, configured to determine, according to a preset time sequence, an initial time window according to a first snapshot time and a second snapshot time for the snapshot records of each snapshot device in each group, where a time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval; a time window updating module 304, configured to update the initial time window to obtain a corresponding target time window according to a maximum snapshot time at which a time difference with the current snapshot time is smaller than a preset time interval and a previous snapshot time at the current snapshot time for the snapshot time of each snapshot record; and a peer personnel analysis module 305, configured to compare the current snapshot time with each snapshot time included in the target time window in sequence, and analyze personnel data included in two snapshot records smaller than a preset time interval, so as to determine a peer personnel.
By adopting the technical scheme, the invention obtains the snapshot record of each snapshot device at each snapshot time; grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment; therefore, a large-scale parallel computing task can be divided into a plurality of small-scale computing tasks which are executed concurrently, so that the computing efficiency is improved, and the computing time is reduced; in addition, aiming at the snapshot records of each snapshot device in each group, the time window comprising the snapshot records is determined according to the preset time sequence, and then the time window is updated according to the current snapshot time, so that the strategy ensures that the current snapshot time is not required to be compared with other snapshot times outside the time window, and only the current snapshot time is required to be compared with the snapshot time of the snapshot records in the time window, and personnel data in two snapshot records which are smaller than the preset time interval are analyzed to determine the same-row personnel, thereby reducing the calculated amount and improving the calculation efficiency.
Further, the grouping module 302 is specifically configured to:
carrying out Hash operation on the equipment numbers of all the snapshot equipment to obtain Hash values of all the equipment numbers;
carrying out modular operation on the grouped numbers by the hash value of each equipment number to obtain each modular value;
and dividing the snapshot records of the snapshot devices corresponding to the same modulus value into a group.
Further, the time window updating module 304 is specifically configured to:
and determining a target time window by taking the maximum snapshot time as the starting time and the previous snapshot time of the current snapshot time as the ending time.
Further, the peer analysis module 305 is specifically configured to:
and comparing the current snapshot time with each snapshot time included in the target time window in sequence, analyzing personnel data included in any two snapshot records with a time interval smaller than a preset time interval in sequence, and marking the personnel in the two snapshot records as the same-row personnel.
Further, the system comprises an output module, wherein the output module is used for sequentially comparing the current snapshot time with each snapshot time included in the target time window, analyzing personnel data included in two snapshot records with a time interval smaller than a preset time interval so as to determine the personnel in the same row, and then outputting serial numbers of the snapshot records belonging to the personnel in the same row in each group.
Furthermore, the grouping number is determined according to the kernel number of a central processing unit of the server.
Further, the snapshot record includes the serial number of the snapshot record and the snapshot data in the snapshot record.
The analysis device for the fellow passenger provided by the embodiment of the invention can execute the analysis method for the fellow passenger provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
An embodiment of the present invention further provides an apparatus, please refer to fig. 4, where fig. 4 is a schematic structural diagram of an apparatus, and as shown in fig. 4, the apparatus includes: a processor 410, and a memory 420 coupled to the processor 410; the memory 420 is used for storing a computer program, and the computer program is at least used for executing the peer personnel analysis method in the embodiment of the invention; the processor 410 is used for calling and executing a computer program in a memory, and the peer analysis method at least comprises the following steps: acquiring a snapshot record of each snapshot device at each snapshot time; grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment; determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence aiming at the snapshot records of each snapshot device in each group, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval; for the snapshot time of each snapshot record, updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time with the time difference with the current snapshot time being smaller than a preset time interval and the previous snapshot time of the current snapshot time; and comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing personnel data included in two snapshot records with a time interval smaller than a preset time interval so as to determine the personnel in the same row.
The embodiment of the invention also provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the peer personnel analysis method in the embodiment of the invention are realized, and the snapshot record of each snapshot device at each snapshot time is obtained; grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment; determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence aiming at the snapshot records of each snapshot device in each group, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval; for the snapshot time of each snapshot record, updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time with the time difference with the current snapshot time being smaller than a preset time interval and the previous snapshot time of the current snapshot time; and comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing personnel data included in two snapshot records with a time interval smaller than a preset time interval so as to determine the personnel in the same row.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, and the program may be stored in a computer readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A peer analysis method, comprising:
acquiring a snapshot record of each snapshot device at each snapshot time;
grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment;
determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence aiming at the snapshot records of each snapshot device in each group, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval;
for the snapshot time of each snapshot record, updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time with the time difference with the current snapshot time being smaller than a preset time interval and the previous snapshot time of the current snapshot time;
and comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing personnel data included in two snapshot records with the preset time interval to determine the personnel in the same row.
2. The method according to claim 1, wherein the grouping of the respective snapshot records according to the device numbers and the grouping numbers of the respective snapshot devices comprises:
carrying out Hash operation on the equipment numbers of all the snapshot equipment to obtain Hash values of all the equipment numbers;
carrying out modular operation on the grouped numbers by the hash value of each equipment number to obtain each modular value;
and dividing the snapshot records of the snapshot devices corresponding to the same modulus value into a group.
3. The method of claim 1, wherein updating the initial time window to obtain a corresponding target time window comprises:
and determining a target time window by taking the maximum snapshot time as an initial time and taking the snapshot time before the current snapshot time as a termination time.
4. The method according to claim 1, wherein the comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing and determining the personnel data included in two snapshot records smaller than a preset time interval to determine the personnel in the same row comprises:
and comparing the current snapshot time with each snapshot time included in the target time window in sequence, analyzing personnel data included in any two snapshot records with a time interval smaller than a preset time interval in sequence, and marking the personnel in the two snapshot records as the same-row personnel.
5. The method according to claim 1, wherein the current snapshot time is sequentially compared with the respective snapshot times included in the target time window, and the personnel data included in two snapshot records smaller than the preset time interval are analyzed to determine the personnel in the same row, and then, the method comprises:
and outputting the serial numbers of the snapshot records belonging to the same personnel in each group.
6. The method of claim 1, wherein the number of packets is determined according to the number of cores of a central processor of the server.
7. The method of claim 1, wherein the snapshot record includes a number of the snapshot record and snapshot data in the snapshot record.
8. A peer analysis device, comprising:
the snapshot record acquisition module is used for acquiring snapshot records of each snapshot device at each snapshot time;
the grouping module is used for grouping the snapshot records according to the equipment numbers and the grouping numbers of the snapshot equipment;
the initial time window determining module is used for determining an initial time window according to a first snapshot time and a second snapshot time according to a preset time sequence aiming at the snapshot records of each snapshot device in each group, wherein the time difference between the second snapshot time and the first snapshot time is smaller than a preset time interval;
the time window updating module is used for updating the initial time window to obtain a corresponding target time window according to the maximum snapshot time with the time difference with the current snapshot time being smaller than a preset time interval and the previous snapshot time of the current snapshot time for the snapshot time of each snapshot record;
and the peer personnel analysis module is used for comparing the current snapshot time with each snapshot time included in the target time window in sequence, and analyzing personnel data included in two snapshot records with a preset time interval to determine the peer personnel.
9. An apparatus, comprising:
a processor, and a memory coupled to the processor;
the memory for storing a computer program for performing at least the peer analysis method of any one of claims 1-7;
the processor is used for calling and executing the computer program in the memory.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, carries out the steps of the peer analysis method according to any one of claims 1 to 7.
CN201910846226.6A 2019-09-09 2019-09-09 Method, device, equipment and storage medium for analyzing peer personnel Active CN110636258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910846226.6A CN110636258B (en) 2019-09-09 2019-09-09 Method, device, equipment and storage medium for analyzing peer personnel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910846226.6A CN110636258B (en) 2019-09-09 2019-09-09 Method, device, equipment and storage medium for analyzing peer personnel

Publications (2)

Publication Number Publication Date
CN110636258A true CN110636258A (en) 2019-12-31
CN110636258B CN110636258B (en) 2021-03-02

Family

ID=68971977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910846226.6A Active CN110636258B (en) 2019-09-09 2019-09-09 Method, device, equipment and storage medium for analyzing peer personnel

Country Status (1)

Country Link
CN (1) CN110636258B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111402595A (en) * 2020-03-31 2020-07-10 福建省厦门高速公路管理有限公司 Intelligent management method and system for high-speed service area
CN111639689A (en) * 2020-05-20 2020-09-08 杭州海康威视系统技术有限公司 Face data processing method and device and computer readable storage medium
CN112149627A (en) * 2020-10-19 2020-12-29 杭州海康威视数字技术股份有限公司 Method and device for identifying fellow persons, electronic equipment and storage medium
CN112637555A (en) * 2020-12-07 2021-04-09 北京格灵深瞳信息技术有限公司 Regional thermodynamic calculation method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100260376A1 (en) * 2009-04-14 2010-10-14 Wesley Kenneth Cobb Mapper component for multiple art networks in a video analysis system
CN104050239A (en) * 2014-05-27 2014-09-17 重庆爱思网安信息技术有限公司 Correlation matching analyzing method among multiple objects
CN104091446A (en) * 2014-07-11 2014-10-08 厦门磐道电子有限公司 Intelligent video analyzing method for pedestrians crossing zebra stripes
US20170150092A1 (en) * 2015-11-20 2017-05-25 Vivotek Inc. Pre-selectable video file playback system and method, and computer program product
CN109117714A (en) * 2018-06-27 2019-01-01 北京旷视科技有限公司 A kind of colleague's personal identification method, apparatus, system and computer storage medium
CN109800329A (en) * 2018-12-28 2019-05-24 上海依图网络科技有限公司 A kind of monitoring method and device
CN110084103A (en) * 2019-03-15 2019-08-02 深圳英飞拓科技股份有限公司 A kind of same pedestrian's analysis method and system based on face recognition technology

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100260376A1 (en) * 2009-04-14 2010-10-14 Wesley Kenneth Cobb Mapper component for multiple art networks in a video analysis system
CN104050239A (en) * 2014-05-27 2014-09-17 重庆爱思网安信息技术有限公司 Correlation matching analyzing method among multiple objects
CN104091446A (en) * 2014-07-11 2014-10-08 厦门磐道电子有限公司 Intelligent video analyzing method for pedestrians crossing zebra stripes
US20170150092A1 (en) * 2015-11-20 2017-05-25 Vivotek Inc. Pre-selectable video file playback system and method, and computer program product
CN109117714A (en) * 2018-06-27 2019-01-01 北京旷视科技有限公司 A kind of colleague's personal identification method, apparatus, system and computer storage medium
CN109800329A (en) * 2018-12-28 2019-05-24 上海依图网络科技有限公司 A kind of monitoring method and device
CN110084103A (en) * 2019-03-15 2019-08-02 深圳英飞拓科技股份有限公司 A kind of same pedestrian's analysis method and system based on face recognition technology

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111402595A (en) * 2020-03-31 2020-07-10 福建省厦门高速公路管理有限公司 Intelligent management method and system for high-speed service area
CN111639689A (en) * 2020-05-20 2020-09-08 杭州海康威视系统技术有限公司 Face data processing method and device and computer readable storage medium
CN111639689B (en) * 2020-05-20 2023-07-25 杭州海康威视系统技术有限公司 Face data processing method and device and computer readable storage medium
CN112149627A (en) * 2020-10-19 2020-12-29 杭州海康威视数字技术股份有限公司 Method and device for identifying fellow persons, electronic equipment and storage medium
CN112637555A (en) * 2020-12-07 2021-04-09 北京格灵深瞳信息技术有限公司 Regional thermodynamic calculation method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110636258B (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN110636258B (en) Method, device, equipment and storage medium for analyzing peer personnel
CN109858441A (en) A kind of monitoring abnormal state method and apparatus for construction site
CN107528904B (en) Method and apparatus for data distributed anomaly detection
CN110765134A (en) File establishing method, equipment and storage medium
CN111327466B (en) Alarm analysis method, system, equipment and medium
CN110876072B (en) Batch registered user identification method, storage medium, electronic device and system
CN110827430A (en) Attendance checking method, device, equipment and computer readable storage medium
CN111552842A (en) Data processing method, device and storage medium
CN110019374B (en) Feature-based data item processing method and device, storage medium and computer equipment
CN111079469B (en) Face image processing method, device, equipment and readable storage medium
CN106934041B (en) image file management method and device
CN113645286B (en) Data leakage-oriented Web security event evidence obtaining method and system
CN111666449B (en) Video retrieval method, apparatus, electronic device, and computer-readable medium
CN113806204B (en) Method, device, system and storage medium for evaluating message segment correlation
CN113705459A (en) Face snapshot method and device, electronic equipment and storage medium
CN109800823B (en) Clustering method and device for POS terminals
CN111143626A (en) Group partner identification method, device, equipment and computer readable storage medium
CN113626647A (en) Data storage method and system for intelligent cell
CN111460166A (en) Entity relationship data processing method, device, terminal and storage medium
CN117435963B (en) Digital asset fraud group determination method, device, electronic equipment and storage medium
CN110727532A (en) Data restoration method, electronic device and storage medium
CN113420170B (en) Multithreading storage method, device, equipment and medium for big data image
CN112825083B (en) Method, device and equipment for constructing group relation network and readable storage medium
WO2024079854A1 (en) Information processing device, information processing method, and recording medium
CN109344132B (en) User information merging method, computer readable storage medium and terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant