WO2020143170A1 - 预测路线获取方法、装置、计算机设备及存储介质 - Google Patents

预测路线获取方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020143170A1
WO2020143170A1 PCT/CN2019/092234 CN2019092234W WO2020143170A1 WO 2020143170 A1 WO2020143170 A1 WO 2020143170A1 CN 2019092234 W CN2019092234 W CN 2019092234W WO 2020143170 A1 WO2020143170 A1 WO 2020143170A1
Authority
WO
WIPO (PCT)
Prior art keywords
path
data
linked list
predicted
user
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.)
Ceased
Application number
PCT/CN2019/092234
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020143170A1 publication Critical patent/WO2020143170A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the technical field of data analysis, and in particular to a method, device, computer equipment, and storage medium for obtaining a predicted route.
  • the monitoring of vehicles traveling on the road is generally collected and acquired through a high-definition camera installed on a fixed device on the road. Through the massive monitoring video collected, the vehicle's travel route can be analyzed. However, if there are extreme situations such as occlusion plate or high-definition camera failure, during the monitoring of key vehicles, there will be a short-term line missing situation, and it is impossible to continue to predict the line of key vehicles through offline data, thus losing this The current location of the destination vehicle.
  • the embodiments of the present application provide a method, device, computer equipment, and storage medium for obtaining a predicted route, which are intended to solve the problem that the short-term line disappears in the monitoring process of the designated vehicle in the prior art, and the offline data cannot be continued.
  • the problem of predicting the route of a specified vehicle is intended to solve the problem that the short-term line disappears in the monitoring process of the designated vehicle in the prior art, and the offline data cannot be continued.
  • an embodiment of the present application provides a method for obtaining a predicted route, which includes: acquiring collected user path data, converting the user path data into linked list data, and storing the corresponding linked list history in the constructed linked list In the data; according to the linked list historical data corresponding to each user in the linked list, according to the preset cutting time interval value, the linked list historical data corresponding to each user is cut into multi-segment paths, and the multi-segment paths are counted to obtain path statistics Collection; receiving the current path of the user to be predicted, arranging multiple paths according to the nodes included in the current path to form a path subset; searching in the path statistical data set includes each of the path subsets The predicted path corresponding to the path and the probability value corresponding to each predicted path; the probability values corresponding to each predicted path are sorted in descending order to obtain the predicted path ranked before the preset ranking threshold to form a predicted path to be recommended.
  • an embodiment of the present application provides a predicted route acquisition device, which includes: a data storage unit for acquiring collected user path data, converting the user path data into linked list data, and storing the data in a constructed The corresponding linked list historical data in the linked list; the data cutting unit is used to cut the linked list historical data corresponding to each user according to the preset cutting time interval value according to the linked list historical data corresponding to each user in the linked list Into multi-segment paths, collecting multi-segment paths to obtain a set of path statistics data; a path subset acquisition unit, used to receive the current path of the user to be predicted, and arranging multiple paths according to the nodes included in the current path to form A subset of paths; a predicted path acquisition unit, used to search the path statistical data set for a predicted path corresponding to each path in the path subset, and a probability value corresponding to each predicted path; a predicted route acquisition unit, used for The probability values corresponding to each prediction path are sorted in descending order to obtain a
  • an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer
  • the program implements the method for obtaining the predicted route described in the first aspect above.
  • an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor causes the processor to execute the first On the one hand, the method for obtaining a predicted route.
  • FIG. 1 is a schematic diagram of an application scenario of a method for obtaining a predicted route provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for obtaining a predicted route provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a sub-process of a method for obtaining a predicted route provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of another sub-flow of the method for obtaining a predicted route provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of another sub-flow of the method for obtaining a predicted route provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another sub-flow of the method for obtaining a predicted route provided by an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of an apparatus for obtaining a predicted route according to an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a subunit of a device for obtaining a predicted route according to an embodiment of the present application
  • FIG. 9 is a schematic block diagram of another subunit of a device for obtaining a predicted route according to an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of another subunit of a device for obtaining a predicted route according to an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of another subunit of a device for obtaining a predicted route according to an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an application scenario of a predicted route acquisition method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a predicted route acquisition method provided by an embodiment of the present application.
  • the predicted route acquisition method is applied to In the server, the method is executed by the application software installed in the server.
  • the method includes steps S110-S150.
  • the server after the server receives the user path data collected and converted by the front-end collection device, the server stores the user path data corresponding to each user in a linked list, so as to effectively monitor each user's path.
  • step S110 includes steps S111-S115:
  • S111 Receive user path data obtained by identifying the collected vehicle pictures, and store the user path data in the created temporary database.
  • a front-end collection device (such as a surveillance camera) installed on the road collects multiple vehicle images and performs license plate recognition and uploads it to the server.
  • the server receives user path data including the license plate number, and then the user The path data is stored in a temporary database created in the server. Since the uploading server is user path data, there is no need to upload vehicle pictures, which reduces the amount of data transmission.
  • the message middleware is used to receive the user path data uploaded by the front-end collection device, and parse and process the user path data into linked list data and send it to the linked list for storage.
  • the second is a front-end collection device, such as surveillance cameras installed on the road (these surveillance cameras are generally installed at intersections, highway toll gate intersections, important road sections, etc.), used to collect user path data and upload to message middleware, such as
  • the user path data including the license plate number, the name of the current intersection passed, and the time point of the current intersection can be parsed and uploaded to the server, that is, the vehicle collected by the surveillance camera
  • the picture includes at least the license plate number, the name of the current intersection passed, and the time point of passing the current intersection.
  • the license plate number can be used as the user's unique identification code.
  • the name of the current intersection passed and the time point of the current intersection can be used as unique to the user.
  • the linked list data to be processed corresponding to the identification code For example, the surveillance camera set at the intersection A takes a picture of the vehicle a at the intersection A. The surveillance camera set at the intersection A performs license plate recognition to obtain the license plate number of the vehicle a. At this time, according to the license plate number of the vehicle a and the name of the intersection A (That is, the name of the current intersection) and the time when the surveillance camera set at the intersection A took the vehicle picture of the vehicle a at the intersection A (that is, the time point of passing the current intersection) can form user route data.
  • step S111 user path data obtained by identifying the collected vehicle pictures is received, and the user path data is stored in the created temporary database, including:
  • the message middleware is distributed Publish and subscribe message middleware;
  • the user path data includes the license plate number, the name of the current intersection passed, and the time point of passing the current intersection.
  • the message middleware is distributed publish and subscribe message middleware (distributed publish and subscribe message middleware is Kafka message middleware).
  • Kafka message middleware can be visually understood as a large pool, constantly Various types of messages are produced, stored, and consumed, that is, producers write messages to queues (that is, image-understanding pools), and consumers take messages from the queues for business logic.
  • Kafka message middleware is used as temporary storage data for user path data, which can effectively perform corresponding data processing and processing on user path data.
  • the user path data obtained by recognizing the vehicle picture is first stored in the temporary database.
  • the temporary database needs to be obtained from the temporary database according to a preset access cycle
  • User route data is stored in the target area after data processing.
  • the user unique identification code corresponding to the user path data and the to-be-processed linked list data corresponding to the user unique identification code are analyzed and obtained; wherein the to-be-processed
  • the linked list data includes the name of the current intersection and the time point of passing the current intersection.
  • the incremental data is temporarily stored in the temporary database.
  • the temporary data is taken from the temporary Obtain incremental user path data from the database, update the user path data to the linked list, and delete the user path data that has been processed by the temporary database to avoid repeated insertion of the data into the linked list.
  • a linked list data can be established for each user in the linked list.
  • Each linked list data only stores relevant data of the user corresponding to the linked list data, and multiple linked list data can form a linked list.
  • 1Use a set of arbitrary storage units to store the nodes of the linear table (this group of storage units can be either continuous or discontinuous)
  • Chain storage is one of the most commonly used storage methods. It can be used to represent not only linear tables, but also various non-linear data structures.
  • the linked list includes a data field (that is, a data field) and a next field (that is, a pointer field); the data field of each linked list data in the linked list is used to store the data value of the node value, such as the current intersection that is included in the user path data The name, the time point of passing the current intersection; the next field is used to store the pointer field (chain field) of the node's direct successor address (location).
  • step S112 the method further includes:
  • to-be-processed linked list data corresponding to the user unique identification code is multiple sets of linked list data, sort the linked list data included in the multiple sets of linked list data in ascending time order to obtain the sorted linked list data;
  • to-be-processed linked list data corresponding to the user unique identification code is not multiple sets of linked list data, obtain the to-be-processed linked list data.
  • each set of data corresponds to a unique user identification code
  • each set of data can be processed according to the format of the linked list data, that is, each set of data is taken from the temporary database
  • the to-be-processed linked list data in the set of data is encapsulated into the data field of the linked list data, and the pointer field of the linked list data is initially set to a null value.
  • the identification attribute of the linked list data is set as the unique identification code of the user, and each group of user path data from the temporary database can be processed into linked list data through the above process.
  • a Kafka message middleware resolves to a user's unique identification code (for example, denoted as user A1), which corresponds to user A1 passing through card mount a at 10:00:00 on June 1, 2018; user A1 is Passed the bayonet b at 09:00:00 on June 1, 2018, which means that the pending list data parsed by the user A1 includes 2 sets of linked list data, which needs to be included in the linked list historical data of the user Add 2 linked list storage units to store the linked list data at different time points.
  • Both of the above two data correspond to the pending list data of user A1.
  • A1 is ranked at the front of the user through the bayonet b at 09:00:00 on June 1, 2018;
  • A1 is ranked at 10:00:00 on June 1, 2018, through the bayonet a, so that multiple groups of linked list data are adjusted in time sequence and then inserted into the linked list, which can store user path data in chronological order.
  • S113 Traverse and determine whether the linked list historical data corresponding to the user unique identification code exists in the linked list stored locally.
  • traversing and judging whether there is linked list historical data corresponding to the unique identification code of the user in the locally stored linked list is to determine the linked list Whether there is historical data corresponding to the user's unique identification code; if there is no linked list historical data corresponding to the user's unique identification code in the linked list, it is necessary to create an initial linked list in the linked list, and then insert the pending linked list data into the initial linked list ; If there is linked list historical data corresponding to the user's unique identification code in the linked list, insert the to-be-processed linked list data into the corresponding linked list historical data for storage.
  • step S114 includes:
  • the data field of the linked list is time point + bayonet; starting from the head of the linked list, it constantly finds the node specified by the next field (that is, the pointer field), and retains two pointer values for each move, one of which is t1 is Stay at the current node, another pointer t2 stays at the node in the next next domain; by comparing whether the target time is between the time corresponding to the node pointed to by t1 and t2, if it is, then the node pointed to by t1 and t2 Add a new node in the middle to save the current data.
  • the method further includes:
  • the linked list historical data corresponding to the user unique identification code does not exist in the linked list, it means that the vehicle corresponding to the user unique identification code is being monitored for the first time, and a new initial linked list needs to be created in the linked list.
  • the identification attribute of the initial linked list is set to the unique identification code of the user, and then the data of the linked list to be processed is inserted into the initial linked list correspondingly.
  • step S1141 the method further includes:
  • the application container engine is located according to the user unique identification code, and the linked list historical data stored in the application container engine is obtained.
  • each application container engine is named after the user's unique identification code as the identification attribute, and correspondingly stores the linked list data corresponding to the user's unique identification code .
  • the linked list historical data corresponding to each user in the linked list is cut into multi-segment paths according to the preset cutting time interval value, and the multi-segment paths are counted to obtain a path statistical data set .
  • step S120 includes: S121, acquiring each node data included in the linked list historical data corresponding to each user in the linked list; S122, judging that any adjacent node data corresponds to Whether the difference between the time values exceeds the cutting time interval value; S123. If the difference between the time values corresponding to adjacent node data exceeds the cutting time interval value, the corresponding adjacent time value The pointer relationship between node data is deleted to obtain a multi-segment path.
  • the linked list includes massive user's linked list historical data.
  • Each user's linked list historical data represents the user's historical path data, which can accurately reflect when and through which bayonet the user passed.
  • each node data includes a data field and a next field. The data field is used to store the node value data field, such as the name of the currently passed intersection and the current pass included in the user path data. Intersection time.
  • the chain form of the linked list historical data is formed Cut off the chain connection between the two adjacent nodes in the data (that is, clear the pointing relationship between the two adjacent nodes); if the two adjacent nodes in the linked list historical data If the time interval of the point data does not exceed the preset cutting time interval value, the chain connection relationship of the two adjacent node data is maintained.
  • each user's linked list historical data can be cut into multiple segments of the path, and the linked list historical data of multiple different users are all cut through the above method, so the linked list history corresponding to each user can be obtained
  • the data is cut into multi-section paths, and the multi-section paths are counted to obtain a set of path statistics data.
  • path prediction can be performed according to the path in the path statistical data.
  • S130 Receive the current path of the user to be predicted, and arrange multiple nodes according to the nodes included in the current path to form a path subset.
  • step S130 includes:
  • the current path of the user to be predicted (referred to as user A) is abc, and then the path of user A cannot be obtained (such as user A blocking the number plate).
  • the reverse order of nodes a, b, and c is c, b, and a.
  • the resulting path subset result is c, bc, abc, that is, the order of the last node is reversed.
  • the last node is obtained as one of the path subsets.
  • connection routes of the last two nodes as another path in the path subset, and so on, until the connection routes of all nodes included in the current path are acquired to form the path subset.
  • step S140 includes: S1411, obtaining each type of path corresponding to the path subset to obtain each target path; S1412, obtaining The first predicted path subset corresponding to various target paths in the path statistical data set respectively to form a first predicted path set; S1413, obtaining the total number of each first predicted path subset; S1414, obtaining each A first predicted path subset includes the target path, and the total number of classes of data that does not end with the target path; where each first predicted path subset includes multiple types of the target path In the data, each type of data constitutes a prediction path; S1415. Obtain the ratio of the frequency of each prediction path in each first prediction path subset to the total number of corresponding first prediction path subsets, and obtain A probability value corresponding to a predicted path.
  • the path statistics data set such as ecf, fcem, etc.
  • path c is one of a kind of paths in the path subset, which can be recorded as the first target path; and the two prediction paths of path ecf and path fcem constitute the first prediction path subset 1 corresponding to the first target path ( Similarly, the first predicted path subset 2 corresponding to the second target path, the first predicted path subset 3 corresponding to the third target path, ..., the first predicted path subset N corresponding to the Nth target path , The first prediction path subset 1-the first prediction path subset N constitute the first prediction path set); the total number of the first prediction path subset 1 is 100, and the first prediction path subset 1 includes The total number of classes of the target path is 2 (respectively ecf, fcem), the frequency of the two prediction paths (respectively ecf, fcem) in the first prediction path subset 1 corresponds to the first prediction path subset 1 The ratio of the total number of is 0.2 (corresponding to ecf) and 0.8 (corresponding to fcem).
  • each predicted path corresponding to path b-c and the probability value corresponding to each predicted path, and each predicted path corresponding to path a-b-c and the probability value corresponding to each predicted path are acquired.
  • the path statistical data set can be accurately searched for the predicted path corresponding to each path in the path subset and the probability value corresponding to each predicted path as the subsequent predicted path of the current path of the user to be predicted Based on the forecast data.
  • step S140 includes: S1421, obtaining each type of path corresponding to the path subset to obtain each target path; S1422, obtaining A second predicted path subset in the path statistical data set within a preset time period and corresponding to various target paths, respectively, to form a second predicted path set; S1423, obtaining each second predicted path subset The total number of entries; S1424: Obtain the total number of data in each second prediction path subset that includes the target path and does not end with the target path; where, in each second prediction path subset Including the multiple types of data in the target path, each type of data constitutes a prediction path; S1425, acquiring the frequency of each prediction path in each second prediction path subset and the corresponding frequency of the second prediction path subset The ratio of the total number of items to obtain the probability value corresponding to each predicted path.
  • step S140 when the time dimension is considered, for example, the path statistical data set is first searched for including path c, not ending with the target path c, and on January 1, 2018, 18:00-19: All predicted paths of 00 (such as ecf, fcem, etc. include the target path c and the time is within 18:00-19:00 on January 1, 2018 and does not end with the target path c), and include the path c
  • the probability value of the predicted path of one-to-one correspondence for example, there are 100 predicted paths including path c and 18:00-19:00 on January 1, 2018, and the frequency of path ecf appears 20 times.
  • the path c is one of a kind of paths in the path subset, which can be recorded as the first target path; and the second prediction path subset 1 corresponding to the first target path is composed of two prediction paths, path ecf and path fcem ( Similarly, the second predicted path subset 2 corresponding to the second target path, the second predicted path subset 3 corresponding to the third target path, ..., the second predicted path subset N corresponding to the Nth target path , Consisting of the second prediction path subset 1-the second prediction path subset N to form the second prediction path set); the total number of entries in the second prediction path subset 1 is 100, and the first prediction path subset 1 includes The total number of classes of the target path is 2 (respectively ecf, fcem), the frequency of the two prediction paths
  • each predicted path corresponding to path b-c and the probability value corresponding to each predicted path and each predicted path corresponding to path a-b-c and the probability value corresponding to each predicted path are acquired.
  • step S140 includes:
  • the third embodiment of step S140 differs from the first embodiment of step S140 in obtaining the probability value corresponding to each predicted path in that the total number of each predicted path in the path statistical data set is counted, Then it is divided by the total number of the path statistics data set to obtain the probability value corresponding to each predicted path.
  • first search all the predicted paths that include the target path c and do not end with the target path c in the path statistics data set include the path c and do not end with the target path c
  • the path statistics data set for example, ecf, fcem, etc. include the path c and do not end with the target path c
  • the path One-to-one corresponding probability value of the predicted path of c for example, there are 100 predicted paths including path c, the frequency of path ecf is 20 times, the frequency of path fcem is 80 times, and the total number of paths in the path statistics data set For 10,000.
  • the path c is one of a kind of paths in the path subset, which can be recorded as the first target path; and the third prediction path subset 1 corresponding to the first target path is composed of two prediction paths, path ecf and path fcem ( Similarly, the third predicted path subset 2 corresponding to the second target path, the third predicted path subset 3 corresponding to the third target path, ..., the third predicted path subset N corresponding to the Nth target path ,
  • the first prediction path set is composed of the third prediction path subset 1-the third prediction path subset N); the paths ecf and fcem included in the third prediction path subset 1 are both prediction paths, and the third prediction path sub
  • the ratio of the total number of the two prediction paths (ecf, fcem) in set 1 to the total number of the path statistical data sets is 0.0002 (corresponding to ecf) and 0.0008 (corresponding to fcem), respectively.
  • each predicted path corresponding to path b-c and the probability value corresponding to each predicted path, and each predicted path corresponding to path a-b-c and the probability value corresponding to each predicted path are acquired.
  • the path statistical data set can be accurately searched for the predicted path corresponding to each path in the path subset and the probability value corresponding to each predicted path as the subsequent predicted path of the current path of the user to be predicted Based on the forecast data.
  • the descending order of the probability values is used to select the ranking at a preset ranking threshold (for example, setting the ranking threshold to 11)
  • the previous predicted route is used as the predicted path to be recommended.
  • the predicted path corresponding to the probability value ranked 1-10 is selected as the predicted path to be recommended.
  • the method realizes the linked list historical data combined with the user's path data, and obtains a variety of predicted routes. Based on the route prediction with a large probability, it can accurately predict the disappearing route of the user to be predicted.
  • An embodiment of the present application further provides a predicted route acquisition device, which is used to execute any embodiment of the foregoing predicted route acquisition method.
  • a predicted route acquisition device which is used to execute any embodiment of the foregoing predicted route acquisition method.
  • FIG. 7 is a schematic block diagram of a device for obtaining a predicted route according to an embodiment of the present application.
  • the predicted route acquisition device 100 may be configured in the server.
  • the predicted route acquisition device 100 includes a data storage unit 110, a data cutting unit 120, a route subset acquisition unit 130, a predicted route acquisition unit 140, and a predicted route acquisition unit 150.
  • the data storage unit 110 is configured to acquire the collected user path data, convert the user path data into linked list data, and store the corresponding linked list historical data in the constructed linked list.
  • the data storage unit 110 includes a data temporary storage unit 111, a data analysis unit 112, a linked list traversal unit 113, and a data insertion unit 114.
  • the data temporary storage unit 111 is configured to receive user route data obtained by identifying the collected vehicle pictures, and store the user route data in the created temporary database.
  • the temporary data storage unit 111 is also used to:
  • the data parsing unit 112 is configured to acquire the user path data from the temporary database according to a preset fetch cycle, and parse and acquire the user unique identification code corresponding to the user path data and the to-be-processed linked list corresponding to the user unique identification code data.
  • the data storage unit 110 further includes:
  • Multi-group linked list data judgment unit for judging whether the to-be-processed linked list data corresponding to the user unique identification code is multiple sets of linked list data; data sorting unit to be used if the to-be-processed linked list data corresponding to the user unique identification code For multiple sets of linked list data, sort the linked list data included in the multiple sets of linked list data in ascending time order to obtain the sorted linked list data; a data acquisition unit for processing if corresponding to the user unique identification code The linked list data is not multiple sets of linked list data, and the to-be-processed linked list data is obtained.
  • the linked list traversing unit 113 is configured to traverse and determine whether there is linked list historical data corresponding to the user unique identification code in the locally stored linked list.
  • the data insertion unit 114 is configured to insert the to-be-processed linked list data into the linked list historical data for storage if there is linked list historical data corresponding to the user unique identification code in the linked list.
  • the data insertion unit 114 includes: a historical data acquisition unit for acquiring each linked list data in the linked list historical data, and a time point corresponding to each linked list data through the current intersection; current data acquisition A unit, used to obtain each linked list data in the to-be-processed linked list data, and a time point corresponding to each linked list data passing through the current intersection; sequentially inserting the unit, used to acquire the linked list in ascending order according to the time point through the current intersection
  • the linked list historical data and the to-be-processed linked list data are sorted, each linked list data in the to-be-processed linked list data is inserted into the linked list historical data, and the pointer field of each linked list data is adjusted accordingly.
  • the data storage unit 110 further includes:
  • a linked list data creation unit 115 is used to establish initial linked list data in the linked list according to the user's unique identification code if there is no linked list historical data corresponding to the user's unique identification code in the linked list.
  • the pending list data is inserted into the initial list data.
  • the data storage unit 110 further includes:
  • the storage container positioning unit is configured to locate an application container engine according to the user unique identification code and obtain the linked list historical data stored in the application container engine.
  • the data cutting unit 120 is used to cut the historical data of the linked list corresponding to each user into multi-segment paths according to the preset historical value of the linked list corresponding to each user in the linked list according to the preset cutting time interval value. Get the path statistics data collection.
  • the data cutting unit 120 includes:
  • the node data acquiring unit 121 is used to acquire each node data included in the linked list historical data corresponding to each user in the linked list; the time difference judgment unit 122 is used to determine the time value corresponding to any adjacent node data Whether the difference between them exceeds the cutting time interval value; the linked list data cutting unit 123 is used to determine if the difference between the time values corresponding to the adjacent node data exceeds the cutting time interval value.
  • the pointer relationship between adjacent node data is deleted to obtain a multi-segment path.
  • the path subset acquisition unit 130 is configured to receive the current path of the user to be predicted, and arrange multiple nodes according to the nodes included in the current path to form a path subset.
  • the path subset acquisition unit 130 includes:
  • the node order obtaining unit is used to sequentially obtain all nodes included in the current path according to the current path;
  • the reverse order arrangement unit is used to arrange all nodes included in the current path in reverse order to obtain the path Subset.
  • the predicted path acquisition unit 140 is configured to search the path statistical data set for the predicted path including each path in the path subset and the probability value corresponding to each predicted path.
  • the predicted path acquisition unit 140 includes: a first target path acquisition unit 1411, configured to acquire each corresponding path in the path subset A type of path to obtain each target path; a first predicted path set acquisition unit 1412 is used to acquire a first predicted path subset corresponding to each type of target path in the path statistical data set to form a first prediction Path set; first total number acquisition unit 1413, used to obtain the total number of each first predicted path subset; first total class number acquisition unit 1414, used to obtain each first predicted path subset including all The total number of classes of the target path and the data that does not end with the target path; wherein, in each type of data in the first predicted path subset including the target path, each type of data constitutes a Prediction paths; the first probability value obtaining unit 1415 is used to obtain the ratio of the frequency of each prediction path in each first prediction path subset to the total number of corresponding first prediction path subsets, to obtain The probability value corresponding to a predicted
  • the predicted path acquisition unit 140 includes: a second target path acquisition unit 1421, configured to acquire each corresponding path in the path subset A type of path to obtain each target path; a second predicted path set acquisition unit 1422 is used to acquire a second prediction corresponding to various types of target paths within a preset time period in the path statistical data set Path subsets to form a second predicted path set; a second total number of acquisition units 1423 for acquiring the total number of each second prediction path subset; a second total number of categories acquisition unit 1424 for acquiring each A second predicted path subset includes the target path, and the total number of data types that do not end with the target path; where each second predicted path subset includes multiple types of the target path In the data, each type of data constitutes a prediction path; the second probability value obtaining unit 1425 is used to obtain the frequency of each prediction path in each subset of the second prediction path and the total of the corresponding second prediction path subset The ratio of the number
  • the predicted path obtaining unit 140 includes: a third target path obtaining unit, configured to obtain each type of path corresponding to the path subset to obtain each Target path; a third predicted path set acquisition unit, used to acquire a third predicted path subset corresponding to various types of target paths in the path statistical data set to form a third predicted path set; a measured path set acquisition unit , Used to obtain each path of each third predicted path subset, and delete the path ending with the target path to form a predicted path set; a third probability value acquisition unit is used to obtain each of the predicted path set Predicting a path to divide the total number of each predicted path in the path statistical data set by the total number of the path statistical data set to obtain a probability value corresponding to each predicted path.
  • the predicted route acquisition unit 150 is configured to sort the probability values corresponding to each predicted path in descending order to obtain a predicted path that is ranked before a preset ranking threshold to form a predicted path to be recommended.
  • the device realizes the linked list historical data of the user's path data, and obtains a variety of predicted routes. Based on the route prediction with a large probability, it can accurately predict the disappearing route of the user to be predicted.
  • the above-mentioned predicted route acquisition device may be implemented in the form of a computer program, and the computer program may run on a computer device as shown in FIG. 12.
  • FIG. 12 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the computer device 500 is a server.
  • the server may be an independent server or a server cluster composed of multiple servers.
  • the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the computer program 5032 When the computer program 5032 is executed, it may cause the processor 502 to execute the predicted route acquisition method.
  • the processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503.
  • the processor 502 can execute the predicted route acquisition method.
  • the network interface 505 is used for network communication, such as providing user path data transmission.
  • the processor 502 is used to run the computer program 5032 stored in the memory, so as to implement the predicted route acquisition method of the embodiment of the present application.
  • the embodiment of the computer device shown in FIG. 12 does not constitute a limitation on the specific configuration of the computer device.
  • the computer device may include more or fewer components than shown in the figure. Or combine certain components, or arrange different components.
  • the computer device may only include a memory and a processor. In such an embodiment, the structures and functions of the memory and the processor are consistent with the embodiment shown in FIG. 12, and are not described here.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor.
  • a computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, where the computer program is executed by the processor to implement the predicted route acquisition method of the embodiment of the present application.
  • the storage medium may be an internal storage unit of the foregoing device, such as a hard disk or a memory of the device.
  • the storage medium may also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (Smart) Card (SMC), a secure digital (SD) card, or a flash memory card (Flash Card) etc.
  • the storage medium may also include both an internal storage unit of the device and an external storage device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Traffic Control Systems (AREA)

Abstract

预测路线获取方法、装置、计算机设备及存储介质。该方法包括:将用户路径数据转化为链表数据并存储在链表中对应的链表历史数据中(S110);按切割时间间隔值将与每一用户对应的链表历史数据切割成多段路径,统计得到路径统计数据集合(S120);接收待预测用户的当前路径,根据当前路径中得到多条路径以组成路径子集(S130);在路径统计数据集合中搜索包括路径子集中各路径对应的预测路径及对应的概率值(S140);将与各预测路径对应的概率按降序排序,得到排名位于排名阈值之前的预测路径,以组成待推荐预测路径(S150)。

Description

预测路线获取方法、装置、计算机设备及存储介质
本申请要求于2019年1月7日提交中国专利局、申请号为201910013101.5、申请名称为“预测路线获取方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据分析技术领域,尤其涉及一种预测路线获取方法、装置、计算机设备及存储介质。
背景技术
目前,对道路上行驶的车辆进行监控,一般是通过设置在道路的固定装置上的高清摄像头来采集获取。通过采集的海量的监控视频,能实现对车辆的行程路线进行分析。但是若存在遮挡号牌或是高清摄像头故障等极端情况下,在进行对重点车辆的监控过程中,会出现短时间线路失踪的情况,无法继续通过离线数据对重点车辆的线路预测,从而失去该终点车辆的当前行踪。
发明内容
本申请实施例提供了一种预测路线获取方法、装置、计算机设备及存储介质,旨在解决现有技术中对指定车辆的监控过程中,会出现短时间线路失踪的情况,无法继续通过离线数据对指定车辆的线路预测的问题。
第一方面,本申请实施例提供了一种预测路线获取方法,其包括:获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中;根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合;接收待预测用户的当前路径,根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集;在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值;将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
第二方面,本申请实施例提供了一种预测路线获取装置,其包括:数据存储单元,用于获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中;数据切割单元,用于根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合;路径子集获取单元,用于接收待预测用户的当前路径,根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集;预测路径获取单元,用于在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值;预测路线获取单元,用于将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
第三方面,本申请实施例又提供了一种计算机设备,其包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述的预测路线获取方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行上述第一方面所述的预测路线获取方法。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的预测路线获取方法的应用场景示意图;
图2为本申请实施例提供的预测路线获取方法的流程示意图;
图3为本申请实施例提供的预测路线获取方法的子流程示意图;
图4为本申请实施例提供的预测路线获取方法的另一子流程示意图;
图5为本申请实施例提供的预测路线获取方法的另一子流程示意图;
图6为本申请实施例提供的预测路线获取方法的另一子流程示意图;
图7为本申请实施例提供的预测路线获取装置的示意性框图;
图8为本申请实施例提供的预测路线获取装置的子单元示意性框图;
图9为本申请实施例提供的预测路线获取装置的另一子单元示意性框图;
图10为本申请实施例提供的预测路线获取装置的另一子单元示意性框图;
图11为本申请实施例提供的预测路线获取装置的另一子单元示意性框图;
图12为本申请实施例提供的计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
请参阅图1和图2,图1是本申请实施例提供的预测路线获取方法的应用场景示意图,图2是本申请实施例提供的预测路线获取方法的流程示意图,该预测路线获取方法应用于服务器中,该方法通过安装于服务器中的应用软件进行执行。
如图2所示,该方法包括步骤S110~S150。
S110、获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中。
在本实施例中,当服务器接收了由前端采集装置采集而转化得到的用户路径数据后,以链表的方式存储个用户对应的用户路径数据,以实现对每一用户 的路径进行有效监控。
在一实施例中,如图3所示,步骤S110包括步骤S111-步骤S115:
S111、接收将所采集的车辆图片进行识别得到的用户路径数据,将所述用户路径数据存储至创建的临时数据库中。
在本实施例中,是设置在道路上的前端采集装置(如监控摄像头)采集到多张车辆图片并进行车牌识别后上传至服务器,服务器接收包括车牌号的用户路径数据,然后将所述用户路径数据存储至在服务器中创建的临时数据库中。由于上传服务器的是用户路径数据,无需上传车辆图片,降低了数据传输量。
为了更清楚的理解技术方案的使用场景(例如以监控用户的交通路线轨迹为例),下面对所涉及到的终端进行介绍。其中,在本申请中,是站在服务器的角度来描述技术方案。
一是服务器,服务器中部署有消息中间件和链表。消息中间件用于接收前端采集装置上传的用户路径数据,并将用户路径数据解析并处理成链表数据后发送至链表进行存储。
二是前端采集装置,例如设置在道路上的监控摄像头(这些监控摄像头一般安装在路口、高速路收费站路口、重要道路地段等地方),用于采集用户路径数据并上传至消息中间件,例如监控摄像头所采集的车辆图片本地进行车牌识别后,上传至服务器中可以解析获取的用户路径数据包括车牌号、所通过当前路口名称、通过当前路口的时间点等信息,即监控摄像头所采集的车辆图片至少包括车牌号、所通过当前路口名称、通过当前路口的时间点等信息,其中车牌号即可作为用户唯一识别码,所通过当前路口名称、及通过当前路口的时间点可作为与用户唯一识别码对应的待处理链表数据。例如A路口设置的监控摄像头在A路口拍摄到车辆a的车辆图片,通过A路口设置的监控摄像头进行车牌识别得到车辆a的车牌号,此时根据车辆a的车牌号、路口A的路口名称(即所通过当前路口名称)、及A路口设置的监控摄像头在A路口拍摄到车辆a的车辆图片的时间(即通过当前路口的时间点)即可组成用户路径数据。
在一实施例中,所述步骤S111中接收将所采集的车辆图片进行识别得到的用户路径数据,将所述用户路径数据存储至创建的临时数据库中,包括:
通过消息中间件接收将所采集的车辆图片进行识别得到的用户路径数据,将所述用户路径数据存储至在所述消息中间件中创建的临时数据库中;其中, 所述消息中间件为分布式发布订阅消息中间件;所述用户路径数据包括车牌号、所通过当前路口名称、通过当前路口的时间点。
在本实施例中,所述消息中间件为分布式发布订阅消息中间件(分布式发布订阅消息中间件即Kafka消息中间件),Kafka消息中间件可形象的理解为一个大的水池,不断的生产、存储、消费着各种类别的消息,即生产者往队列(即形象理解的水池)里写消息,消费者从队列里取消息进行业务逻辑。通过Kafka消息中间件作为用户路径数据的临时存储数据,能有效的对用户路径数据进行对应的数据加工和处理。
S112、按预设的取数周期从所述临时数据库中获取所述用户路径数据,解析获取用户路径数据对应的用户唯一识别码、及与用户唯一识别码对应的待处理链表数据。
在本实施例中,对车辆图片识别得到的用户路径数据是先存储在临时数据库中,为了消费临时数据库中的用户路径数据,需按预设的取数周期从所述临时数据库中获取所述用户路径数据,进行数据加工后存储至目标区域。在对从所述临时数据库中获取所述用户路径数据进行数据加工时,是解析获取用户路径数据对应的用户唯一识别码、及与用户唯一识别码对应的待处理链表数据;其中所述待处理链表数据包括所通过当前路口名称、通过当前路口的时间点。
即Kafka消息中间件中接收并保存了用户路径数据后,将增量的数据暂时保存在临时数据库中,当临时数据库中沉淀的增量的数据到达一定量,按预设的取数周期从临时数据库中获取增量的用户路径数据,将用户路径数据解析后,更新至链表中,并将临时数据库已经处理过的用户路径数据做删除操作,避免数据重复插入到链表中。
为了更清楚的理解本申请中采用链表存储数据,下面对链表进行介绍。
链表中可以针对每一用户建立一条链表数据,每一条链表数据中仅保存与该链表数据所对应用户的相关数据,多条链表数据即可组成一张链表。
链表的具体存储表示为:
①用一组任意的存储单元来存放线性表的结点(这组存储单元既可以是连续的,也可以是不连续的)
②链表中结点的逻辑次序和物理次序不一定相同。为了能正确表示结点间的逻辑关系,在存储每个结点值的同时,还必须存储指示其后继结点的地址(或 位置)信息(称为指针(pointer)或链(link))。
链式存储是最常用的存储方式之一,它不仅可用来表示线性表,而且可用来表示各种非线性的数据结构。
链表中包括data域(即数据域)和next域(即指针域);链表中每一条链表数据的data域用于存放结点值的数据域,如用户路径数据中所包括的所通过当前路口名称、通过当前路口的时间点;next域用于存放结点的直接后继的地址(位置)的指针域(链域)。
在一实施例中,步骤S112之后还包括:
判断与所述用户唯一识别码对应的待处理链表数据是否为多组链表数据;
若与所述用户唯一识别码对应的待处理链表数据为多组链表数据,将多组链表数据中所包括的链表数据按时间升序的方式进行排序,得到排序后的链表数据;
若与所述用户唯一识别码对应的待处理链表数据不为多组链表数据,获取所述待处理链表数据。
在本实施例中,当从临时数据库所取出多组数据后,每一组数据都对应一个用户唯一识别码,且每一组数据能根据链表数据的格式进行加工,即每组数据从临时数据库中取出时,将该组数据中的待处理链表数据封装至链表数据的数据域,并将该链表数据的指针域初始设置为空值。此时将该链表数据的标识属性置为用户唯一识别码,通过上述过程即可将每组从临时数据库的用户路径数据加工成链表数据。
显然,若有多组数据都对应同一个用户唯一识别码,表示与所述用户唯一识别码对应的待处理链表数据是否为多组链表数据。例如,在Kafka消息中间件中解析到某一用户唯一识别码(例如记为用户A1),其对应有在用户A1在2018年6月1日10:00:00通过卡口a;用户A1在在2018年6月1日09:00:00通过卡口b,这就表示该用户A1此次被解析的的待处理链表数据中包括2组链表数据,需要在该用户对应的链表历史数据中增加2个链表存储单元,以分别存储不同时间点的链表数据。上述两条数据均对应的是用户A1的待处理链表数据,此时按时间先后顺序进排序时,A1在在2018年6月1日09:00:00,通过卡口b排在之前;用户A1在2018年6月1日10:00:00,通过卡口a排在之后,这样将多组链表数据进行时间顺序调整后再插入链表,可实现按时间先后顺序 存储用户路径数据。
S113、遍历并判断本地已存储的链表中是否存在与所述用户唯一识别码对应的链表历史数据。
在本实施例中,遍历并判断本地已存储的链表(本地已存储的链表即服务器中已存储的各链表)中是否存在与所述用户唯一识别码对应的链表历史数据,是为了判断链表中是否有该用户唯一识别码对应的历史数据;若链表中不存在与所述用户唯一识别码对应的链表历史数据,需要在链表中新建初始链表,再将所述待处理链表数据对应插入初始链表;若链表中存在与所述用户唯一识别码对应的链表历史数据,将所述待处理链表数据插入至对应链表历史数据进行存储即可。
S114、若链表中存在与所述用户唯一识别码对应的链表历史数据,将所述待处理链表数据插入至所述链表历史数据进行存储。
在一实施例中,所述步骤S114包括:
获取所述链表历史数据中每一链表数据,及每一链表数据对应的通过当前路口的时间点;
获取所述待处理链表数据中每一链表数据,及每一链表数据对应的通过当前路口的时间点;
按通过当前路口的时间点升序对获取所述链表历史数据及获取所述待处理链表数据进行排序,将所述待处理链表数据中每一链表数据插入至所述链表历史数据,并对应调整每一链表数据的指针域。
在本实施例中,链表的data域为时间点+卡口;从链表头开始,不断找到next域(即指针域)指定的节点,每次移动都保留两个指针值,其中一个指针t1是停留在当前的节点,另一个指针t2停留在下一个next域的节点;通过比对目标时间是否在t1和t2所指向的节点对应的时间之间,若是的话,则在t1和t2所指向的节点中间增加新增加一个节点,保存当前的数据。
将新增的数据不断更新到与用户唯一识别码对应的链表数据,实现了单一用户链表数据的更新。通过遍历每个用户唯一识别码对应的链表数据,将新增的链表数据补充到用户时序链表数据中,得到最新的链表数据(包含了时间+卡口),并且基于用户的链表数据,得到用户在不同路段(卡口与卡口之间构成路段)上的通行时间,即路段通行时间表。
在一实施例中,如图3所示,步骤S113之后,还包括:
S115、若所述链表中不存在与所述用户唯一识别码对应的链表历史数据,根据用户唯一识别码在链表对应建立初始链表数据,并将与用户唯一识别码对应的待处理链表数据插入至初始链表数据。
在本实施例中,若链表中不存在与所述用户唯一识别码对应的链表历史数据,表示所述用户唯一识别码对应的车辆是首次被监控拍摄,需要在链表中新建初始链表,将该初始链表的标识属性置为用户唯一识别码,再将所述待处理链表数据对应插入初始链表。
在一实施例中,步骤S1141之前,还包括:
根据所述用户唯一识别码定位应用容器引擎,获取所述应用容器引擎中存储的链表历史数据。
在本实施例中,可以在服务器建立多个应用容器引擎(即Docker容器),每一应用容器引擎以用户唯一识别码作为标识属性命名,并对应存储与所述用户唯一识别码对应的链表数据。通过对每个用户启动一个Docker容器,然后通过部署和启动Docker容器的程序,提高大规模用户快速更新链表。
S120、根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合。
在一实施例中,如图4所示,步骤S120包括:S121、获取所述链表中每一用户对应的链表历史数据包括的各结点数据;S122、判断任意相邻的结点数据对应的时间值之间的差值是否超出所述切割时间间隔值;S123、若存在有相邻的结点数据对应的时间值之间的差值超出所述切割时间间隔值,将对应的相邻的结点数据之间指针关系进行删除,以得到多段路径。
在本实施例中,在链表中包括海量用户的链表历史数据,每一用户的链表历史数据表示该用户的历史路径数据,能准确的反映用户在何时路过何卡口。在每一用户的链表历史数据中每一结点数据均包括data域和next域,data域用于存放结点值的数据域,如用户路径数据中所包括的当前通过的路口名称和通过当前路口的时间。这样,一旦某一用户的链表历史数据中相邻两个结点数据的时间间隔超出预设的切割时间间隔值(如取切割时间间隔值为2小时),则将链表历史数据形成的链式数据中将上述相邻的两个结点之间的链式连接关系 切割断开(也就是清除上述两个相邻结点之间指针的指向关系);若链表历史数据中相邻两个结点数据的时间间隔未超出预设的切割时间间隔值,则保持上述相邻两个结点数据的链式连接关系。通过预设的切割时间间隔值,能将每一用户的链表历史数据切割成多段路径,而多个不同的用户的链表历史数据均经过上述方式的切割,故能得到与各用户对应的链表历史数据切割成多段路径,统计多段路径得到路径统计数据集合。
由于在路径统计数据集合中可获知路径统计数据包括哪些路径,以及与每一路径对应概率值,故在后续步骤中可根据路径统计数据中的路径进行路径预测。
S130、接收待预测用户的当前路径,根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集。
在一实施例中,步骤S130包括:
根据所述当前路径,依序获取所述当前路径包括的所有结点;
对所述当前路径包括的所有结点进行倒序排列,得到路径子集。
在本实施例中,例如待预测用户(记为用户A)的当前路径为a-b-c,之后用户A的路径因无法获取(如用户A遮挡号牌),此时为了预测用户A之后的路径,可以先获取当前路径a-b-c中包括的所有结点为a、b、c。结点a、b、c倒序的顺序为c、b、a。对这3个结点进行倒序排列时,得到的路径子集结果为c,b-c,a-b-c,也就是按照最后一个结点的顺序倒推,先是获取最后一个结点作为路径子集其中一条路径,再获取后两个结点的连接路线作为路径子集中另一条路径,以此类推,直至获取当前路径包括的所有结点的连接路线组成路径子集。通过上述方式,能有效且快速的获取待预测用户的当前路径对后续预测路线影响较大的路径子集。
S140、在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值。
在一实施例中,作为步骤S140的第一实施例,如图5所示,步骤S140包括:S1411、获取所述路径子集中对应的每一类路径,以得到各目标路径;S1412、获取在所述路径统计数据集合中与各类目标路径分别对应的第一预测路径子集,以组成第一预测路径集;S1413、获取每一第一预测路径子集的总条数;S1414、获取每一第一预测路径子集中包括所述目标路径、且未以所述目标路径为结束 路径的数据的总类数;其中,在每一第一预测路径子集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;S1415、获取在每一第一预测路径子集中每一种预测路径的频次与对应第一预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
在步骤S140的第一实施例中,未考虑时间维度时,例如先在路径统计数据集合中搜索包括目标路径c且未以目标路径c结尾的所有预测路径(例如e-c-f,f-c-e-m等路径中都包括路径c且未以目标路径c结尾),及与包括路径c的预测路径一一对应的概率值;例如包括路径c的预测路径有100条,路径e-c-f出现的频次为20次,该路径e-c-f对应的概率值为20/100=0.2;同样的路径f-c-e-m出现的频次为80次,该路径e-c-f对应的概率值为80/100=0.8。其中,路径c为路径子集中的其中一类路径,可记为第一目标路径;而由路径e-c-f和路径f-c-e-m这两种预测路径组成与第一目标路径对应的第一预测路径子集1(同样的,与第二目标路径对应的第一预测路径子集2,与第三目标路径对应的第一预测路径子集3,……,与第N目标路径对应的第一预测路径子集N,由第一预测路径子集1-第一预测路径子集N组成第一预测路径集);第一预测路径子集1中的总条数为100条,第一预测路径子集1中包括所述目标路径的总类数为2(分别为e-c-f,f-c-e-m),在第一预测路径子集1中的两种预测路径(分别为e-c-f,f-c-e-m)的频次与对应第一预测路径子集1的总条数之比分别为0.2(对应e-c-f)和0.8(对应f-c-e-m)。
按照与路径c同样的方式,获取与路径b-c对应的各预测路径及与各预测路径对应的概率值,以及路径a-b-c对应的各预测路径及与各预测路径对应的概率值。通过上述方式能准确的在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,以作为待预测用户的当前路径后续的预测路线的预测数据依据。
在一实施例中,作为步骤S140的第二实施例,如图6所示,步骤S140包括:S1421、获取所述路径子集中对应的每一类路径,以得到各目标路径;S1422、获取在所述路径统计数据集合中在预设的时间段内、并与各类目标路径分别对应的第二预测路径子集,以组成第二预测路径集;S1423、获取每一第二预测路径子集的总条数;S1424、获取每一第二预测路径子集中包括所述目标路径、且未以所述目标路径为结束路径的数据的总类数;其中,在每一第二预测路径子 集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;S1425、获取在每一第二预测路径子集中每一种预测路径的频次与对应第二预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
在步骤S140的第二实施例中,在考虑了时间维度时,例如先在路径统计数据集合中搜索包括路径c、未以目标路径c结尾且在2018年1月1日18:00-19:00的所有预测路径(例如e-c-f,f-c-e-m等路径中都包括目标路径c且时间都在2018年1月1日18:00-19:00内且未以目标路径c结尾),及与包括路径c的预测路径一一对应的概率值;例如包括路径c且在2018年1月1日18:00-19:00的预测路径有100条,路径e-c-f出现的频次为20次,该路径e-c-f对应的概率值为20/100=0.2;同样的路径f-c-e-m出现的频次为80次,该路径e-c-f对应的概率值为80/100=0.8。其中,路径c为路径子集中的其中一类路径,可记为第一目标路径;而由路径e-c-f和路径f-c-e-m这两种预测路径组成与第一目标路径对应的第二预测路径子集1(同样的,与第二目标路径对应的第二预测路径子集2,与第三目标路径对应的第二预测路径子集3,……,与第N目标路径对应的第二预测路径子集N,由第二预测路径子集1-第二预测路径子集N组成第二预测路径集);第二预测路径子集1中的总条数为100条,第一预测路径子集1中包括所述目标路径的总类数为2(分别为e-c-f,f-c-e-m),在第一预测路径子集1中的两种预测路径(分别为e-c-f,f-c-e-m)的频次与对应第一预测路径子集1的总条数之比分别为0.2(对应e-c-f)和0.8(对应f-c-e-m)。
按照与路径c同样的方式,获取与路径b-c对应的各预测路径及与各预测路径对应的概率值,以及路径a-b-c对应的各预测路径及与各预测路径对应的概率值。通过上述方式能结合时间维度准确的在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,以作为待预测用户的当前路径后续的预测路线的预测数据依据。
在一实施例中,作为步骤S140的第三实施例,步骤S140包括:
获取所述路径子集中对应的每一类路径,以得到各目标路径;
获取在所述路径统计数据集合中与各类目标路径分别对应的第三预测路径子集,以组成第三预测路径集;
获取每一第三预测路径子集的各路径,删除以目标路径为结尾路径的路径,以组成预测路径集合;
获取所述预测路径集合中每一预测路径,以将每一预测路径在所述路径统计数据集合中的总条数与所述路径统计数据集合的总条数相除,得到与每一预测路径对应的概率值。
步骤S140的第三实施例获取每一预测路径对应的概率值与步骤S140的第一实施例的不同之处在于,统计的是每一预测路径在所述路径统计数据集合中的总条数,然后与所述路径统计数据集合的总条数相除,得到与每一预测路径对应的概率值。
例如,先在路径统计数据集合中搜索包括目标路径c且未以目标路径c结尾的所有预测路径(例如e-c-f,f-c-e-m等路径中都包括路径c且未以目标路径c结尾),及与包括路径c的预测路径一一对应的概率值;例如包括路径c的预测路径有100条,路径e-c-f出现的频次为20次,路径f-c-e-m出现的频次为80次,而路径统计数据集合中的总条数为10000条。其中,路径c为路径子集中的其中一类路径,可记为第一目标路径;而由路径e-c-f和路径f-c-e-m这两种预测路径组成与第一目标路径对应的第三预测路径子集1(同样的,与第二目标路径对应的第三预测路径子集2,与第三目标路径对应的第三预测路径子集3,……,与第N目标路径对应的第三预测路径子集N,由第三预测路径子集1-第三预测路径子集N组成第一预测路径集);第三预测路径子集1中所包括路径e-c-f和f-c-e-m均为预测路径,在第三预测路径子集1中的两种预测路径(分别为e-c-f,f-c-e-m)的总条数与所述路径统计数据集合中的总条数之比分别为0.0002(对应e-c-f)和0.0008(对应f-c-e-m)。
按照与路径c同样的方式,获取与路径b-c对应的各预测路径及与各预测路径对应的概率值,以及路径a-b-c对应的各预测路径及与各预测路径对应的概率值。通过上述方式能准确的在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,以作为待预测用户的当前路径后续的预测路线的预测数据依据。
S150、将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
在本实施例中,例如按步骤S140的第三实施例得到的与各预测路径对应的概率值,按概率值的降序进行排序,选取排名位于预设的排名阈值(例如设置排名阈值为11)之前的预测路线作为待推荐的预测路径,例如选取排名1-10的 概率值对应的预测路径作为待推荐的预测路径。通过上述方式,基于大数概率的线路预测,能准确地预测待预测用户的消失路线。
该方法实现了结合用户路径数据的链表历史数据,得到了多种预测路线,并基于大数概率的线路预测,能准确地预测处待预测用户的消失路线。
本申请实施例还提供一种预测路线获取装置,该预测路线获取装置用于执行前述预测路线获取方法的任一实施例。具体地,请参阅图7,图7是本申请实施例提供的预测路线获取装置的示意性框图。该预测路线获取装置100可以配置于服务器中。
如图7所示,所述预测路线获取装置100包括数据存储单元110、数据切割单元120、路径子集获取单元130、预测路径获取单元140、预测路线获取单元150。
数据存储单元110,用于获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中。
在一实施例中,如图8所示,数据存储单元110包括数据临时存储单元111、数据解析单元112、链表遍历单元113、数据插入单元114。
数据临时存储单元111,用于接收将所采集的车辆图片进行识别得到的用户路径数据,将所述用户路径数据存储至创建的临时数据库中。
在一实施例中,所述数据临时存储单元111还用于:
通过消息中间件接收将所采集的车辆图片进行识别得到的用户路径数据,将所述用户路径数据存储至在所述消息中间件中创建的临时数据库中;其中,所述消息中间件为分布式发布订阅消息中间件;所述用户路径数据包括车牌号、所通过当前路口名称、通过当前路口的时间点。
数据解析单元112,用于按预设的取数周期从所述临时数据库中获取所述用户路径数据,解析获取用户路径数据对应的用户唯一识别码、及与用户唯一识别码对应的待处理链表数据。
在一实施例中,数据存储单元110还包括:
多组链表数据判断单元,用于判断与所述用户唯一识别码对应的待处理链表数据是否为多组链表数据;数据排序单元,用于若与所述用户唯一识别码对应的待处理链表数据为多组链表数据,将多组链表数据中所包括的链表数据按时间升序的方式进行排序,得到排序后的链表数据;数据获取单元,用于若与 所述用户唯一识别码对应的待处理链表数据不为多组链表数据,获取所述待处理链表数据。
链表遍历单元113,用于遍历并判断本地已存储的链表中是否存在与所述用户唯一识别码对应的链表历史数据。
数据插入单元114,用于若链表中存在与所述用户唯一识别码对应的链表历史数据,将所述待处理链表数据插入至所述链表历史数据进行存储。
在一实施例中,所述数据插入单元114包括:历史数据获取单元,用于获取所述链表历史数据中每一链表数据,及每一链表数据对应的通过当前路口的时间点;当前数据获取单元,用于获取所述待处理链表数据中每一链表数据,及每一链表数据对应的通过当前路口的时间点;依序插入单元,用于按通过当前路口的时间点升序对获取所述链表历史数据及获取所述待处理链表数据进行排序,将所述待处理链表数据中每一链表数据插入至所述链表历史数据,并对应调整每一链表数据的指针域。
在一实施例中,如图8所示,数据存储单元110还包括:
链表数据新建单元115,用于若所述链表中不存在与所述用户唯一识别码对应的链表历史数据,根据用户唯一识别码在链表对应建立初始链表数据,并将与用户唯一识别码对应的待处理链表数据插入至初始链表数据。
在一实施例中,数据存储单元110还包括:
存储容器定位单元,用于根据所述用户唯一识别码定位应用容器引擎,获取所述应用容器引擎中存储的链表历史数据。
数据切割单元120,用于根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合。
在一实施例中,如图9所示,数据切割单元120包括:
结点数据获取单元121,用于获取所述链表中每一用户对应的链表历史数据包括的各结点数据;时间差值判断单元122,用于判断任意相邻的结点数据对应的时间值之间的差值是否超出所述切割时间间隔值;链表数据切割单元123,用于若存在有相邻的结点数据对应的时间值之间的差值超出所述切割时间间隔值,将对应的相邻的结点数据之间指针关系进行删除,以得到多段路径。
路径子集获取单元130,用于接收待预测用户的当前路径,根据所述当前路 径中所包括的结点进行排列得到多条路径,以组成路径子集。
在一实施例中,路径子集获取单元130包括:
结点依序获取单元,用于根据所述当前路径,依序获取所述当前路径包括的所有结点;倒序排列单元,用于对所述当前路径包括的所有结点进行倒序排列,得到路径子集。
预测路径获取单元140,用于在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值。
在一实施例中,作为预测路径获取单元140的第一实施例,如图10所示,预测路径获取单元140包括:第一目标路径获取单元1411,用于获取所述路径子集中对应的每一类路径,以得到各目标路径;第一预测路径集获取单元1412,用于获取在所述路径统计数据集合中与各类目标路径分别对应的第一预测路径子集,以组成第一预测路径集;第一总条数获取单元1413,用于获取每一第一预测路径子集的总条数;第一总类数获取单元1414,用于获取每一第一预测路径子集中包括所述目标路径、且未以所述目标路径为结束路径的数据的总类数;其中,在每一第一预测路径子集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;第一概率值获取单元1415,用于获取在每一第一预测路径子集中每一种预测路径的频次与对应第一预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
在一实施例中,作为预测路径获取单元140的第二实施例,如图11所示,预测路径获取单元140包括:第二目标路径获取单元1421,用于获取所述路径子集中对应的每一类路径,以得到各目标路径;第二预测路径集获取单元1422,用于获取在所述路径统计数据集合中在预设的时间段内、并与各类目标路径分别对应的第二预测路径子集,以组成第二预测路径集;第二总条数获取单元1423,用于获取每一第二预测路径子集的总条数;第二总类数获取单元1424,用于获取每一第二预测路径子集中包括所述目标路径、且未以所述目标路径为结束路径的数据的总类数;其中,在每一第二预测路径子集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;第二概率值获取单元1425,用于获取在每一第二预测路径子集中每一种预测路径的频次与对应第二预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
在一实施例中,作为预测路径获取单元140的第三实施例,预测路径获取 单元140包括:第三目标路径获取单元,用于获取所述路径子集中对应的每一类路径,以得到各目标路径;第三预测路径集获取单元,用于获取在所述路径统计数据集合中与各类目标路径分别对应的第三预测路径子集,以组成第三预测路径集;测路径集合获取单元,用于获取每一第三预测路径子集的各路径,删除以目标路径为结尾路径的路径,以组成预测路径集合;第三概率值获取单元,用于获取所述预测路径集合中每一预测路径,以将每一预测路径在所述路径统计数据集合中的总条数与所述路径统计数据集合的总条数相除,得到与每一预测路径对应的概率值。
预测路线获取单元150,用于将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
该装置实现了结合用户路径数据的链表历史数据,得到了多种预测路线,并基于大数概率的线路预测,能准确地预测处待预测用户的消失路线。
上述预测路线获取装置可以实现为计算机程序的形式,该计算机程序可以在如图12所示的计算机设备上运行。
请参阅图12,图12是本申请实施例提供的计算机设备的示意性框图。该计算机设备500是服务器。其中,服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。参阅图12,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行预测路线获取方法。该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行预测路线获取方法。该网络接口505用于进行网络通信,如提供用户路径数据的传输等。本领域技术人员可以理解,图12中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现本申请实施例的预测路线获取方法。
本领域技术人员可以理解,图12中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图12所示实施例一致,在此不再赘述。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在本申请的另一实施例中提供计算机可读存储介质。该计算机可读存储介质可以为非易失性的计算机可读存储介质。该计算机可读存储介质存储有计算机程序,其中计算机程序被处理器执行时实现本申请实施例的预测路线获取方法。
所述存储介质可以是前述设备的内部存储单元,例如设备的硬盘或内存。所述存储介质也可以是所述设备的外部存储设备,例如所述设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储介质还可以既包括所述设备的内部存储单元也包括外部存储设备。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种预测路线获取方法,包括:
    获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中;
    根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合;
    接收待预测用户的当前路径,根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集;
    在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值;以及
    将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
  2. 根据权利要求1所述的预测路线获取方法,其中,所述根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集,包括:
    根据所述当前路径,依序获取所述当前路径包括的所有结点;
    对所述当前路径包括的所有结点进行倒序排列,得到路径子集。
  3. 根据权利要求1所述的预测路线获取方法,其中,所述在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,包括:
    获取所述路径子集中对应的每一类路径,以得到各目标路径;
    获取在所述路径统计数据集合中与各类目标路径分别对应的第一预测路径子集,以组成第一预测路径集;
    获取每一第一预测路径子集的总条数;
    获取每一第一预测路径子集中包括所述目标路径、且未以所述目标路径为结束路径的数据的总类数;其中,在每一第一预测路径子集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;
    获取在每一第一预测路径子集中每一种预测路径的频次与对应第一预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
  4. 根据权利要求1所述的预测路线获取方法,其中,所述在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,包括:
    获取所述路径子集中对应的每一类路径,以得到各目标路径;
    获取在所述路径统计数据集合中在预设的时间段内、并与各类目标路径分别对应的第二预测路径子集,以组成第二预测路径集;
    获取每一第二预测路径子集的总条数;
    获取每一第二预测路径子集中包括所述目标路径、且未以所述目标路径为结束路径的数据的总类数;其中,在每一第二预测路径子集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;
    获取在每一第二预测路径子集中每一种预测路径的频次与对应第二预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
  5. 根据权利要求1所述的预测路线获取方法,其中,所述按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,包括:
    获取所述链表中每一用户对应的链表历史数据包括的各结点数据;
    判断任意相邻的结点数据对应的时间值之间的差值是否超出所述切割时间间隔值;
    若存在有相邻的结点数据对应的时间值之间的差值超出所述切割时间间隔值,将对应的相邻的结点数据之间指针关系进行删除,以得到多段路径。
  6. 根据权利要求1所述的预测路线获取方法,其中,所述获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中,包括:
    接收将所采集的车辆图片进行识别得到的用户路径数据,将所述用户路径数据存储至创建的临时数据库中;
    按预设的取数周期从所述临时数据库中获取所述用户路径数据,解析获取用户路径数据对应的用户唯一识别码、及与用户唯一识别码对应的待处理链表数据;
    遍历并判断本地已存储的链表中是否存在与所述用户唯一识别码对应的链表历史数据;
    若链表中存在与所述用户唯一识别码对应的链表历史数据,将所述待处理 链表数据插入至所述链表历史数据进行存储。
  7. 根据权利要求6所述的预测路线获取方法,其中,所述遍历并判断本地已存储的链表中是否存在与所述用户唯一识别码对应的链表历史数据之后,还包括:
    若所述链表中不存在与所述用户唯一识别码对应的链表历史数据,根据用户唯一识别码在链表对应建立初始链表数据,并将与用户唯一识别码对应的待处理链表数据插入至初始链表数据。
  8. 根据权利要求1所述的预测路线获取方法,其中,所述在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,包括:
    获取所述路径子集中对应的每一类路径,以得到各目标路径;
    获取在所述路径统计数据集合中与各类目标路径分别对应的第三预测路径子集,以组成第三预测路径集;
    获取每一第三预测路径子集的各路径,删除以目标路径为结尾路径的路径,以组成预测路径集合;
    获取所述预测路径集合中每一预测路径,以将每一预测路径在所述路径统计数据集合中的总条数与所述路径统计数据集合的总条数相除,得到与每一预测路径对应的概率值。
  9. 根据权利要求6所述的预测路线获取方法,其中,所述解析获取用户路径数据对应的用户唯一识别码、及与用户唯一识别码对应的待处理链表数据之后,还包括:
    判断与所述用户唯一识别码对应的待处理链表数据是否为多组链表数据;
    若与所述用户唯一识别码对应的待处理链表数据为多组链表数据,将多组链表数据中所包括的链表数据按时间升序的方式进行排序,得到排序后的链表数据;
    若与所述用户唯一识别码对应的待处理链表数据不为多组链表数据,获取所述待处理链表数据。
  10. 一种预测路线获取装置,其中,包括:
    数据存储单元,用于获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中;
    数据切割单元,用于根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合;
    路径子集获取单元,用于接收待预测用户的当前路径,根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集;
    预测路径获取单元,用于在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值;以及
    预测路线获取单元,用于将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
  11. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:
    获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中;
    根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合;
    接收待预测用户的当前路径,根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集;
    在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值;以及
    将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
  12. 根据权利要求11所述的计算机设备,其中,所述根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集,包括:
    根据所述当前路径,依序获取所述当前路径包括的所有结点;
    对所述当前路径包括的所有结点进行倒序排列,得到路径子集。
  13. 根据权利要求11所述的计算机设备,其中,所述在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,包括:
    获取所述路径子集中对应的每一类路径,以得到各目标路径;
    获取在所述路径统计数据集合中与各类目标路径分别对应的第一预测路径子集,以组成第一预测路径集;
    获取每一第一预测路径子集的总条数;
    获取每一第一预测路径子集中包括所述目标路径、且未以所述目标路径为结束路径的数据的总类数;其中,在每一第一预测路径子集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;
    获取在每一第一预测路径子集中每一种预测路径的频次与对应第一预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
  14. 根据权利要求11所述的计算机设备,其中,所述在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,包括:
    获取所述路径子集中对应的每一类路径,以得到各目标路径;
    获取在所述路径统计数据集合中在预设的时间段内、并与各类目标路径分别对应的第二预测路径子集,以组成第二预测路径集;
    获取每一第二预测路径子集的总条数;
    获取每一第二预测路径子集中包括所述目标路径、且未以所述目标路径为结束路径的数据的总类数;其中,在每一第二预测路径子集中包括所述目标路径中的多类数据中,每一类数据组成一种预测路径;
    获取在每一第二预测路径子集中每一种预测路径的频次与对应第二预测路径子集的总条数之比,得到与每一种预测路径对应的概率值。
  15. 根据权利要求11所述的计算机设备,其中,所述按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,包括:
    获取所述链表中每一用户对应的链表历史数据包括的各结点数据;
    判断任意相邻的结点数据对应的时间值之间的差值是否超出所述切割时间间隔值;
    若存在有相邻的结点数据对应的时间值之间的差值超出所述切割时间间隔值,将对应的相邻的结点数据之间指针关系进行删除,以得到多段路径。
  16. 根据权利要求11所述的计算机设备,其中,所述获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的 链表历史数据中,包括:
    接收将所采集的车辆图片进行识别得到的用户路径数据,将所述用户路径数据存储至创建的临时数据库中;
    按预设的取数周期从所述临时数据库中获取所述用户路径数据,解析获取用户路径数据对应的用户唯一识别码、及与用户唯一识别码对应的待处理链表数据;
    遍历并判断本地已存储的链表中是否存在与所述用户唯一识别码对应的链表历史数据;
    若链表中存在与所述用户唯一识别码对应的链表历史数据,将所述待处理链表数据插入至所述链表历史数据进行存储。
  17. 根据权利要求16所述的计算机设备,其中,所述遍历并判断本地已存储的链表中是否存在与所述用户唯一识别码对应的链表历史数据之后,还包括:
    若所述链表中不存在与所述用户唯一识别码对应的链表历史数据,根据用户唯一识别码在链表对应建立初始链表数据,并将与用户唯一识别码对应的待处理链表数据插入至初始链表数据。
  18. 根据权利要求11所述的计算机设备,其中,所述在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值,包括:
    获取所述路径子集中对应的每一类路径,以得到各目标路径;
    获取在所述路径统计数据集合中与各类目标路径分别对应的第三预测路径子集,以组成第三预测路径集;
    获取每一第三预测路径子集的各路径,删除以目标路径为结尾路径的路径,以组成预测路径集合;
    获取所述预测路径集合中每一预测路径,以将每一预测路径在所述路径统计数据集合中的总条数与所述路径统计数据集合的总条数相除,得到与每一预测路径对应的概率值。
  19. 根据权利要求16所述的计算机设备,其中,所述解析获取用户路径数据对应的用户唯一识别码、及与用户唯一识别码对应的待处理链表数据之后,还包括:
    判断与所述用户唯一识别码对应的待处理链表数据是否为多组链表数据;
    若与所述用户唯一识别码对应的待处理链表数据为多组链表数据,将多组链表数据中所包括的链表数据按时间升序的方式进行排序,得到排序后的链表数据;
    若与所述用户唯一识别码对应的待处理链表数据不为多组链表数据,获取所述待处理链表数据。
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行以下操作:
    获取所采集的用户路径数据,将所述用户路径数据转化为链表数据,并存储在构建的链表中对应的链表历史数据中;
    根据所述链表中与每一用户对应的链表历史数据,按照预设的切割时间间隔值,将与每一用户对应的链表历史数据切割成多段路径,统计多段路径以得到路径统计数据集合;
    接收待预测用户的当前路径,根据所述当前路径中所包括的结点进行排列得到多条路径,以组成路径子集;
    在所述路径统计数据集合中搜索包括所述路径子集中各路径对应的预测路径,及与各预测路径对应的概率值;以及
    将与各预测路径对应的概率值按降序进行排序,得到排名位于预设的排名阈值之前的预测路径,以组成待推荐预测路径。
PCT/CN2019/092234 2019-01-07 2019-06-21 预测路线获取方法、装置、计算机设备及存储介质 Ceased WO2020143170A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910013101.5A CN109657879B (zh) 2019-01-07 2019-01-07 预测路线获取方法、装置、计算机设备及存储介质
CN201910013101.5 2019-01-07

Publications (1)

Publication Number Publication Date
WO2020143170A1 true WO2020143170A1 (zh) 2020-07-16

Family

ID=66119049

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092234 Ceased WO2020143170A1 (zh) 2019-01-07 2019-06-21 预测路线获取方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN109657879B (zh)
WO (1) WO2020143170A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112076478A (zh) * 2020-09-25 2020-12-15 网易(杭州)网络有限公司 游戏路径的生成方法及装置
CN112597351A (zh) * 2020-12-28 2021-04-02 凌云光技术股份有限公司 一种工业图像处理软件的流程图错误自检方法及装置
CN117312466A (zh) * 2022-06-21 2023-12-29 重庆兰德适普信息科技有限公司 一种目标跟踪路径生成方法、装置以及电子设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109657879B (zh) * 2019-01-07 2023-06-09 平安科技(深圳)有限公司 预测路线获取方法、装置、计算机设备及存储介质
CN110113579B (zh) * 2019-05-30 2021-04-16 浙江大华技术股份有限公司 一种跟踪目标对象的方法及装置
CN110750603B (zh) * 2019-09-06 2022-08-12 日立楼宇技术(广州)有限公司 楼宇服务预测方法、装置、系统、计算机设备和存储介质
CN111176860A (zh) * 2019-12-12 2020-05-19 北京明略软件系统有限公司 一种实现轨迹分析的方法、系统、计算机存储介质及终端
CN112949912B (zh) * 2021-02-08 2022-07-12 浙江非线数联科技股份有限公司 一种基于图数据库的车辆路线预测方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103680143A (zh) * 2013-12-30 2014-03-26 北京世纪高通科技有限公司 一种交通信息处理方法和装置
US20160357844A1 (en) * 2015-06-03 2016-12-08 Kabushiki Kaisha Toshiba Database apparatus, search apparatus, method of constructing partial graph, and search method
CN107766377A (zh) * 2016-08-19 2018-03-06 华为技术有限公司 一种监控数据查询方法及装置
CN108536704A (zh) * 2017-03-02 2018-09-14 华为技术有限公司 一种轨迹查询方法、系统及装置
CN109657879A (zh) * 2019-01-07 2019-04-19 平安科技(深圳)有限公司 预测路线获取方法、装置、计算机设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008241314A (ja) * 2007-03-26 2008-10-09 Victor Co Of Japan Ltd 経路誘導装置及び経路誘導方法
EP1995562B1 (en) * 2007-05-22 2013-07-10 Alpine Electronics, Inc. Method of route searching in a navigation device and corresponding navigation device
US9200910B2 (en) * 2013-12-11 2015-12-01 Here Global B.V. Ranking of path segments based on incident probability
CN105222768A (zh) * 2014-06-30 2016-01-06 奇点新源国际技术开发(北京)有限公司 一种定位轨迹预测方法及装置
CN107976705A (zh) * 2017-08-10 2018-05-01 深圳市悦动天下科技有限公司 一种基于云端的轨迹计算方法、系统
CN107643085B (zh) * 2017-09-18 2021-02-12 苏州大学 一种路径推荐方法与装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103680143A (zh) * 2013-12-30 2014-03-26 北京世纪高通科技有限公司 一种交通信息处理方法和装置
US20160357844A1 (en) * 2015-06-03 2016-12-08 Kabushiki Kaisha Toshiba Database apparatus, search apparatus, method of constructing partial graph, and search method
CN107766377A (zh) * 2016-08-19 2018-03-06 华为技术有限公司 一种监控数据查询方法及装置
CN108536704A (zh) * 2017-03-02 2018-09-14 华为技术有限公司 一种轨迹查询方法、系统及装置
CN109657879A (zh) * 2019-01-07 2019-04-19 平安科技(深圳)有限公司 预测路线获取方法、装置、计算机设备及存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112076478A (zh) * 2020-09-25 2020-12-15 网易(杭州)网络有限公司 游戏路径的生成方法及装置
CN112597351A (zh) * 2020-12-28 2021-04-02 凌云光技术股份有限公司 一种工业图像处理软件的流程图错误自检方法及装置
CN112597351B (zh) * 2020-12-28 2023-11-10 凌云光技术股份有限公司 一种工业图像处理软件的流程图错误自检方法及装置
CN117312466A (zh) * 2022-06-21 2023-12-29 重庆兰德适普信息科技有限公司 一种目标跟踪路径生成方法、装置以及电子设备
CN117312466B (zh) * 2022-06-21 2025-10-03 北京智行者科技股份有限公司 一种目标跟踪路径生成方法、装置以及电子设备

Also Published As

Publication number Publication date
CN109657879B (zh) 2023-06-09
CN109657879A (zh) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2020143170A1 (zh) 预测路线获取方法、装置、计算机设备及存储介质
CN110417901B (zh) 数据处理方法、装置及网关服务器
JP4527642B2 (ja) ネットワーク障害診断装置、ネットワーク障害診断方法およびネットワーク障害診断プログラム
CN106887137B (zh) 拥堵事件提示方法及装置
CN108063685B (zh) 日志分析方法及装置
WO2020143181A1 (zh) 数据存储方法、装置、计算机设备及存储介质
AU2018215877B2 (en) A method of predicting a traffic behaviour in a road system
CN109120916A (zh) 摄像机故障检测方法、装置及计算机设备
US20200293543A1 (en) Method and apparatus for transmitting data
CN110806960B (zh) 信息处理方法、装置及终端设备
CN113129387A (zh) 一种相机位置检测方法、装置、设备及存储介质
CN118138483B (zh) 数据流处理方法、装置、计算机设备及可读存储介质
CN120687209A (zh) 任务调度方法、系统及设备
CN106097763B (zh) 一种车位检测方法及装置
CN110971488A (zh) 一种数据处理方法、装置、服务器和存储介质
US12363257B2 (en) Postprocessing prioritization
WO2020143160A1 (zh) 驾驶线路规划方法、装置、计算机设备及存储介质
US7814165B2 (en) Message classification system and method
CN115022881A (zh) 一种数据处理方法、装置、设备以及存储介质
CN119211055B (zh) 数据流计数方法、装置、计算机设备及可读存储介质
CN109858682B (zh) 消失路线预测方法、装置、计算机设备及存储介质
CN110955710B (zh) 一种数据交换作业中脏数据的处理方法及装置
CN113505788B (zh) 获取路网信息的方法、装置及存储介质
CN114519117B (zh) 确定事件真实性的方法、装置、电子设备及存储介质
CN110825023A (zh) Plc远程模块间的数据交互方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19909557

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19909557

Country of ref document: EP

Kind code of ref document: A1