CN111405486B - Trajectory analysis method and device, electronic equipment and storage medium - Google Patents

Trajectory analysis method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111405486B
CN111405486B CN202010197629.5A CN202010197629A CN111405486B CN 111405486 B CN111405486 B CN 111405486B CN 202010197629 A CN202010197629 A CN 202010197629A CN 111405486 B CN111405486 B CN 111405486B
Authority
CN
China
Prior art keywords
detection
position data
analyzed
acquisition
data
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.)
Active
Application number
CN202010197629.5A
Other languages
Chinese (zh)
Other versions
CN111405486A (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.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System 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 Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN202010197629.5A priority Critical patent/CN111405486B/en
Publication of CN111405486A publication Critical patent/CN111405486A/en
Application granted granted Critical
Publication of CN111405486B publication Critical patent/CN111405486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Navigation (AREA)

Abstract

The embodiment of the application provides a track analysis method and device, electronic equipment and a storage medium, and is applied to the field of big data acquisition and analysis. The method comprises the following steps: acquiring a target sequence related to a Media Access Control (MAC) address, wherein the target sequence comprises a plurality of acquisition records related to the MAC address and sequenced according to detection time; obtaining a position set according to the detection positions in the acquisition records, wherein the position set comprises all detection positions in all acquisition records which meet the detection position merging condition; generating first detection time corresponding to the position set according to the detection time of the acquisition records meeting the detection position merging condition; and generating a motion track of the electronic equipment with the MAC address based on the position set and the target detection position, and the first detection time corresponding to the position set and the second detection time corresponding to the target detection position. Through the scheme, the problem of track disorder in the prior art can be solved.

Description

Trajectory analysis method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of big data acquisition and analysis, and in particular, to a trajectory analysis method and apparatus, an electronic device, and a storage medium.
Background
Currently, it is a common track analysis means to detect a Media Access Control (MAC) address of an electronic device based on a detection device such as a Wireless Fidelity (WiFi) probe, generate a collection record related to the MAC address, and further generate a running track of the electronic device having the MAC address by using each collection record. The acquisition record includes, in addition to the MAC address, detection time corresponding to the MAC address, a detection position of a detection device corresponding to the MAC address, identification information of the detection device, and other information, where the detection time corresponding to the MAC address is time for detecting the MAC address, and the detection device corresponding to the MAC address is the detection device for detecting the MAC address.
In the prior art, a trajectory analysis method includes: acquiring an acquisition record related to the MAC address, taking the detection position in the acquisition record as a resident position, and arranging all the resident positions according to the sequence of the detection time, thereby generating a motion track of the electronic equipment with the MAC address.
However, since a plurality of detection devices are generally provided in one area, there may be a problem of overlapping acquisition in which one MAC address is acquired by a plurality of detection devices within one acquisition cycle, thereby forming a plurality of acquisition records. When the trajectory is generated according to the prior art, the detection positions of the respective detection devices that are acquired in an overlapping manner are repeatedly used as different parking positions, which undoubtedly results in a more chaotic motion trajectory.
Disclosure of Invention
An object of the embodiments of the present application is to provide a trajectory analysis method, an apparatus, an electronic device, and a storage medium, so as to solve the problem of a chaotic motion trajectory in the prior art. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a trajectory analysis method, including:
acquiring a target sequence related to a Media Access Control (MAC) address, wherein the target sequence comprises a plurality of acquisition records related to the MAC address and sequenced according to detection time;
obtaining a position set according to the detection positions in the acquisition records, wherein the position set comprises all detection positions in all acquisition records which meet the detection position merging condition;
generating first detection time corresponding to the position set according to the detection time of the acquisition record meeting the detection position merging condition;
generating a motion track of the electronic equipment with the MAC address based on the position set and the target detection position, and the first detection time corresponding to the position set and the second detection time corresponding to the target detection position;
the target detection position is a detection position in the acquisition record without detection position combination processing, and the second detection time is detection time in the acquisition record without detection position combination processing.
In a second aspect, an embodiment of the present application provides a trajectory analysis device, including:
the system comprises a sequence acquisition module, a sequence acquisition module and a data processing module, wherein the sequence acquisition module is used for acquiring a target sequence related to a Media Access Control (MAC) address, and the target sequence comprises a plurality of acquisition records related to the MAC address and sequenced according to detection time;
the collection determining module is used for obtaining a position collection according to the detection positions in the acquisition records, wherein the position collection comprises all detection positions in all acquisition records which meet the detection position merging condition;
the time generation module is used for generating first detection time corresponding to the position set according to the detection time of the acquisition record conforming to the detection position merging condition;
a track generation module, configured to generate a motion track of the electronic device with the MAC address based on the position set and the target detection position, and a first detection time corresponding to the position set and a second detection time corresponding to the target detection position;
the target detection position is a detection position in the acquisition record without detection position combination processing, and the second detection time is detection time in the acquisition record without detection position combination processing.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the track analysis method provided by the application when executing the program stored in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the trajectory analysis method provided in the present application.
In the scheme provided by the embodiment of the invention, the detection position combination processing is carried out according to the detection positions in the acquisition records included in the target sequence to obtain the position set, and then the detection positions in the acquisition records which are not subjected to the detection position combination processing and the detection time corresponding to the two types of positions are utilized to generate the motion trail of the electronic equipment with the MAC address. Compared with the prior art, in the scheme, the detection positions are combined, the detection positions in the acquisition records which belong to the overlapped acquisition can be combined into the same position set, and then, when the track is generated, the motion track is generated by using the detection positions in the position set and the acquisition records which are not subjected to the detection position combination processing, so that the detection positions of all detection devices which are subjected to the overlapped acquisition can be prevented from being repeatedly used as different resident positions. Therefore, the problem of track confusion in the prior art can be solved through the scheme.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1(a) is a schematic diagram showing the relationship between two detection devices in which there is an overlapping region;
FIG. 1(b) is a schematic view of another area relationship of two detecting devices with overlapping areas;
FIG. 1(c) is a schematic diagram of a detection device performing repeated acquisition;
FIG. 1(d) is a map schematic of a motion trajectory generated in accordance with the prior art;
fig. 1(e) is a schematic map of a merged area formed after merging the detection positions according to fig. 1(d) according to the method provided in the embodiment of the present application;
fig. 1(f) is a schematic map diagram of a motion trajectory generated by a trajectory analysis method according to an embodiment of the present application;
fig. 2 is a flowchart of a trajectory analysis method according to an embodiment of the present disclosure;
fig. 3 is another flowchart of a trajectory analysis method according to an embodiment of the present disclosure;
FIG. 4 is a timing diagram illustrating a trajectory analysis method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a trajectory analysis device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, a trajectory analysis method includes: acquiring an acquisition record related to the MAC address, taking the detection position in the acquisition record as a resident position, and arranging all the resident positions according to the sequence of the detection time, thereby generating a motion track of the electronic equipment with the MAC address.
However, since a plurality of detection devices are generally provided in one area, there may be a problem of overlapping acquisition in which one MAC address is acquired by a plurality of detection devices within one acquisition cycle, thereby forming a plurality of acquisition records. For example, referring to fig. 1(a), a detection device 1 and a detection device 2 are arranged in a region, and a detection area of the detection device 1 and a detection area of the detection device 2 are partially overlapped, so that, for a target device, when the target device enters the overlapped area, a MAC address of the target device may be acquired by the detection device 1 and the detection device 2 within one acquisition cycle, thereby forming a plurality of acquisition records; similarly, referring to fig. 1(b), the detection apparatus 1 and the detection apparatus 2 are arranged in a region, and the detection area of the detection apparatus 2 is entirely contained in the detection area of the detection apparatus 1, so that, for a target device, when the target device enters the detection area of the detection apparatus 2, the MAC address of the target device may be acquired by the detection apparatus 1 and the detection apparatus 2 in one acquisition cycle, thereby forming a plurality of acquisition records.
Due to the above-mentioned problem of overlapping acquisition, when generating a trajectory according to the prior art, the detection positions of the detection devices that have overlapped acquisition may be repeatedly used as different parking positions, which undoubtedly results in a more disordered motion trajectory. For example, fig. 1(d) shows a motion trajectory in a map generated according to the prior art, where each black dot in the map shown in fig. 1(d) is a residence position of a device, and the motion trajectory of the device is obtained by connecting the residence positions in a time sequence. As can be seen, the conditional motion trajectory is relatively chaotic.
In order to solve the prior art problems, embodiments of the present application provide a trajectory analysis method and apparatus, an electronic device, and a storage medium.
The trajectory analysis method provided by the embodiment of the application can be applied to terminal equipment or a server. Specifically, the executing subject of the trajectory analysis method may be a trajectory analysis device running in a terminal or a server.
For example, the trajectory Analysis device may be a WAS (Wireless-fidelity Analysis Service) platform, or may be another Analysis device running in the electronic device for implementing trajectory Analysis. It should be noted that the WAS Platform may cooperate with a WBP (Wireless-fidelity base Platform), a UDE (Unified Development Environment, cross-Platform component) retrieval module, an ES (Elastic Search) module, and an HBASE (Hadoop Database) module to complete storage and analysis processing of the collection records regarding the MAC addresses.
The WAS is also called a probe big data service platform, and is configured to provide result display for operations of a user, for example, the WAS may be configured to display a query result of a collection record, a trace query result, a statistical query result, or the like. The WBP is also called a probe big data basic service platform, and is used for realizing functions such as data acquisition, acquisition record retrieval, track retrieval, statistical calculation and the like. UDE is a relational retrieval component that is used to do relational retrieval on non-relational data. ES is a distributed multi-user capability full-text search engine. HBASE is a distributed, column-oriented open source database, which has the advantages of high reliability, high performance, column-oriented and scalable properties.
For clarity of the solution and layout, how the WAS platform cooperates with the WBP, UDE, ES, and HBASE functional modules to complete the trace analysis process will be described in detail below. As shown in fig. 2, an embodiment of the present application provides a trajectory analysis method, which may include the following steps:
s201, acquiring a target sequence related to a Media Access Control (MAC) address;
wherein, the target sequence comprises a plurality of acquisition records about the MAC address which are ordered according to the detection time.
After the acquisition record about the MAC address is stored in advance, in order to implement the trajectory analysis of the MAC address, a target sequence about the MAC address and sorted according to the detection time may be first obtained, and then the target sequence is used to perform subsequent trajectory analysis processing. Besides the MAC address, the collection record of the MAC address may also include information such as a detection time corresponding to the MAC address and a detection position of a detection device corresponding to the MAC address, where the detection time corresponding to the MAC address is a time when the MAC address is detected, and the detection device corresponding to the MAC address is a detection device that detects the MAC address, for example: a WiFi (Wireless Fidelity) probe, or other device with MAC address detection capability.
Any manner of obtaining the target sequence of the MAC address can be applied to the embodiments of the present application.
Illustratively, in one implementation, obtaining a target sequence for a media access control MAC address may include: from other devices in communication with the trajectory analysis device, for example: WBP, get about the goal sequence of the MAC address; wherein the other device generates the target sequence based on the plurality of acquisition records about the MAC address after acquiring the plurality of acquisition records about the MAC address stored in the database.
For example, in another implementation, obtaining a target sequence for a MAC address may include: acquiring a plurality of acquisition records about MAC addresses stored in a database; based on the plurality of acquisition records for the MAC address, a target sequence is generated. The track analysis device can directly access the database so as to obtain a plurality of acquisition records about the MAC address; of course, the trajectory analysis means may be connected to other means of communication, such as: and the WBP acquires a plurality of acquisition records about the MAC address from the database.
For any of the foregoing implementations, the manner of obtaining the multiple acquisition records about the MAC address may include: and reading a plurality of acquisition records related to the MAC address from a database for storing the acquisition records of the MAC addresses by taking the MAC address as inquiry information. And when the motion track of the electronic device with the MAC address in the specified time range needs to be analyzed, the acquired multiple acquisition records may be acquisition records in the specified time range, that is, the detection time in each acquisition record is within the specified time range.
For any of the above implementations, the generating the target sequence based on the plurality of acquisition records regarding the MAC address may include: sequencing the plurality of acquisition records according to the ascending sequence of the detection time in the acquisition records to obtain a target sequence; or sequencing the plurality of acquisition records according to the ascending sequence of the detection time in the acquisition records to obtain an initial sequence; and preprocessing the initial sequence to obtain a target sequence. It should be noted that the initial sequence is preprocessed to perform data cleaning on the acquired multiple acquisition records, so that the data processing amount is reduced when the target sequence is processed. For clarity and layout, the following description will discuss a specific implementation of preprocessing the initial sequence.
S202, obtaining a position set according to the detection positions in the acquisition records, wherein the position set comprises all detection positions in all acquisition records which meet the detection position merging condition;
in view of the fact that the detection positions of the detection devices that have overlapped acquisition are repeatedly used as the dwell positions, which results in confusion of the motion trajectory generated in the prior art, in this embodiment, after the target sequence related to the MAC address is acquired, the motion trajectory of the electronic device having the MAC address is not generated directly based on the detection time and the detection position in each acquisition record in the target sequence, but the acquisition records in the target sequence are subjected to detection position merging analysis. It is to be understood that, after the processing of S202, the number of the obtained location sets may be one or more, and the subsequent processing for each location set is the same.
Specifically, in this embodiment, after the target sequence is acquired, the detection positions in the acquisition records that meet the detection position combination condition in the target sequence are combined to obtain a position set, so that when a motion trajectory is subsequently generated, one detection position is selected from one position set, and detection positions of detection devices that are subjected to overlapping acquisition are prevented from being repeatedly used as different dwell positions. It can be understood that, since each detection position has a detection area, the detection areas can be merged by merging the detection positions, and then, when selecting a parking position, it is sufficient to select a parking position in one detection area. For example, after the acquisition records to which the detection positions shown in fig. 1(d) belong are merged, three position sets may be formed, as shown in fig. 1(e), each position included in each circle forms a position set, and the detection region corresponding to the detection position in each position set forms a merged region, that is, a region included in each circle, so that when a trajectory is generated subsequently, a parking position may be selected in each circle.
It should be noted that, in the process of merging the detection positions, the plurality of acquisition records in the target sequence may be kept unchanged, and only the detection positions in the target acquisition records are merged to form a position set outside the target sequence. In this way, it is ensured that further analysis processing can be subsequently performed with respect to the MAC address in accordance with the target sequence. Of course, during the merging of the detection positions, the acquisition records in the target sequence may be changed, for example: when the detection positions in the two previous and next acquisition records meet the detection position merging condition, the detection position in the next acquisition record can be added to the previous acquisition record to form a position set in the previous acquisition record, and at this time, the next acquisition record can be deleted or marked so that the next acquisition record is not continuously used as the acquisition record to be analyzed.
Moreover, there are various specific implementation manners for obtaining the position set according to the detection position in the acquisition record. Exemplarily, in one implementation, detection positions in each acquisition record of the target sequence are used as to-be-analyzed position data to obtain multiple sets of to-be-analyzed position data, wherein each set of to-be-analyzed position data includes two adjacent to-be-analyzed position data, and the to-be-analyzed position data of different sets are different; judging whether the detection position in each group of position data to be analyzed meets the detection position merging condition or not according to each group of position data to be analyzed; if so, taking the group of position data to be analyzed as new position data to be analyzed; after new position data to be analyzed are generated, new groups of position data to be analyzed are obtained, and whether the detection position in the group of position data to be analyzed meets the detection position combination condition or not is judged continuously aiming at each group of position data to be analyzed until the new position data to be analyzed are not generated any more. Thus, the data to be analyzed including at least two probe addresses is a set of locations. Specific contents regarding the probe position merging condition may be as given in the embodiment shown in fig. 3.
For example, in another implementation manner, a detection position in one collection record may be selected as an initial value of the current position data, and whether the current position data and the adjacent position data to be analyzed meet the detection position combination condition or not is sequentially determined according to the sequence of the target sequence, so as to obtain a position set.
For clarity of the scheme and clarity of the layout, a specific process of obtaining a position set according to the detection position in the acquisition record in the another implementation manner is described later with reference to a specific embodiment.
S203, generating first detection time corresponding to the position set according to the detection time of the acquisition record conforming to the detection position merging condition;
when the motion trajectory is generated subsequently, for a position set, one detection position in the position set may be taken as a dwell position, and therefore, a detection time matched with the dwell position may be selected for the position set, so as to provide a time basis for a ranking position of the dwell position in the motion trajectory.
The generation mode of generating the first detection time corresponding to the position set according to the detection time of the acquisition record conforming to the detection position merging condition may be multiple.
For example, in an implementation manner, generating a first detection time corresponding to the position set according to the detection time of the acquisition record meeting the detection position merging condition may include:
and averaging the detection time of the acquisition records meeting the detection position merging condition to obtain an average value as the first detection time corresponding to the position set.
For example, in an implementation manner, generating a first detection time corresponding to the position set according to the detection time of the acquisition record meeting the detection position merging condition may include:
and determining the detection time with the earliest time from the detection times of the acquisition records meeting the detection position merging condition as the first detection time corresponding to the position set.
In this implementation manner, the detection time with the earliest time is selected, so that not only can a time basis be provided for the sequencing position of the residence position in the motion trajectory, but also the starting time of the electronic device with the MAC address entering the merging area corresponding to the position set can be shown for the case that the time information is embodied on the motion trajectory, and thus the trace of the electronic device with the MAC address is more refined.
The above-mentioned generation of the first detection time corresponding to the position set according to the detection time of the acquisition record meeting the detection position combination condition is only taken as an example. On the premise of ensuring that a time basis can be provided for the sequencing position of the dwell position in the motion trajectory, other implementation manners can be adopted, such as: and determining the detection time with the latest time from the detection times of the acquisition records meeting the detection position combination condition as the first detection time corresponding to the position set.
S204, generating a motion track of the electronic equipment with the MAC address based on the position set and the target detection position, and the first detection time corresponding to the position set and the second detection time corresponding to the target detection position;
the target detection position is a detection position in the acquisition record without detection position combination processing, and the second detection time is detection time in the acquisition record without detection position combination processing.
Specifically, generating a motion trajectory of the electronic device having the MAC address based on the position set and the target detection position, and the first detection time corresponding to the position set and the second detection time corresponding to the target detection position may include:
selecting a central position from a plurality of detection positions forming the position set as a resident position corresponding to the position set, and taking first detection time corresponding to the position set as detection time of the resident position;
and generating a motion track of the electronic equipment with the MAC address according to the residence position, the target detection position and the second detection time corresponding to the first detection time and the target detection position.
A specific implementation manner of generating the motion trajectory of the electronic device having the MAC address according to the residence position and the target detection position, and the first detection time and the second detection time corresponding to the target detection position is the same as any manner of generating the motion trajectory according to each detection position and the detection time in the acquisition record to which each detection position belongs in the prior art, and is not limited herein.
Additionally, for example, in one implementation, selecting a center location from a plurality of detection locations that make up the set of locations may include:
for each detection position in the position set, calculating the total distance between the detection position and other detection positions in the position set;
and selecting the detection position with the shortest total distance from the position set as the central position of the position set.
In view of the fact that the detection region corresponding to the detection position with the shortest total distance may be a detection region that the electronic device with the MAC address actually needs to enter, and the detection devices at other detection positions in the same position set may perform overlapping acquisition on the basis of the detection device at the detection position with the shortest total distance.
It should be emphasized that the above-described specific implementation of selecting one center position from the plurality of detection positions constituting the position set is merely an example, and should not be construed as a limitation of the present application. For example: a detection position can be randomly selected from a plurality of detection positions forming the position set to serve as a central position; alternatively, one of the detection positions constituting the position set, which has the earliest detection time in the belonging acquisition record, is selected as the center position.
To facilitate understanding of the track analysis effect, fig. 1(f) shows the motion track processed according to the scheme provided in the present application for each detection address in the track shown in fig. 1(e), wherein in fig. 1(f), the track shown by a thin line is generated according to the prior art, and the track shown by a thick line is generated according to the method provided in the present application. Therefore, the track generated by the method provided by the application is clear, and the problem of confusion does not exist.
In the scheme provided by the embodiment of the invention, the detection position combination processing is carried out according to the detection positions in the acquisition records included in the target sequence to obtain the position set, and then the detection positions in the acquisition records which are not subjected to the detection position combination processing and the detection time corresponding to the two types of positions are utilized to generate the motion trail of the electronic equipment with the MAC address. Compared with the prior art, in the scheme, the detection positions are combined, the detection positions in the acquisition records which belong to the overlapped acquisition can be combined into the same position set, and then, when the track is generated, the motion track is generated by using the detection positions in the position set and the acquisition records which are not subjected to the detection position combination processing, so that the detection positions of all detection devices which are subjected to the overlapped acquisition can be prevented from being repeatedly used as different resident positions. Therefore, the problem of track confusion in the prior art can be solved through the scheme.
For clarity of the scheme and layout, a specific implementation of the initial sequence preprocessing is described below.
Optionally, in an implementation, the preprocessing the initial sequence may include:
if the identification information of the detection devices of two adjacent acquisition records in the initial sequence is the same, deleting the next record; and/or the presence of a gas in the gas,
and if the identification information of the detection devices of two adjacent acquisition records in the initial sequence is different, deleting the latter acquisition record when the time interval between the detection time in the former acquisition record and the detection time in the latter acquisition record is judged to be less than a preset time interval threshold.
Considering that there may be a repeated collection problem for the collection of the MAC address, that is, the MAC address is collected by the same detection device in a detection area for multiple times in succession, so as to form multiple collection records, if the identification information of the detection devices of two adjacent collection records in the initial sequence is the same, the latter record is deleted, and analysis on the repeated record is reduced. Regarding the problem of repeated acquisition, referring to the schematic diagram shown in fig. 1(c), the same target device moves from one position to another position in the detection area of the detection apparatus, and the detection apparatus 3 may acquire the MAC address of the target device multiple times in succession, thereby forming two acquisition records.
In addition, because a plurality of detection devices may exist in the same region and overlapping acquisition may exist in the plurality of detection devices, the time interval of detection time in the acquisition records of the overlapping acquisition is considered to be very short, and therefore, the records in which the overlapping acquisition occurs can be cleaned from the time dimension. Based on the idea, if the identification information of the detection devices of two adjacent acquisition records in the initial sequence is different, when the time interval between the detection time in the previous acquisition record and the detection time in the next acquisition record is judged to be smaller than the preset time interval threshold, the next acquisition record is deleted. Wherein the predetermined time interval threshold may be set based on the acquisition period of the detection device, for example: the period duration of the acquisition period is set, or is less than the duration of the acquisition period. When the durations of the acquisition periods of the plurality of detection means are different, the time interval threshold may be set based on the acquisition period of which the proportion is the largest.
Optionally, in another implementation manner, the acquiring the record may further include: regarding the last detection time of the MAC address, the initial value of the last detection time is the detection time in the acquisition record;
preprocessing the initial sequence may include:
if the identification information of the detection devices of two adjacent acquisition records in the initial sequence is the same, modifying the last detection time in the previous acquisition record into the detection time in the next acquisition record, and deleting the next acquisition record; and/or the presence of a gas in the gas,
and if the identification information of the detection devices of two adjacent acquisition records in the initial sequence is different, deleting the next acquisition record when the time interval between the last detection time in the previous acquisition record and the detection time in the next acquisition record is judged to be less than a preset time interval threshold value.
In this implementation, similar to the above implementation, the difference is that: and the last detection time in the previous acquisition record and the detection time in the next acquisition record are used as the basis for judging whether the two acquisition records belong to overlapped acquisition or not in the time dimension.
A trajectory analysis method provided in the embodiments of the present application is described below with reference to specific embodiments.
As shown in fig. 3, an embodiment of the present application provides a trajectory analysis method, which may include the following steps:
s301, acquiring a target sequence related to a Media Access Control (MAC) address;
wherein the target sequence comprises a plurality of acquisition records about the MAC address ordered according to detection time.
Step S301 is the same as step S201 in the above embodiment, and is not described herein again.
S302, determining whether the position data to be analyzed and the current position data meet the detection position combination condition according to the detection position contained in the current position data and the detection position contained in the position data to be analyzed adjacent to the current position data according to the sequence of the target sequence; if the current position data is consistent with the position data to be analyzed, merging the position data to be analyzed with the detection position of the current position data to serve as the updated current position data; if not, the position data to be analyzed is used as updated current position data;
the current position data and the position data to be analyzed are respectively a position set or a target detection position; wherein, the initial value of the current position data is the detection position in any acquisition record in the target sequence; the initial value of the position data to be analyzed is the detection position in the acquisition record adjacent to the any acquisition record according to the ordering of the target sequence.
In this step, the processing of merging the detection positions is performed according to the order of each acquisition record in the target sequence. Specifically, the method comprises the following steps: selecting a detection position in any acquisition record in a target sequence as an initial value of current position data; after the initial value of the current position data, selecting a detection position in the acquisition record adjacent to any acquisition record according to the sequence of the target sequence as the initial value of the position data to be analyzed; and then, according to the detection position contained in the current position data and the detection position contained in the position data to be analyzed adjacent to the current position data, determining whether the position data to be analyzed and the current position data meet the detection position combination condition.
And if the position data to be analyzed and the current position data are determined to accord with the detection position combination condition, executing combination of the detection positions, serving as the updated current position data, and continuously returning to execute determination of whether the position data to be analyzed and the current position data accord with the detection position combination condition. It can be understood that, after the current position data is updated, the position data to be analyzed adjacent to the updated current position data is also updated, and the updated position data to be analyzed is: according to the sequence of the target sequence, the detection positions which are adjacent to the position data to be analyzed before updating and are not subjected to the combined analysis of the detection positions, namely the detection positions in the acquisition records adjacent to the acquisition records to which the position data to be analyzed before updating belongs.
And if the situation that whether the position data to be analyzed and the current position data meet the detection position combination condition is determined, taking the position data to be analyzed as the updated current position data, and continuously returning to execute the operation of determining whether the position data to be analyzed and the current position data meet the detection position combination condition or not. It can be understood that, since the current position data is updated, the position data to be analyzed adjacent to the updated current position data is also updated, and the updated position data to be analyzed is: according to the sequence of the target sequence, the detection positions which are adjacent to the position data to be analyzed before updating and are not subjected to the combined analysis of the detection positions, namely the detection positions in the acquisition records adjacent to the acquisition records to which the position data to be analyzed before updating belongs.
For example, in an implementation manner, the initial value of the current position data may be the detection position in the first acquisition record of the target sequence, at this time, the initial value of the position data to be analyzed may be the initial value of the second acquisition record of the target sequence, and subsequently, according to the ordering of the target sequence, whether each acquisition record in the target sequence meets the detection position merging condition is sequentially determined from front to back. For example:
assuming that the target sequence is ABCDEF, taking the detection position of A as the initial value of the current position data, taking the detection position of B as the initial value of the position data to be analyzed, and judging whether the detection position of A and the detection position of B meet the detection position merging condition or not;
if so, combining the detection position of the A and the detection position of the B to serve as updated current position data, and continuously judging whether the detection position in the updated current position data and the detection position of the C meet the detection position combination condition;
otherwise, taking the detection position of B as updated current position data, and continuously judging whether the detection position of C and the detection position of B in the updated current position data meet the detection position merging condition;
and (3) until the detection position of the F in the target sequence is used as the position data to be analyzed, the combination of the detection position of the F and the current position data is completed, or the judgment result that the detection position of the F and the current position data are not combined is obtained through judgment.
For example, in another implementation manner, the initial value of the current position data may also be a detection position in the last acquisition record in the target sequence, at this time, the initial value of the position data to be analyzed may be a detection position in the second to last acquisition record of the target sequence, and subsequently, according to the ordering of the target sequence, whether each acquisition record in the target sequence meets the detection position merging condition is sequentially determined from the back to the front. For example:
assuming that the target sequence is ABCDEF, taking the detection position of F as the initial value of the current position data, taking the detection position of E as the initial value of the position data to be analyzed, and judging whether the detection position of F and the detection position of E meet the detection position combination condition;
if so, combining the detection position of the F and the detection position of the E to serve as updated current position data, and continuously judging whether the detection position in the updated current position data and the detection position of the D meet the detection position combination condition;
otherwise, taking the detection position of E as updated current position data, and continuously judging whether the updated current position data and the detection position of D meet the detection position merging condition;
and (4) until the detection position of A in the target sequence is used as the position data to be analyzed, the combination of the detection position of A and the current position data is completed, or a judgment result that the detection position of A and the current position data are not combined is obtained through judgment.
For example, in another implementation manner, the initial value of the current position data may also be a detection position in one acquisition record at an intermediate position in the target sequence, and for convenience of description, one acquisition record at the intermediate position is named as a target record; at this time, the initial value of the position data to be analyzed may be the detection position of the adjacent acquisition record located before the target record. For this selection, there are a first stage of processing and a second stage of processing. Specifically, in the processing process of the first stage, whether each acquisition record in the target sequence meets the detection position merging condition is sequentially judged from back to front by using the current position data as the start according to the sequence of the target sequence until the merging processing of the detection position of the first acquisition record is completed.
In the second stage of processing, in the first mode, the detection position of the adjacent acquisition record after the target record is used as the position data to be analyzed, the position data containing the detection position of the target record is used as the current position data, and further, according to the sequence of the target sequence, whether each acquisition record in the target sequence meets the detection position merging condition or not is sequentially judged from front to back starting from the current position data until the merging processing of the detection position of the last acquisition record is completed. It is understood that, since the combined analysis of the detection positions is performed on a part of the previous acquisition records during the first stage of the processing, the position data of the detection positions including the target record may be one detection position or a position set. Specifically, if the detected positions of the target records are subjected to position merging, the position data including the detected positions of the target records are: a position set to which the detection position of the target record belongs; if the detected positions of the target records are not subjected to position combination, the position data including the detected positions of the target records are as follows: the detected position of the object record.
In the second stage of processing, in a second mode, the detection position of the adjacent acquisition record after the target record is used as current position data, the detection position in the next acquisition record of the acquisition record to which the current position data belongs is used as position data to be analyzed, and further, whether each acquisition record in the target sequence meets the detection position merging condition or not is sequentially judged from front to back according to the sequence of the target sequence and the current position data until the merging processing of the detection positions of the last acquisition record is completed; and then, using the position data containing the detection position of the target record as the current position data, and using the position data containing the detection position of the adjacent acquisition record after the target record as the position data to be analyzed, and judging whether the position data to be analyzed and the current position data meet the merging condition of the detection area. It is understood that, if no position merging has occurred for the detected position of the target record, the position data including the detected position of the target record is: the detected position of the target record; if the detected positions of the target records are subjected to position combination, the position data including the detected positions of the target records are as follows: the position set to which the detected position of the target record belongs. Similarly, the position data including the detection positions of the adjacent acquisition records following the target record may also be: the detection positions of the adjacent acquisition records after the target record, or the position set to which the detection positions of the adjacent acquisition records after the target record belong.
For example: assuming that the target sequence is ABCDEF, taking the detection position of D as the initial value of the current position data, and taking the detection position of C as the initial value of the position data to be analyzed;
in the processing process of the first stage, judging whether the detection position of D and the detection position of C meet the detection position merging condition or not;
if so, combining the detection position of D and the detection position of C to serve as updated current position data, and continuously judging whether the detection position in the updated current position data and the detection position of B meet the detection position combination condition;
otherwise, taking the detection position of the C as updated current position data, and continuously judging whether the updated current position data and the detection position of the B meet the detection position merging condition;
until the merging processing of the detection positions related to A is completed;
in the second stage of processing, in a first mode, the detection position of E is used as position data to be analyzed, if the detection positions of D are not over-combined, the detection position of D is used as current position data, and if the detection positions of D are over-combined, a position set containing D is used as current position data;
according to the sequence of the target sequence, starting from the detection position of E, judging whether the position data to be analyzed and the current position data meet the detection position combination condition, if so, combining the current position data and the position data to be analyzed to serve as updated current position data, and continuously judging whether the updated position data and the detection position of F meet the detection position combination condition; and if not, taking the position data to be analyzed as the updated current position data, and continuously judging whether the updated current position data and the detection position of the F meet the detection position merging condition or not.
In the second stage of processing, in a second mode, the detection position of E is used as current position data, the detection position of F is used as position data to be analyzed, whether the detection position of E and the detection position of F meet the detection position combination condition or not is judged, and if yes, the detection position of E and the detection position of F are combined; and then, using the position data of the detection position containing D as the current position data, and using the position data of the detection position containing E as the position data to be analyzed, judging whether the position data to be analyzed and the current position data meet the merging condition of the detection area, and if yes, merging the current position data and the position data to be analyzed. Wherein, if the detection position of D is merged, the position data including the detection position of D is: if the detection positions of D are not merged, the position data of the detection positions including D are as follows: d, detecting position; similarly, if the detected positions of E are subjected to position combination, the position data of the detected positions containing E is: if the detection positions of E are not merged, the position data of the detection positions containing E are as follows: e, the detected position.
It can be understood that, in the case of selecting a detection position in an acquisition record at an intermediate position in the target sequence as an initial value of the current position data, a detection position in an acquisition record located after the target acquisition record may be selected as position data to be analyzed, so that, in the processing process of the first stage, according to the ordering of the target sequence, it may be sequentially determined whether each acquisition record in the target sequence meets a detection position merging condition from front to back; correspondingly, in the second stage of processing, whether other acquisition records which are not subjected to merging analysis in the target sequence meet the merging condition of the detection positions or not is sequentially judged from back to front according to the sequence of the target sequence.
In addition, determining whether the position data to be analyzed and the current position data meet the detection position combination condition according to the detection position included in the current position data, the detection position included in the position data to be analyzed adjacent to the current position data according to the sequence of the target sequence, may include:
if the position data to be analyzed only has one detection position, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to the first quantity corresponding to the current position data and the total quantity of the detection positions contained in the current position data; the first quantity corresponding to the current position data is the quantity of detection positions, in the current position data, of which the distances from the detection positions contained in the position data to be analyzed meet preset conditions;
if the position data to be analyzed at least comprises two detection positions, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to a first quantity corresponding to the position data and the total quantity of the detection positions contained in the position data aiming at any position data in the current position data and the position data to be analyzed; the first quantity corresponding to the position data is the quantity of the detection positions in the position data, wherein the distance between one detection position and another detection position contained in the other position data meets the preset condition.
Wherein the preset condition is that the distance is smaller than a preset distance threshold. For example, the preset distance threshold may be set according to a detection diameter of the detection device. For example: the detection diameter of the detection device is used as the preset distance threshold, or a distance value smaller than the detection diameter of the detection device is used as the preset distance threshold. In addition, since there is a difference in the detection diameters of a plurality of detection devices in the same area, at this time, the preset distance threshold may be set based on the detection diameter of the maximum ratio. Of course, the preset distance threshold may also be set according to manual experience by analyzing information such as the transmission power and the collection interval of the detection device.
Also, the setting as to whether or not the probe position merging condition is satisfied may include: and if the ratio of the first quantity to the total quantity exceeds a preset ratio, determining that the position data to be analyzed and the current position data meet the detection position combination condition. The preset ratio can be set according to actual conditions, for example: the predetermined ratio may be 1/2, or 2/3, 3/4, etc., as is reasonable.
S303, generating first detection time corresponding to the position set according to the detection time of the acquisition record conforming to the detection position merging condition;
s304, generating a motion track of the electronic equipment with the MAC address based on the position set and the target detection position, and the first detection time corresponding to the position set and the second detection time corresponding to the target detection position;
the target detection position is a detection position in the acquisition record without detection position combination processing, and the second detection time is detection time in the acquisition record without detection position combination processing.
In this embodiment, steps S305 to S306 are the same as steps S203 to S204 in the above embodiment, and are not described herein again.
The following describes an overall flow of a trajectory analysis method provided in the embodiment of the present application, taking a WAS as an example of an execution subject of the trajectory analysis method.
Optionally, as shown in fig. 4, a trajectory analysis method provided in an embodiment of the present application may include the following steps:
s401, the WAS receives a trace analysis instruction for a target device having a target MAC address.
Wherein the trace analysis instruction may be an instruction input by a user to request analysis of a trace of a target device having the target MAC address.
The trace analysis instruction carries query conditions, such as start time, end time, the target MAC address, and the like.
S402, the WAS sends a record calling request to the WBP, and correspondingly, the WBP receives the record calling request sent by the WAS.
The WAS may request to invoke the acquisition record meeting the query condition, i.e., the action trace data of the target device, from the WBP by sending a record invocation request carrying the query condition, and after the WAS sends the record invocation request to the WBP, the WAS may wait for the acquisition record returned by the WBP.
S403, the WBP checks parameters for the record call request sent by the WAS.
The WBP may perform parameter check on the query condition carried in the record call request sent by the WAS, for example, whether the start time and the end time are within a preset time period, and whether the MAC address is a valid character string.
S404, if the WBP successfully performs parameter verification on the record call request sent by the WAS, the WBP sends a record query request including query conditions to the UDE, and correspondingly, the UDE receives the record query request sent by the WBP.
The record query request is used for requesting acquisition of the acquisition records meeting the query conditions.
S405, the UDE analyzes the query condition in the record query request.
S406, the UDE sends a rowkey (keyword) query request containing the query condition to the ES, and correspondingly, the ES receives the rowkey query request sent by the UDE.
In this embodiment, rowkey may be used to retrieve action trace data corresponding to the target device in the HBASE.
S407, the ES queries the rowkey according to the query condition and returns a data query result to the UDE, and correspondingly, the UDE receives the data query result returned by the ES.
And the data query result returned by the ES comprises the rowkey corresponding to the query condition. The ES stores the corresponding relation between basic information such as the MAC address, the detection time, the identification information of the detection device and the rowkey, and the ES can inquire the rowkey according to the inquiry condition and the corresponding relation.
S408, the UDE sends a data request aiming at the query condition to the HBASE, and correspondingly, the HBASE receives the query data request sent by the UDE.
In the embodiment of the present application, the data request sent by the UDE to the HBASE for the query condition includes rowkey, and the data request may be used to retrieve, at the HBASE, the acquisition record corresponding to the query condition, that is, the action trajectory data of the target device.
And S409, the HBASE carries out data query aiming at the data request and returns a record query result to the UDE, and correspondingly, the UDE receives the record query result returned by the HBASE.
And S410, the UDE returns a plurality of acquisition records related to the target MAC address to the WAP based on the record inquiry result returned by the HBASE.
S411, after receiving multiple collection records about the target MAC address sent by UDE, WBP generates a target sequence about the target MAC address based on multiple collections about the target MAC address;
wherein generating a target sequence for a target MAC address based on a plurality of acquisitions for the target MAC address may comprise:
sequencing the plurality of acquisition records according to the ascending sequence of the detection time in the acquisition records to obtain an initial sequence; and preprocessing the initial sequence to obtain a target sequence.
The WBP returns the target sequence to the WAS at S412, and the WAS receives the returned target sequence accordingly.
And S413, after acquiring the target sequence, the WAS generates the running track of the electronic equipment with the target MAC address by using the target sequence.
Generating a running track of the electronic device with the target MAC address by using the target sequence may include:
obtaining a position set according to detection positions in acquisition records in a target sequence;
generating first detection time corresponding to the position set according to the detection time of the acquisition record meeting the detection position merging condition;
and generating a motion track of the electronic equipment with the MAC address based on the position set and the target detection position, and the first detection time corresponding to the position set and the second detection time corresponding to the target detection position.
Compared with the prior art, in the scheme, the detection positions in the acquisition records which belong to the overlapped acquisition can be combined into the same position set by combining the detection positions, and then, when the track is generated, the motion track is generated by using the position set and the detection positions in the acquisition records which are not subjected to the detection position combination processing, the detection positions of all detection devices which are subjected to the overlapped acquisition can be prevented from being repeated and taken as different resident positions, and therefore the problem of track disorder in the prior art can be solved through the scheme. In addition, in the process of generating the target sequence, the acquisition records are preprocessed to achieve the effect of data cleaning, so that the data processing amount is reduced when the target sequence is processed.
Corresponding to the method embodiment, the embodiment of the application also provides a track analysis device. As shown in fig. 5, a trajectory analysis device provided in an embodiment of the present application may include:
a sequence obtaining module 510, configured to obtain a target sequence related to a media access control MAC address, where the target sequence includes multiple acquisition records related to the MAC address, which are sorted according to a detection time;
a set determining module 520, configured to obtain a position set according to the detection positions in the acquisition records, where the position set includes each detection position in each acquisition record that meets the detection position merging condition;
a time generating module 530, configured to generate a first detection time corresponding to the position set according to the detection time of the acquisition record meeting the detection position merging condition;
a track generating module 540, configured to generate a motion track of the electronic device with the MAC address based on the position set and the target detection position, and a first detection time corresponding to the position set and a second detection time corresponding to the target detection position;
the target detection position is a detection position in the acquisition record without detection position combination processing, and the second detection time is detection time in the acquisition record without detection position combination processing.
In the scheme provided by the embodiment of the invention, the detection position combination processing is carried out according to the detection positions in the acquisition records included in the target sequence to obtain the position set, and then the detection positions in the acquisition records which are not subjected to the detection position combination processing and the detection time corresponding to the two types of positions are utilized to generate the motion trail of the electronic equipment with the MAC address. Compared with the prior art, in the scheme, the detection positions are combined, the detection positions in the acquisition records which belong to the overlapped acquisition can be combined into the same position set, and then, when the track is generated, the motion track is generated by using the detection positions in the position set and the acquisition records which are not subjected to the detection position combination processing, so that the detection positions of all detection devices which are subjected to the overlapped acquisition can be prevented from being repeatedly used as different resident positions. Therefore, the problem of track confusion in the prior art can be solved through the scheme.
Optionally, in an implementation manner, the set determining module 520 may include:
the determining submodule is used for determining whether the position data to be analyzed and the current position data meet the merging condition of the detection positions according to the detection positions contained in the current position data, the sequencing of the target sequence and the detection positions contained in the position data to be analyzed adjacent to the current position data; the current position data and the position data to be analyzed are respectively a position set or a target detection position;
the first processing submodule is used for merging the position data to be analyzed and the detection position of the current position data to serve as updated current position data if it is determined that the position data to be analyzed and the current position data meet the detection position merging condition;
the second processing submodule is used for taking the position data to be analyzed as updated current position data if the fact that the position data to be analyzed and the current position data do not accord with the detection position merging condition is determined;
wherein the initial value of the current position data is a detection position in any acquisition record in the target sequence; the initial value of the position data to be analyzed is a detection position in the acquisition record adjacent to the any acquisition record according to the sequencing of the target sequence.
Optionally, in an implementation manner, the determining sub-module is specifically configured to:
if only one detection position exists in the position data to be analyzed, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to a first number corresponding to the current position data and the total number of the detection positions contained in the current position data; the first quantity corresponding to the current position data is the quantity of detection positions, in the current position data, of which the distances from the detection positions contained in the position data to be analyzed meet preset conditions;
if the position data to be analyzed at least comprises two detection positions, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to a first quantity corresponding to the position data and the total quantity of the detection positions contained in the position data aiming at any position data in the current position data and the position data to be analyzed; the first quantity corresponding to the position data is the quantity of the detection positions in the position data, wherein the distance between one detection position and another detection position contained in the other position data meets the preset condition.
Optionally, if the ratio of the first number to the total number exceeds a preset ratio, it is determined that the position data to be analyzed and the current position data meet a detection position merging condition.
Optionally, in an implementation manner, the trajectory generating module 540 is specifically configured to:
selecting a central position from a plurality of detection positions forming the position set as a resident position corresponding to the position set, and taking first detection time corresponding to the position set as detection time of the resident position;
and generating a motion track of the electronic equipment with the MAC address according to the residence position, the target detection position and the second detection time corresponding to the first detection time and the target detection position.
The embodiment of the present application further provides an electronic device, as shown in fig. 6, which includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the steps of the trajectory analysis method provided in the embodiment of the present application when executing the program stored in the memory 603.
The communication bus mentioned in the network device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the network device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, or discrete hardware components.
Based on the same technical concept, the embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the above-mentioned trajectory analysis method steps.
Based on the same technical concept, embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, causes the computer to perform the above-mentioned trajectory analysis method steps.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, 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, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. A trajectory analysis method, characterized in that the method comprises:
acquiring a target sequence related to a Media Access Control (MAC) address, wherein the target sequence comprises a plurality of acquisition records related to the MAC address and sequenced according to detection time;
obtaining a position set according to the detection positions in the acquisition records, wherein the position set comprises all detection positions in all acquisition records which meet the detection position merging condition;
generating first detection time corresponding to the position set according to the detection time of the acquisition record meeting the detection position merging condition;
selecting a central position from a plurality of detection positions forming the position set as a resident position corresponding to the position set, and taking first detection time corresponding to the position set as detection time of the resident position;
generating a motion track of the electronic equipment with the MAC address according to the residence position, the target detection position and second detection time corresponding to the first detection time and the target detection position;
the target detection position is a detection position in the acquisition record without detection position combination processing, and the second detection time is detection time in the acquisition record without detection position combination processing.
2. The method of claim 1, wherein deriving a set of positions from the detected positions in the acquisition record comprises:
determining whether the position data to be analyzed and the current position data meet a detection position merging condition or not according to detection positions contained in the current position data, detection positions contained in position data to be analyzed adjacent to the current position data and sequencing of the target sequence; the current position data and the position data to be analyzed are respectively a position set or a target detection position;
if the position data to be analyzed and the current position data are determined to meet the detection position merging condition, merging the detection positions of the position data to be analyzed and the current position data to serve as updated current position data;
if the position data to be analyzed and the current position data are determined not to accord with the detection position merging condition, taking the position data to be analyzed as updated current position data;
wherein the initial value of the current position data is a detection position in any acquisition record in the target sequence; the initial value of the position data to be analyzed is a detection position in the acquisition record adjacent to the any acquisition record according to the sequencing of the target sequence.
3. The method according to claim 2, wherein determining whether the position data to be analyzed and the current position data meet a detection position merging condition according to detection positions included in the current position data and detection positions included in position data to be analyzed adjacent to the current position data according to the sequence of the target sequence comprises:
if only one detection position exists in the position data to be analyzed, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to a first number corresponding to the current position data and the total number of the detection positions contained in the current position data; the first quantity corresponding to the current position data is the quantity of detection positions, in the current position data, of which the distances from the detection positions contained in the position data to be analyzed meet preset conditions;
if the position data to be analyzed at least comprises two detection positions, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to a first quantity corresponding to the position data and the total quantity of the detection positions contained in the position data aiming at any position data in the current position data and the position data to be analyzed; the first quantity corresponding to the position data is the quantity of the detection positions in the position data, wherein the distance between one detection position and another detection position contained in the other position data meets the preset condition.
4. The method according to claim 3, wherein it is determined that the position data to be analyzed and the current position data meet a detected position merging condition if the ratio of the first number to the total number exceeds a preset ratio.
5. A trajectory analysis device, characterized in that the device comprises:
the system comprises a sequence acquisition module, a sequence acquisition module and a data processing module, wherein the sequence acquisition module is used for acquiring a target sequence related to a Media Access Control (MAC) address, and the target sequence comprises a plurality of acquisition records related to the MAC address and sequenced according to detection time;
the collection determining module is used for obtaining a position collection according to the detection positions in the acquisition records, wherein the position collection comprises all detection positions in all acquisition records which meet the detection position merging condition;
the time generation module is used for generating first detection time corresponding to the position set according to the detection time of the acquisition record conforming to the detection position merging condition;
a track generation module, configured to select a center position from multiple detection positions forming the position set, as a residence position corresponding to the position set, and use a first detection time corresponding to the position set as a detection time of the residence position; generating a motion track of the electronic equipment with the MAC address according to the residence position, the target detection position and second detection time corresponding to the first detection time and the target detection position;
the target detection position is a detection position in the acquisition record without detection position combination processing, and the second detection time is detection time in the acquisition record without detection position combination processing.
6. The apparatus of claim 5, wherein the set determination module comprises:
the determining submodule is used for determining whether the position data to be analyzed and the current position data meet the merging condition of the detection positions according to the detection positions contained in the current position data, the sequencing of the target sequence and the detection positions contained in the position data to be analyzed adjacent to the current position data; the current position data and the position data to be analyzed are respectively a position set or a target detection position;
the first processing submodule is used for merging the position data to be analyzed and the detection position of the current position data to serve as updated current position data if it is determined that the position data to be analyzed and the current position data meet the detection position merging condition;
the second processing submodule is used for taking the position data to be analyzed as updated current position data if the fact that the position data to be analyzed and the current position data do not accord with the detection position merging condition is determined;
wherein the initial value of the current position data is a detection position in any acquisition record in the target sequence; the initial value of the position data to be analyzed is a detection position in the acquisition record adjacent to the any acquisition record according to the sequencing of the target sequence.
7. The apparatus of claim 6, wherein the determination submodule is specifically configured to:
if only one detection position exists in the position data to be analyzed, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to a first number corresponding to the current position data and the total number of the detection positions contained in the current position data; the first quantity corresponding to the current position data is the quantity of detection positions, in the current position data, of which the distances from the detection positions contained in the position data to be analyzed meet preset conditions;
if the position data to be analyzed at least comprises two detection positions, determining whether the position data to be analyzed and the current position data meet a detection position combination condition or not according to a first quantity corresponding to the position data and the total quantity of the detection positions contained in the position data aiming at any position data in the current position data and the position data to be analyzed; the first quantity corresponding to the position data is the quantity of the detection positions in the position data, wherein the distance between one detection position and another detection position contained in the other position data meets the preset condition.
8. The apparatus of claim 7, wherein the position data to be analyzed and the current position data are determined to meet a detected position merging condition if a ratio of the first number to the total number exceeds a preset ratio.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN202010197629.5A 2020-03-19 2020-03-19 Trajectory analysis method and device, electronic equipment and storage medium Active CN111405486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010197629.5A CN111405486B (en) 2020-03-19 2020-03-19 Trajectory analysis method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010197629.5A CN111405486B (en) 2020-03-19 2020-03-19 Trajectory analysis method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111405486A CN111405486A (en) 2020-07-10
CN111405486B true CN111405486B (en) 2021-11-26

Family

ID=71413540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010197629.5A Active CN111405486B (en) 2020-03-19 2020-03-19 Trajectory analysis method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111405486B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103747464A (en) * 2014-01-17 2014-04-23 北京赢销通软件技术有限公司 Mobile terminal motion trail analyzing system
CN106790468A (en) * 2016-12-10 2017-05-31 武汉白虹软件科技有限公司 A kind of distributed implementation method for analyzing user's WiFi event trace rules
CN107071719A (en) * 2016-12-12 2017-08-18 浙江大学 A kind of hot spot region temperature analysis method analyzed based on indoor moving object trajectory
CN108882168A (en) * 2017-05-10 2018-11-23 腾讯科技(深圳)有限公司 Trip track acquisition methods, device and server
US10198625B1 (en) * 2016-03-26 2019-02-05 Videomining Corporation Association of unique person to a mobile device using repeat face image matching

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103747464A (en) * 2014-01-17 2014-04-23 北京赢销通软件技术有限公司 Mobile terminal motion trail analyzing system
US10198625B1 (en) * 2016-03-26 2019-02-05 Videomining Corporation Association of unique person to a mobile device using repeat face image matching
CN106790468A (en) * 2016-12-10 2017-05-31 武汉白虹软件科技有限公司 A kind of distributed implementation method for analyzing user's WiFi event trace rules
CN107071719A (en) * 2016-12-12 2017-08-18 浙江大学 A kind of hot spot region temperature analysis method analyzed based on indoor moving object trajectory
CN108882168A (en) * 2017-05-10 2018-11-23 腾讯科技(深圳)有限公司 Trip track acquisition methods, device and server

Also Published As

Publication number Publication date
CN111405486A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN109741060B (en) Information inquiry system, method, device, electronic equipment and storage medium
US9680719B2 (en) Communication system, client terminal, and server
CN111491002B (en) Equipment inspection method, device, inspected equipment, inspection server and system
CN108366012B (en) Social relationship establishing method and device and electronic equipment
CN113268641B (en) User data processing method based on big data and big data server
CN110674247A (en) Barrage information intercepting method and device, storage medium and equipment
CN108154024B (en) Data retrieval method and device and electronic equipment
US20150302088A1 (en) Method and System for Providing Personalized Content
CN109885729B (en) Method, device and system for displaying data
CN110968802B (en) Analysis method and analysis device for user characteristics and readable storage medium
CN108062401B (en) Application recommendation method and device and storage medium
CN108021713B (en) Document clustering method and device
CN111405486B (en) Trajectory analysis method and device, electronic equipment and storage medium
CN105589935A (en) Social group recognition method
CN110427538B (en) Data query method, data storage method, data query device, data storage device and electronic equipment
CN105094810B (en) Data processing method and device based on CGI(Common gateway interface) plug-in unit
CN110120918B (en) Identification analysis method and device
CN113626483B (en) Front-end caching method, system, equipment and storage medium for filling forms
CN114531340B (en) Log acquisition method and device, electronic equipment, chip and storage medium
CN113837807B (en) Heat prediction method, heat prediction device, electronic equipment and readable storage medium
US11256859B2 (en) Extending a classification database by user interactions
CN111444392B (en) Vulnerability library access method, device and equipment
CN111736848B (en) Packet conflict positioning method, device, electronic equipment and readable storage medium
CN105760396B (en) A kind of webpage loading method and device
CN112861054A (en) Webpage processing method and device, computer readable storage medium and electronic equipment

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