CN110889422A - Method, device and equipment for judging vehicles in same driving and computer readable medium - Google Patents
Method, device and equipment for judging vehicles in same driving and computer readable medium Download PDFInfo
- Publication number
- CN110889422A CN110889422A CN201811052368.7A CN201811052368A CN110889422A CN 110889422 A CN110889422 A CN 110889422A CN 201811052368 A CN201811052368 A CN 201811052368A CN 110889422 A CN110889422 A CN 110889422A
- Authority
- CN
- China
- Prior art keywords
- vehicle
- hash
- vector
- track
- calculating
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
Abstract
The invention provides a method, a device, equipment and a computer readable medium for judging vehicles in the same driving, wherein the method comprises the following steps: vectorizing the track of each vehicle to obtain a track vector of each vehicle; carrying out dimension reduction processing on the track vector of each vehicle by adopting a local sensitive Hash mode; and calculating the track similarity of the target vehicle and the candidate vehicle according to the track vector after the dimension reduction processing so as to obtain the co-traveling vehicle of the target vehicle. The embodiment of the invention carries out vectorization processing on the vehicle track, and then carries out dimension reduction by using a locality sensitive hash algorithm, thereby greatly improving the excavation depth and effectiveness of vehicles in the same driving.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method, a device, equipment and a computer readable medium for judging vehicles in the same driving.
Background
In the public safety field, vehicles have been used as the primary means of transportation for crime. Therefore, public institutions set up road gates and electronic police officers in various cities to investigate vehicle crime. However, public security agencies have encountered a number of challenges when using large data analytics to solve a case.
In the solution, finding the vehicles in the same row becomes the key point for solving the solution. Road gates in each city can pass through thousands of vehicles every day, and the number of gates and electronic policemen in the city is hundreds, so that how to rapidly acquire and screen vehicles in the same way becomes a technical problem which needs to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for judging vehicles in the same driving, and a computer readable medium, which are used for solving or relieving one or more technical problems in the prior art.
In a first aspect, an embodiment of the present invention provides a method for determining a vehicle in the same lane, including:
vectorizing the track of each vehicle to obtain a track vector of each vehicle;
carrying out dimension reduction processing on the track vector of each vehicle by adopting a local sensitive Hash mode;
and calculating the track similarity of the target vehicle and the candidate vehicle according to the track vector after the dimension reduction processing so as to obtain the co-traveling vehicle of the target vehicle.
With reference to the first aspect, in a first implementation manner of the first aspect, the vectorizing the track of each vehicle to obtain a track vector of each vehicle includes:
representing the trajectory of a vehicle as a vector: v ═ (t1, t2, t3, …, tn); wherein v is a vehicle track vector, t is the number of seconds passing through the gate, n represents the number of gates, and the value of t corresponding to the gates which do not pass through is a set number.
With reference to the first aspect, in a second implementation manner of the first aspect, an embodiment of the present invention performs a dimension reduction process on a trajectory vector of each vehicle in a locality sensitive hash manner, where the dimension reduction process includes:
selecting a probability distribution function;
initializing k hash functions according to the probability distribution function, wherein k is any positive integer;
calculating the track vector of each vehicle according to k hash functions to obtain k hash values;
calculating a master hash value H from the obtained k hash values1And a packet hash value H2;
The main hash value H to be obtained1Stored in a hash table, each hash table being based on a packet hash value H2The grouping is performed and corresponding k hash values are stored in each packet.
With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the initializing k hash functions according to the probability distribution function, where k is any positive integer includes:
initializing a parameter vector a, then the ith vector a is represented as: a isi=(ai1,…,aid) D represents the number of urban checkpoints;
at [0, r]Get random number biThen the ith hash function is represented as:v is a vehicle trajectory vector.
With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the calculating the master hash value H according to the obtained k hash values is performed1And a packet hash value H2,
The master hash value H1The calculation formula of (2) is as follows:tia value representing each dimension of the trajectory vector v, where C is a set prime number;
the packet hash value H2The calculation formula of (2) is as follows:wherein C is a set prime number.
With reference to the second implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the calculating a similarity between the target vehicle and the candidate vehicle according to the trajectory vector after the dimension reduction processing includes:
acquiring a track vector x corresponding to a target vehicle;
calculating k hash values corresponding to the track vector x;
calculating a master hash value H from the k hash values1xQuerying a corresponding hash list;
calculating packet hash value H according to k hash values2xObtaining the hash values of the track vectors of all candidate vehicles in the current group;
and calculating the similarity between the k-dimensional hash value of the target vehicle and the k-dimensional hash value of the candidate vehicle.
In a second aspect, an embodiment of the present invention further provides a device for determining a vehicle in the same lane, including:
the vectorization module is used for vectorizing the track of each vehicle to obtain a track vector of each vehicle;
the dimension reduction module is used for performing dimension reduction processing on the track vector of each vehicle in a local sensitive Hash mode;
and the co-running vehicle acquisition module is used for calculating the track similarity of the target vehicle and the candidate vehicle according to the track vector subjected to the dimension reduction processing so as to acquire the co-running vehicle of the target vehicle.
With reference to the second aspect, in a first implementation manner of the second aspect, the vectorization module is specifically configured to represent a trajectory of a vehicle as a vector: v ═ (t1, t2, t3, …, tn); wherein v is a vehicle track vector, t is the number of seconds passing through the gate, n represents the number of gates, and the value of t corresponding to the gates which do not pass through is a set number.
With reference to the second aspect, in a second implementation manner of the second aspect, the dimension reduction module includes:
a selection submodule for selecting a probability distribution function;
the initialization submodule is used for initializing k hash functions according to the probability distribution function, wherein k is any positive integer;
the first calculation submodule is used for calculating the track vector of each vehicle according to k hash functions to obtain k hash values;
a second calculation submodule for calculating the master hash value H from the obtained k hash values1And a packet hash value H2;
A storage submodule for obtaining the main hash value H1Stored in a hash table, each hash table being based on a packet hash value H2The grouping is performed and corresponding k hash values are stored in each packet.
With reference to the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the initialization sub-module includes:
a first initialization unit, configured to initialize a parameter vector a, where an ith vector a is expressed as: a isi=(ai1,…,aid) D represents the number of urban checkpoints;
a second initialization unit for initializing the number r of sub-buckets,t represents the size of the urban vehicle;
a third initialization unit for initializing at [0, r ]]Get random number biThen the ith hash function is represented as:v is a vehicle trajectory vector.
With reference to the third implementation manner of the second aspect, in an embodiment of the present invention, in a fourth implementation manner of the second aspect, in the second computation submodule, the master hash value H is obtained by performing hash operations on the master hash value H1The calculation formula of (2) is as follows: tia value representing each dimension of the trajectory vector v, where C is a set prime number;
the packet hash value H2The calculation formula of (2) is as follows:wherein C is a set prime number.
With reference to the second implementation manner of the second aspect, in a fifth implementation manner of the second aspect, the peer vehicle acquisition module includes:
the vector acquisition submodule is used for acquiring a track vector x corresponding to the target vehicle;
the hash value operator module is used for calculating k hash values corresponding to the track vector x;
a main hash calculation submodule for calculating a main hash value H from the k hash values1xQuerying a corresponding hash list;
a packet hash calculation sub-module for calculating packet hash value H according to the k hash values2xObtaining the hash values of the track vectors of all candidate vehicles in the current group;
and the similarity operator module is used for calculating the similarity between the k-dimensional hash value of the target vehicle and the k-dimensional hash value of the candidate vehicle.
In a third aspect, in one possible design, the determination device for vehicles in the same row is configured to include a processor and a memory, the memory is used for storing a program for supporting the determination device for vehicles in the same row to execute the determination method for vehicles in the same row in the first aspect, and the processor is configured to execute the program stored in the memory. The judging device of the co-traveling vehicle may further include a communication interface for the judging device of the co-traveling vehicle to communicate with other devices or a communication network.
In a fourth aspect, an embodiment of the present invention provides a computer readable medium for storing computer software instructions for a determination device of a co-moving vehicle, which includes a program for executing the determination method of the co-moving vehicle of the first aspect.
The embodiment of the invention carries out vectorization processing on the vehicle track, and then carries out dimension reduction by using a locality sensitive hash algorithm, thereby greatly improving the excavation depth and effectiveness of vehicles in the same driving.
In addition, the embodiment of the invention adopts a mode of firstly classifying and then comparing and calculating two by two, thereby greatly reducing the calculation amount.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will be readily apparent by reference to the drawings and following detailed description.
Drawings
In the drawings, like reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are therefore not to be considered limiting of its scope.
FIG. 1 is a flowchart of a method for determining a co-traveling vehicle according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps S200 according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating the detailed steps of step S220 according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps S300 according to an embodiment of the present invention;
fig. 5 is a connection block diagram of a judging device of a vehicle in parallel according to another embodiment of the present invention;
FIG. 6 is an internal block diagram of a dimension reduction module according to another embodiment of the invention;
FIG. 7 is an internal block diagram of an initialization submodule according to another embodiment of the present invention;
FIG. 8 is an internal block diagram of a peer vehicle acquisition module in accordance with another embodiment of the present invention;
fig. 9 is a block diagram of a judging apparatus of a vehicle in the same lane according to another embodiment of the present invention.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive. The embodiment of the invention mainly provides a method and a device for judging vehicles running in the same direction, and the technical scheme is developed and described through the following embodiments respectively.
The invention provides a method and a device for judging a co-traveling vehicle, and the specific processing flow and principle of the method and the device for judging the co-traveling vehicle of the embodiment of the invention are described in detail below.
Fig. 1 is a flowchart of a method for determining a co-traveling vehicle according to an embodiment of the present invention. The method for judging the vehicles in the same driving mode provided by the embodiment of the invention can comprise the following steps of:
s100: and vectorizing the track of each vehicle to obtain a track vector of each vehicle.
In one embodiment, the step S100 may adopt, when the vectorization processing is performed on the trajectory of the vehicle, the following method: representing the trajectory of a vehicle as a vector: v ═ t1,t2,t3,…,tn) (ii) a Wherein v is a vehicle track vector, t is the number of seconds passing through the gate, n represents the number of gates, and the value of t corresponding to the gates which do not pass through is a set number.
For example, if the current region has 100 checkpoints, the trajectory vector of the vehicle is 100 dimensions. And then, taking values according to the time seconds for the vehicle to pass through the gate for the first time. In one embodiment, the counting may be started at zero point, and the number of seconds between the time point when the target vehicle passes the gate and the zero point is taken as a numerical value, for example, if the target vehicle is 1:00 passing the gate, the corresponding value is 3600 seconds. For the value of the non-passed bayonet, the maximum number of 32 bits, namely 2^32-1, can be taken as the value of the non-passed bayonet. Then, the vehicle passes are sequentially recordedThe time point of the bayonet of (a) corresponds to the number of seconds. Finally, it is converted into a corresponding 100-dimensional vector, i.e., v ═ t1,t2,t3,…,t100)。
S200: and performing dimension reduction processing on the track vector of each vehicle by adopting a local sensitive Hash mode.
For example, as shown in fig. 2, in an embodiment, the step S200 may include:
s210: a probability distribution function is selected.
s220: and initializing k hash functions according to the probability distribution function, wherein k is any positive integer.
In this step, a trajectory vector v of the vehicle is calculated, and k hash values are obtained. Wherein k is an arbitrarily set positive integer. As shown in fig. 3, in one embodiment, the step S220 may include:
s221: initializing a parameter vector a, then the ith vector a is represented as: a isi=(ai1,…,aid) And d represents the number of city gates. Wherein the vector aiEach value of aidAre independently and identically distributed according to the probability distribution function at system initialization.
S223: at [0, r]Get random number biThen the ith hash function is represented as:v is a vehicle trajectory vector.
S230: and calculating the track vector of each vehicle according to the k hash functions to obtain k hash values.
For each vehicleThe track vector v can obtain k hash values h after the calculation of the steps1~hkI.e. to convert the vector v into a hash value in k dimension.
S240: calculating a master hash value H from the obtained k hash values1And a packet hash value H2。
In one embodiment, the master hash value H1The calculation formula of (2) is as follows: tirepresents the value of each dimension of the track vector v, where C is a set prime number, e.g., C can be de-multiplied by a prime number, 2^ 32-5.
The packet hash value H2The calculation formula of (2) is as follows:wherein C is a set prime number.
S250: the main hash value H to be obtained1Stored in a hash table, each hash table being based on a packet hash value H2The grouping is performed and corresponding k hash values are stored in each packet.
All vehicles are driven according to H1The value packets are stored in a hash table, each master hash value H1Maintaining a list, each element in the list according to H2The values are grouped. The in-group storage data format may be: (vehicle Id, h)1,…,hk) I.e. including all H1Value sum H2A set of vehicle identifications (Id) and their k hash values all having the same value.
S300: and calculating the track similarity of the target vehicle and the candidate vehicle according to the track vector after the dimension reduction processing so as to obtain the co-traveling vehicle of the target vehicle.
When it is necessary to determine whether the target vehicle has a co-traveling vehicle, the similarity between the trajectory vector of the target vehicle and the trajectory vectors of other candidate vehicles may be calculated. As shown in fig. 4, in one embodiment, the step S300 may include:
s310: and acquiring a track vector x corresponding to the target vehicle.
For example, the trajectory vector of the current target vehicle is: x ═ x1,x2,…,xk)。
S320: and calculating k hash values corresponding to the track vector x.
s330: calculating a master hash value H from the k hash values1xAnd querying a corresponding hash list.
Further calculating a master hash value H1xNamely:after calculating the main hash value H1xThereafter, a corresponding stored hash list may be obtained.
S340: calculating packet hash value H according to k hash values2xAnd obtaining the hash values of the track vectors of all candidate vehicles in the current group.
Then, the packet hash H continues to be calculated2xI.e. byAfter obtaining the packet hash H2xThen, the vehicle set corresponding to the packet hash can be obtained, and the vehicle sets are used as candidate vehicles for subsequent judgment.
S350: and calculating the similarity between the k-dimensional hash value of the target vehicle and the k-dimensional hash value of the candidate vehicle.
And finally, performing similarity calculation on the k-dimensional hash value vector of the candidate vehicle in the set and the target vehicle to be inquired, wherein a specific calculation formula can be as follows:
wherein, A represents a target vehicle, and B represents a candidate vehicle; a. theiI-th hash value, B, representing the target vehicleiAn ith hash value representing the candidate vehicle. n represents the number of hash values of the target vehicle and the candidate vehicle.
After the similarity is respectively calculated for each candidate vehicle, the candidate vehicles can be arranged and displayed from high to low according to the similarity, and then whether the candidate vehicles are the vehicles in the same line or not is judged according to a defined threshold value. For example, the set threshold may be 80%, that is, if a vehicle with 80% similarity is reached, it may be determined as a co-traveling vehicle.
The embodiment of the invention carries out vectorization processing on the vehicle track, and then carries out dimension reduction by using the locality sensitive hash algorithm, thereby greatly improving the excavation depth and effectiveness of vehicles in the same driving.
In addition, the embodiment of the invention adopts a mode of firstly classifying and then comparing and calculating every two, thereby greatly reducing the calculation amount.
As shown in fig. 5, in another embodiment, an embodiment of the present invention further provides a device for determining a vehicle traveling in the same lane, including:
and a vectorization module 100, configured to perform vectorization processing on the trajectory of each vehicle to obtain a trajectory vector of each vehicle.
In one embodiment, the vectoring module is specifically configured to represent the trajectory of a vehicle as a vector: v ═ (t1, t2, t3, …, tn); wherein v is a vehicle track vector, t is the number of seconds passing through the gate, n represents the number of gates, and the value of t corresponding to the gates which do not pass through is a set number.
And the dimension reduction module 200 is configured to perform dimension reduction processing on the track vector of each vehicle by using a locality sensitive hash method.
As shown in FIG. 6, in one embodiment, the dimension reduction module 200 includes:
a selection submodule 210 for selecting a probability distribution function.
The initialization submodule 220 is configured to initialize k hash functions according to the probability distribution function, where k is any positive integer.
As shown in fig. 7, in one embodiment, the initialization sub-module 220 includes:
a first initialization unit 221, configured to initialize a parameter vector a, where an ith vector a is represented as: a isi=(ai1,…,aid) D represents the number of urban checkpoints;
a second initializing unit 222 for initializing the number of buckets r,t represents the size of the urban vehicle;
a third initialization unit 223 for initializing at [0, r]Get random number biThen the ith hash function is represented as:v is a vehicle trajectory vector.
In one embodiment, in the second computation submodule, the primary hash value H1The calculation formula of (2) is as follows:tia value representing each dimension of the trajectory vector v, where C is a set prime number;
the packet hash value H2The calculation formula of (2) is as follows:wherein C is a set prime number.
The first calculating submodule 230 is configured to calculate the trajectory vector of each vehicle according to the k hash functions, so as to obtain k hash values.
A second calculating sub-module 240 for calculating the master hash value H from the obtained k hash values1And a packet hash value H2。
A storage submodule 250 for storing the obtained primary hash value H1Stored in a hash table, each hash table being based on a packet hash value H2Grouping, storing corresponding k hashes in each groupThe value is obtained.
And a co-traveling vehicle obtaining module 300, configured to calculate a trajectory similarity between the target vehicle and the candidate vehicle according to the trajectory vector after the dimension reduction processing, so as to obtain a co-traveling vehicle of the target vehicle.
As shown in fig. 8, in one embodiment, the peer vehicle acquisition module 300 includes:
and the vector obtaining submodule 310 is configured to obtain a track vector x corresponding to the target vehicle.
And the hash value operator module 320 is configured to calculate k hash values corresponding to the trajectory vector x.
A primary hash calculation sub-module 330 for calculating a primary hash value H according to the k hash values1xAnd querying a corresponding hash list.
A packet hash calculation sub-module 340 for calculating a packet hash value H from the k hash values2xAnd obtaining the hash values of the track vectors of all candidate vehicles in the current group.
And the similarity operator module 350 is used for calculating the similarity between the k-dimensional hash value of the target vehicle and the k-dimensional hash value of the candidate vehicle.
The functional module of the present embodiment is similar to the principle of the method for determining vehicles in the same driving direction in the above embodiments, and therefore, the description thereof is omitted.
In another embodiment, the present invention also provides a determination device of a vehicle in parallel, as shown in fig. 9, the device including: a memory 510 and a processor 520, the memory 510 having stored therein computer programs that are executable on the processor 520. The processor 520, when executing the computer program, implements the method for determining the vehicles in the same row in the above embodiments. The number of the memory 510 and the processor 520 may be one or more.
The apparatus further comprises:
the communication interface 530 is used for communicating with an external device to perform data interactive transmission.
If the memory 510, the processor 520, and the communication interface 530 are implemented independently, the memory 510, the processor 520, and the communication interface 530 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The 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 in FIG. 9, but this does not indicate only one bus or one type of bus.
Optionally, in an implementation, if the memory 510, the processor 520, and the communication interface 530 are integrated on a chip, the memory 510, the processor 520, and the communication interface 530 may complete communication with each other through an internal interface.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
The computer readable medium described in embodiments of the present invention may be a computer readable signal medium or a computer readable storage medium or any combination of the two. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). Additionally, the computer-readable storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
In embodiments of the present invention, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, input method, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the preceding.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present invention, and these should be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (14)
1. A method of determining a co-traveling vehicle, comprising:
vectorizing the track of each vehicle to obtain a track vector of each vehicle;
carrying out dimension reduction processing on the track vector of each vehicle by adopting a local sensitive Hash mode;
and calculating the track similarity of the target vehicle and the candidate vehicle according to the track vector after the dimension reduction processing so as to obtain the co-traveling vehicle of the target vehicle.
2. The method of claim 1, wherein vectorizing the trajectory of each vehicle to obtain a trajectory vector for each vehicle comprises:
representing the trajectory of a vehicle as a vector: v ═ t1,t2,t3,…,tn) (ii) a Wherein v is a vehicle track vector, t is the number of seconds passing through the gate, n represents the number of gates, and the value of t corresponding to the gates which do not pass through is a set number.
3. The method according to claim 1, wherein the performing the dimensionality reduction on the trajectory vector of each vehicle by using the locality sensitive hashing method comprises:
selecting a probability distribution function;
initializing k hash functions according to the probability distribution function, wherein k is any positive integer;
calculating the track vector of each vehicle according to k hash functions to obtain k hash values;
calculating a master hash value H from the obtained k hash values1And a packet hash value H2;
The main hash value H to be obtained1Stored in a hash table, each hash table being based on a packet hash value H2The grouping is performed and corresponding k hash values are stored in each packet.
4. The method of claim 3, wherein initializing k hash functions according to the probability distribution function comprises:
initializing the parameter vector a of each hash function, and then the parameter vector a of the ith hash function is represented as: a isi=(ai1,…,aid) D represents the number of urban checkpoints;
5. Method according to claim 4, wherein said computing a master hash value H from the k hash values obtained1And a packet hash value H2,
The master hash value H1The calculation formula of (2) is as follows:tia value representing each dimension of the trajectory vector v, where C is a set prime number;
6. The method according to claim 3, wherein the calculating the track similarity of the target vehicle and the candidate vehicle according to the track vector after the dimension reduction processing comprises:
acquiring a track vector x corresponding to a target vehicle;
calculating k hash values corresponding to the track vector x;
calculating a master hash value H from the k hash values1xQuerying a corresponding hash list;
calculating packet hash value H according to k hash values2xObtaining the hash values of the track vectors of all candidate vehicles in the current group;
and calculating the similarity between the k-dimensional hash value of the target vehicle and the k-dimensional hash value of the candidate vehicle.
7. A device for determining a vehicle traveling in the same direction, comprising:
the vectorization module is used for vectorizing the track of each vehicle to obtain a track vector of each vehicle;
the dimension reduction module is used for performing dimension reduction processing on the track vector of each vehicle in a local sensitive Hash mode;
and the co-running vehicle acquisition module is used for calculating the track similarity of the target vehicle and the candidate vehicle according to the track vector subjected to the dimension reduction processing so as to acquire the co-running vehicle of the target vehicle.
8. The apparatus of claim 7, wherein the vectorization module is specifically configured to represent a trajectory of a vehicle as a vector: v ═ (t1, t2, t3, …, tn); wherein v is a vehicle track vector, t is the number of seconds passing through the gate, n represents the number of gates, and the value of t corresponding to the gates which do not pass through is a set number.
9. The apparatus of claim 7, wherein the dimension reduction module comprises:
a selection submodule for selecting a probability distribution function;
the initialization submodule is used for initializing k hash functions according to the probability distribution function, wherein k is any positive integer;
the first calculation submodule is used for calculating the track vector of each vehicle according to k hash functions to obtain k hash values;
a second calculation submodule for calculating the master hash value H from the obtained k hash values1And a packet hash value H2;
A storage submodule for obtaining the main hash value H1Stored in a hash table, each hash table being based on a packet hash value H2The grouping is performed and corresponding k hash values are stored in each packet.
10. The apparatus of claim 9, wherein the initialization submodule comprises:
a first initialization unit, configured to initialize a parameter vector a, where an ith vector a is expressed as: a isi=(ai1,…,aid) D represents the number of urban checkpoints;
a second initialization unit for initializing the number r of sub-buckets,t represents the size of the urban vehicle;
11. The apparatus according to claim 10, wherein the second sub-module for calculating the primary hash value H1The calculation formula of (2) is as follows:tia value representing each dimension of the trajectory vector v, where C is a set prime number;
12. The apparatus of claim 9, wherein the peer vehicle acquisition module comprises:
the vector acquisition submodule is used for acquiring a track vector x corresponding to the target vehicle;
the hash value operator module is used for calculating k hash values corresponding to the track vector x;
a main hash calculation submodule for calculating a main hash value H from the k hash values1xQuerying a corresponding hash list;
a packet hash calculation sub-module for calculating packet hash value H according to the k hash values2xObtaining the hash values of the track vectors of all candidate vehicles in the current group;
and the similarity operator module is used for calculating the similarity between the k-dimensional hash value of the target vehicle and the k-dimensional hash value of the candidate vehicle.
13. A device for judging a vehicle traveling in the same direction, the device comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of determining co-traveling vehicles of any of claims 1-6.
14. A computer-readable medium, in which a computer program is stored which, when being executed by a processor, carries out a method for determining a co-traveling vehicle according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811052368.7A CN110889422A (en) | 2018-09-10 | 2018-09-10 | Method, device and equipment for judging vehicles in same driving and computer readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811052368.7A CN110889422A (en) | 2018-09-10 | 2018-09-10 | Method, device and equipment for judging vehicles in same driving and computer readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110889422A true CN110889422A (en) | 2020-03-17 |
Family
ID=69745193
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811052368.7A Pending CN110889422A (en) | 2018-09-10 | 2018-09-10 | Method, device and equipment for judging vehicles in same driving and computer readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110889422A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015956A (en) * | 2020-09-04 | 2020-12-01 | 杭州海康威视数字技术股份有限公司 | Similarity determination method, device, equipment and storage medium for mobile object |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104035949A (en) * | 2013-12-10 | 2014-09-10 | 南京信息工程大学 | Similarity data retrieval method based on locality sensitive hashing (LASH) improved algorithm |
CN104778245A (en) * | 2015-04-09 | 2015-07-15 | 北方工业大学 | Similar trajectory mining method and device on basis of massive license plate identification data |
CN106875679A (en) * | 2017-03-14 | 2017-06-20 | 东软集团股份有限公司 | Recognize the method and device of escort vehicle |
-
2018
- 2018-09-10 CN CN201811052368.7A patent/CN110889422A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104035949A (en) * | 2013-12-10 | 2014-09-10 | 南京信息工程大学 | Similarity data retrieval method based on locality sensitive hashing (LASH) improved algorithm |
CN104778245A (en) * | 2015-04-09 | 2015-07-15 | 北方工业大学 | Similar trajectory mining method and device on basis of massive license plate identification data |
CN106875679A (en) * | 2017-03-14 | 2017-06-20 | 东软集团股份有限公司 | Recognize the method and device of escort vehicle |
Non-Patent Citations (3)
Title |
---|
ZHOUYU FU 等: "SIMILARITY BASED VEHICLE TRAJECTORY CLUSTERING AND ANOMALY DETECTION", 《IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING 2005》 * |
李红梅 等: "基于精确欧氏局部敏感哈希的协同过滤推荐算法", 《计算机应用》 * |
赵家石 等: "一种隐私保护的在线相似轨迹挖掘方法", 《哈尔滨工业大学学报》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015956A (en) * | 2020-09-04 | 2020-12-01 | 杭州海康威视数字技术股份有限公司 | Similarity determination method, device, equipment and storage medium for mobile object |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108416327B (en) | Target detection method and device, computer equipment and readable storage medium | |
CN111401516B (en) | Searching method for neural network channel parameters and related equipment | |
CN109117879B (en) | Image classification method, device and system | |
JP6802331B2 (en) | Lane processing method and equipment | |
CN111079780B (en) | Training method for space diagram convolution network, electronic equipment and storage medium | |
CN109255181B (en) | Obstacle distribution simulation method and device based on multiple models and terminal | |
CN111079533B (en) | Unmanned vehicle driving decision method, unmanned vehicle driving decision device and unmanned vehicle | |
CN109977776A (en) | A kind of method for detecting lane lines, device and mobile unit | |
CN112488297B (en) | Neural network pruning method, model generation method and device | |
CN113129335B (en) | Visual tracking algorithm and multi-template updating strategy based on twin network | |
CN111860496A (en) | License plate recognition method, device, equipment and computer readable storage medium | |
CN108921162A (en) | Licence plate recognition method and Related product based on deep learning | |
CN115147598A (en) | Target detection segmentation method and device, intelligent terminal and storage medium | |
CN114783021A (en) | Intelligent detection method, device, equipment and medium for wearing of mask | |
CN112862730B (en) | Point cloud feature enhancement method and device, computer equipment and storage medium | |
CN108932839B (en) | Method and device for judging vehicles in same-driving mode | |
CN110889422A (en) | Method, device and equipment for judging vehicles in same driving and computer readable medium | |
CN110135428A (en) | Image segmentation processing method and device | |
Küçükmanisa et al. | Robust and real‐time lane detection filter based on adaptive neuro‐fuzzy inference system | |
CN116229406B (en) | Lane line detection method, system, electronic equipment and storage medium | |
CN111144361A (en) | Road lane detection method based on binaryzation CGAN network | |
CN114863680B (en) | Prediction processing method, prediction processing device, computer equipment and storage medium | |
CN115527187A (en) | Method and device for classifying obstacles | |
Sang et al. | YOLOv3-VD: A sparse network for vehicle detection using variational dropout | |
CN114359572A (en) | Training method and device of multi-task detection model and terminal 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 |