Disclosure of Invention
The invention aims to provide a data processing system based on LBS, which can improve the accuracy of predicting the target number based on the position data.
According to a first aspect of the present invention, a data processing system based on LBS is provided, which includes a first database, a second database, a processor and a processor, wherein the first database is pre-constructed, the processor stores calculation and programs, the first database stores road network information, the road network information includes all position point information in a preset area and all possible first route information existing between any two position points, and the first route information is a position point sequence composed of a plurality of position point information according to the arrival sequence; the second database is used for storing track information reported by each sample device and reporting time information corresponding to each position point in the track information in real time, the track information is a position point sequence formed by a plurality of position point information according to the sequence of the reporting time of the sample devices, and the processor executes the computer program to realize the following steps:
step S1, obtaining a sample device (id) in a preset first time period1,id2...idN) Reported trajectory information (L)1,L2...LN),idnDenotes the nth sample apparatus, LnRepresents idnJudging L when the value of N is 1 to N according to the track information reported in the first time periodnWhether a preset target position point is contained or not, if so, the id is determinednCorresponding target data CnIt is determined to be 1, otherwise, step S2 is performed;
step S2, obtaining idnAcquiring id from the first database according to the corresponding initial position point information in the first time periodnAll the first route information between the corresponding initial position point and the target position point, and constructing idnCorresponding first route set and select id therefromnCorresponding predicted route information;
step S3, based on idnCorresponding predicted route information and id in the second databasenDetermining id according to the track information reported in the preset second time periodnThe probability of occurrence of a target location point within the first time period is taken as corresponding target data CnThe second time period is longer than the first time period;
step S4, acquiring all CnAs target predicted value C:
compared with the prior art, the invention has obvious advantages and beneficial effects. By the technical scheme, the LBS-based data processing system provided by the invention can achieve considerable technical progress and practicability, has wide industrial utilization value and at least has the following advantages:
the system can predict the target predicted value based on the position data in the preset time period and the historical position data, and improves the accuracy of predicting the target quantity based on the position data.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented in accordance with the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following preferred embodiments are described in detail with reference to the accompanying drawings.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined object, the following detailed description will be given to a specific implementation and effects of an LBS-based data processing system according to the present invention with reference to the accompanying drawings and preferred embodiments.
The embodiment of the invention provides a data processing system based on LBS (location based service), which comprises a first database, a second database, a processor and a processor, wherein the first database, the second database, the processor and the processor are constructed in advance, the processor stores calculation and programs, the first database stores road network information, the road network information comprises all position point information in a preset area and all possible first route information between any two position points, and the first route information is a position point sequence formed by a plurality of position point information according to the arrival sequence; the second database is used for storing track information reported by each sample device and reporting time information corresponding to each position point in the track information in real time, the track information is a position point sequence formed by a plurality of position point information according to the sequence of the reporting time of the sample devices, and it can be understood that the road network information is relatively stable, the content of the second database is updated in real time according to the information reported by the sample devices, and therefore the historical route information of the sample devices is also correspondingly stored. The processor executing the computer program realizes the following steps:
step S1, obtaining a sample device (id) in a preset first time period1,id2...idN) Reported trajectory information (L)1,L2...LN),idnDenotes the nth sample apparatus, LnRepresents idnJudging L when the value of N is 1 to N according to the track information reported in the first time periodnWhether a preset target position point is contained or not, if so, the id is determinednCorresponding target data CnIt is determined to be 1, otherwise, step S2 is performed;
it is understood that the sample device refers to a device reporting the target location point within a preset first time period. The preset target location point in the first preset time period is set according to specific application requirements, for example, to predict the number of trucks appearing in a certain port in one day, the first time period is 1 day, and the target location point is the port. It should be noted that the location point according to the embodiment of the present invention is not necessarily limited to a specific point, and may be a limited small geographic area, such as the above-mentioned port, or a highway toll station.
Step S2, obtaining idnAcquiring id from the first database according to the corresponding initial position point information in the first time periodnAll the first route information between the corresponding initial position point and the target position point, and constructing idnCorresponding first route set and select id therefromnCorresponding predicted route information;
step S3, based on idnCorresponding predicted route information and id in the second databasenDetermining id according to the track information reported in the preset second time periodnThe probability of occurrence of a target location point within the first time period is taken as corresponding target data CnThe second time period is longer than the first time period;
it will be understood that when L isnWhen the preset target position point is included, the sample equipment id in the first time period is describednMust arrive at the target location point, and hence will idnCorresponding target data Cn. Since the location data cannot be reported normally when some sample devices may have network failure, device failure, power exhaustion, and the like, LnIn the case of a possible missing report of position data, therefore, for LnSample devices that do not contain a predetermined target location point may employ idnAnd predicting the probability that the sample equipment reaches the target position point in the first time period by using historical second route data reported in a preset second time period. The selection of the second time period is set according to specific calculation amount requirements and calculation accuracy, and preferably, the second time period is greater than 10 times of the first time period, for example, the first time periodSet to 1 and the second time period to 30 days.
Step S4, acquiring all CnThe sum of (a) and (b) is taken as a target predicted value C:
the system provided by the embodiment of the invention can predict the target predicted value based on the position data in the preset time period and the historical position data, and improves the accuracy of predicting the target quantity based on the position data.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently, or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but could have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
As an embodiment, the system further includes a sample device set, and in order to ensure the stability of the position data adoption and improve the accuracy of target data prediction, a device which can be stably and regularly present at a target position point within a period of time may be selected to construct the sample set, (id)1,id2...idN) Obtaining from the set of sample devices, execution of the computer program by the processor further performs the steps of:
step S10, obtaining the device ID with the preset label from the second databaseiTrack information (L) in a predetermined number W of consecutive third periodsi1,Li2...LiW),LijIndicating device IDiTrajectory information in a jth third time period;
step S20 based on LijObtaining device IDiThe number of times of occurrence of the target position in each third time period, if the device IDiAt every third timeThe number of times that the target position appears in the segment is greater than a preset number threshold, based on the equipment IDiAcquiring device ID of the number of times the target position appears in each third periodiThe average difference value of the times of occurrence of the target position in continuous W third time periods is obtained, and if the average difference value is smaller than a preset average difference threshold value, the ID is usediStoring into the set of sample devices.
To further improve the accuracy of the target data prediction, L may be further modifiednAs an embodiment, the first database further includes a corrected route information table for storing a corrected route information record, the second information record includes a pair field of the first location point and the third location point information and a field of the third location point information, when the first location point information appears first in a piece of track information and then the third location point information appears, the second location point information inevitably appears in the piece of track, in the step S1, when it is determined that L is presentnDoes not contain the preset target position point, and further comprises the following steps:
step S11, retrieving the corrected route information table, obtaining all the first position point and third position point information pairs corresponding to the third position point information which is the target position point, and constructing a target position information pair set;
step S12, determining LnWhether an information pair composed of any two continuous position points exists in the target position information pair set or not, if so, the information pair exists in the LnIn the method, target position information is added, and id is addednCorresponding target data CnIf it is determined as 1, if not, step S2 is executed.
In said step S2, idnThe selection of the corresponding predicted route information also has a great influence on the correctness of the target data prediction result, and the number of the first route information based on the two position points may be great, so that the id is required to be selectednReasonably selecting id for all first route information between corresponding starting position point and target position pointnCorresponding predicted route information, improving data processing efficiency and target data prediction accuracy, as an embodiment, the system further comprises a navigation device, in the step S2, the method includesidnSelecting preset M pieces as id from corresponding first route setnCorresponding predicted route information, including:
step S21, judging idnWhether the information quantity of the first routes in the corresponding first route set is less than or equal to a preset threshold value M of the quantity of the first routes, if so, the id is usednDetermining all the first route information in the corresponding first route set as corresponding predicted route information, otherwise, executing step S22;
step S22, idnInputting corresponding initial position points and target position points into the navigation equipment, generating a plurality of pieces of route information which are ordered from large to small according to the reasonability of the route, and selecting the front M pieces as idnCorresponding predicted route information.
It is understood that the value of M is thus comprehensively set according to the requirement of the calculation amount and the accuracy of the prediction result, etc., and may be set to 3 as an example.
As an example, the step S3 may include:
step S31, acquiring previous position point information of a target position point in the mth piece of predicted route information as an mth predicted position point, wherein the value of M is from 1 to M;
step S32, based on id in the second databasenDetermining id according to the track information reported in the preset second time periodnProbability C of reaching the target site from the m-th predicted location point within the first time periodnm;
Step S33, determining idnProbability C of occurrence of target location point within the first time periodn:
The probability of the sample equipment reporting the target position point is predicted through the plurality of pieces of predicted route information, and the sum of all the probabilities is used as the probability of the sample equipment appearing at the target position point in the first time period, so that the accuracy of target data prediction is improved.
However, it is understood that, in some sample devices, the position data of the sample devices in the preset second time period is less, in such a case, the accuracy of the predicted occurrence probability threshold is low, in such a case, a default probability value needs to be set to improve the accuracy of data prediction, and the default probability value of reaching the target site from the m-th predicted position point is a default probability value calculated based on a plurality of pieces of historical data of a plurality of sample devices, so that the reliability and accuracy are high. Specifically, as an embodiment, step S32 may include:
step S321, judging id in the second databasenThe track information reported in the preset second time period has an idnWhether the number of the corresponding predicted route information is larger than a preset second route number threshold value or not, and if so, the number is based on idnThe track information reported in the preset second time period has idnComputing idnProbability C of reaching the target site from the m-th predicted location point within the first time periodnmOtherwise, go to step S322;
step S322, using the default probability value of the preset m-th predicted position point to reach the target position point as idnProbability C of reaching the target site from the m-th predicted location point within the first time periodnm。
It should be noted that, in the embodiments of the present invention, data sampling stability is ensured by screening sample devices capable of realizing stable data sampling, and then L is filled based on correctionnAnd screening prediction routes and other modes to improve the accuracy of the target prediction value as much as possible. However, it can be understood that in an actual situation, when the mobile device has a network failure, a device failure, power exhaustion, or the like, the location data cannot be reported normally, and the location data is not reported, so that the target predicted value obtained by the above embodiment of the present invention can only ensure the stability of the obtained predicted value, but has a difference from the real data. It is often difficult to predict the target location pointThe position points of the target data can be directly acquired by some auxiliary equipment, but the position points which can acquire real data by some auxiliary equipment exist in the related route, so that the related proportionality coefficient can be acquired based on the position data of the position points, and the target position points can also acquire the target data close to the real data. Specifically, as an embodiment, the processor executing the computer program may further implement the following steps:
and step S5, acquiring a target proportion parameter E, and determining a target actual value based on the target predicted value C and the target proportion parameter E.
Specifically, in step S5, the obtaining the target ratio parameter E may include:
step S51, receiving a monitoring actual value A of a preset reference position point based on a preset first time period reported by a preset auxiliary monitoring device;
step S52, taking the reference position point as the target position point, executing the steps S1-S4, and acquiring a target predicted value B corresponding to the reference position point;
step S53, obtaining a target proportion parameter E based on the monitoring actual value and the target predicted value corresponding to the reference position point:
E=B/A。
the system provided by the embodiment of the invention can predict the target predicted value based on the position data in the preset time period and the historical position data, and can improve the stability of data sampling by correcting the position data, selecting a predicted route and other processes, thereby improving the accuracy of predicting the target quantity based on the position data. In addition, the reference position point can be selected to obtain the target proportion coefficient, so that the target data close to the true value of the target position point is obtained based on the target proportion coefficient and the target predicted value. Trends in data changes can be obtained based on target data of multiple periods, and therefore the method is applied to various data analysis scenes.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.