CN108924766A - Position data method for uploading, Method for Calculate Mileage and device - Google Patents

Position data method for uploading, Method for Calculate Mileage and device Download PDF

Info

Publication number
CN108924766A
CN108924766A CN201810891408.0A CN201810891408A CN108924766A CN 108924766 A CN108924766 A CN 108924766A CN 201810891408 A CN201810891408 A CN 201810891408A CN 108924766 A CN108924766 A CN 108924766A
Authority
CN
China
Prior art keywords
data
location
service
location data
position data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810891408.0A
Other languages
Chinese (zh)
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.)
Tianjin 58 Home Technology Co Ltd
Original Assignee
Tianjin 58 Home Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin 58 Home Technology Co Ltd filed Critical Tianjin 58 Home Technology Co Ltd
Priority to CN201810891408.0A priority Critical patent/CN108924766A/en
Publication of CN108924766A publication Critical patent/CN108924766A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/44Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for communication between vehicles and infrastructures, e.g. vehicle-to-cloud [V2C] or vehicle-to-home [V2H]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • H04W64/003Locating users or terminals or network equipment for network management purposes, e.g. mobility management locating network equipment

Abstract

The embodiment of the present application provides a kind of position data method for uploading, a kind of Method for Calculate Mileage and device, including:Judge whether driver end is in order placement service state;If so, opening positioning service.A position positioning is carried out at interval of the first preset time by positioning service and obtains the first location data, and uploads the first location data to server-side, so that server-side determines driver position based on the first location data.If not, closing positioning service and opening mileage calculation service.A position positioning is carried out at interval of the second preset time by mileage calculation service, obtains the second location data.Multiple second location datas continuously obtained are subjected to compression and are packaged acquisition position data packet.Uploading position data packet calculates service mileage based on multiple second location datas so that server-side is decompressed from position data packet obtains multiple second location datas to server-side.The application avoids driver end and carries out GPS positioning data to repeat upload, causes the loss of flow and resource.

Description

Position data method for uploading, Method for Calculate Mileage and device
Technical field
The invention belongs to computer network fields, specifically, being related to a kind of position data method for uploading and device.
Background technique
Internet technology support under, on net about vehicle and line the network operations vehicle such as freight obtained rapidly developing and Using.It includes user terminal, server-side, Si Jiduan that existing network, which runs vehicle service framework,.User generates order by user terminal It is sent to server-side, server-side determines user position and passes through department by driver with order is distributed to driver end after vehicle demand Generator terminal carries out competition for orders or carries out worksheet processing according to driver position by server-side.
In the prior art, in order to obtain the real time position data at driver end in order to according to the position at driver end issue Order opens positioning service and by positioning service at interval of 5 minutes after the starting operation of driver end to corresponding driver end A position is carried out to position and upload GPS positioning data to server-side.And driver terminates Dan Houhui and opens mileage calculation service, it is inner Journey calculates service and can position at interval of the position of progress in 1 second and upload GPS positioning data to server-side, by server-side according to The service mileage that the GPS positioning data that mileage calculation service persistently uploads calculate driver is valuated.It follows that positioning service And mileage calculation service will do it GPS positioning and upload GPS data, this results in driver end and carries out GPS positioning data It repeats to upload, causes the waste of floating resources, increase the operation cost of driver.
Summary of the invention
In view of this, being avoided the present invention provides a kind of position data method for uploading, a kind of Method for Calculate Mileage and device Driver end carries out GPS positioning data to repeat upload, causes the loss of flow and resource.
In order to solve the above-mentioned technical problems, the present invention provides a kind of position data method for uploading, including:
Judge whether driver end is in order placement service state;
If driver end is not in order placement service state, positioning service is opened;
A position positioning, which is carried out, at interval of the first preset time by the positioning service obtains the first location data, and First location data is uploaded to server-side, so that the server-side determines driver position based on first location data;
If the driver end is in order placement service state, closes the positioning service and open mileage calculation service;
A position positioning is carried out at interval of the second preset time by the mileage calculation service, obtains the second positioning number According to;
Multiple second location datas continuously obtained are subjected to compression and are packaged acquisition position data packet;
The position data packet is uploaded to the server-side, so that the server-side is decompressed from the position data packet The multiple second location data is obtained, the mileage travelled at the driver end is calculated based on the multiple second location data.
Preferably, multiple second location datas that will continuously obtain carry out compression and are packaged acquisition position data packet, packet It includes:
By the second location data of each of the second multiple location data continuously acquired according to preset data form Data encoding is carried out respectively, and the multiple the second location data according to preset format coding is successively subjected to compression and is beaten Packet, obtains the position data packet.
Preferably, described to upload the position data packet to the server-side, so that the server-side is from the positional number The multiple second location data is obtained according to decompression in packet, the driver end is calculated based on the multiple second location data Mileage travelled, including:
The position data packet is uploaded to the server-side at interval of the third time, so that the server-side is from the position Decompression obtains multiple second location datas obtained in the third interval time in data packet, fixed based on the multiple second Position data calculate the mileage travelled at the driver end.
Preferably, the second location data of each of described second multiple location data that will be continuously acquired is according to pre- If data format carries out data encoding respectively, by it is the multiple according to the preset format coding the second location data successively into Row compression is packaged, and obtains the position data packet, including:
Determine the latitude value and warp of the second location data of each of multiple second location datas continuously obtained Angle value;
The dimension values of each second location data and longitude are subjected to data encoding according to preset data form;
Compression packing is carried out by the second location data of data encoding by the multiple, obtains the position data packet.
Preferably, the second location data of each of described second multiple location data that will be continuously acquired is according to pre- If data format carries out data encoding respectively, by it is the multiple according to the preset format coding the second location data successively into Row compression is packaged, and obtains the position data packet, including:
Determine the second location data of each of second location data continuously obtained relative to its previous The latitudinal offset amount and longitude offset of two location datas;
The dimension offset of each second location data and longitude offset are carried out according to preset data form Data encoding;
The multiple the second location data according to preset format coding is successively subjected to compression packing, described in acquisition Position data packet.
Preferably, if the driver end is not in order placement service state, opening positioning service includes:
If driver end is not in order placement service state, judge whether the driver end is in working state;
If so, opening the positioning service;
If not, closing the positioning service.
This application provides a kind of Method for Calculate Mileage, including:
Receive the position data packet that the driver end is sent;Wherein, the position data packet is multiple by what is continuously obtained Second location data carries out compression and is packaged acquisition;When second location data is that the driver end is in order placement service state, It closes the positioning service and opens mileage calculation service;It is carried out by the mileage calculation service at interval of the second preset time What position positioning obtained;
Based on the position data packet, decompression obtains the multiple second location data;
Judge whether multiple location datas in the position data packet are on same straight line;
If so, based on first the second location data and the last one second location data in the position data packet Calculate the mileage travelled;
If not, determining the corner position data in the multiple second location data;Wherein, the corner position data The second location data when to transfer in driver's driving process;
Based on first second location data, the corner position data and the last one described second location data Calculate the mileage travelled.
Present invention also provides a kind of position datas to upload device, including:
First judgment module, for judging whether driver end is in order placement service state;If not, triggering first service mould Block;If so, triggering second service module;
The first service module, for opening positioning service;
First location data obtains module, for carrying out primary position at interval of the first preset time by the positioning service It sets positioning and obtains the first location data, and upload first location data to server-side, so that the server-side is based on described First location data determines driver position;
The second service module, for closing the positioning service and opening mileage calculation service;
Second location data obtains module, for carrying out one at interval of the second preset time by the mileage calculation service Secondary position positioning, obtains the second location data;
Position data packet obtains module, is packaged acquisition position for multiple second location datas continuously obtained to be carried out compression Set data packet;
Uploading module, for uploading the position data packet to the server-side, so that the server-side is from the position Decompression obtains the multiple second location data in data packet, calculates the driver end based on the multiple second location data Mileage travelled.
Preferably, the position data packet acquisition module includes:
Coding unit:By the second location data of each of the second multiple location data continuously acquired according to default Data format carries out data encoding respectively;
Packaged unit:The multiple the second location data according to preset format coding is successively carried out compression to beat Packet, obtains the position data packet.
Preferably, the uploading module is specifically used for:
The position data packet is uploaded to the server-side at interval of the third time, so that the server-side is from the position Decompression obtains multiple second location datas obtained in the third interval time in data packet, fixed based on the multiple second Position data calculate the mileage travelled at the driver end.
Preferably, the coding unit is specifically used for:
Determine the latitude value and warp of the second location data of each of multiple second location datas continuously obtained Angle value;
The dimension values of each second location data and longitude are subjected to data encoding according to preset data form.
Preferably, the coding unit is specifically used for:
Determine the second location data of each of second location data continuously obtained relative to its previous The latitudinal offset amount and longitude offset of two location datas;
The dimension offset of each second location data and longitude offset are carried out according to preset data form Data encoding.
Preferably, the first service module is specifically used for:
Judge whether the driver end is in working state;
If so, opening the positioning service;
If not, closing the positioning service.
Present invention also provides a kind of mileage calculation devices, including:
Position data packet receiving module, the position data packet sent for receiving the driver end;Wherein, the positional number Acquisition is packaged according to packet for multiple second location datas continuously obtained are carried out compression;Second location data is the driver When end is in order placement service state, closes the positioning service and open mileage calculation service;It is serviced by the mileage calculation Carry out what a position positioning obtained at interval of the second preset time;
Decompression module, for being based on the position data packet, decompression obtains the multiple second location data;
Second judgment module is used for, and judges whether multiple location datas in the position data packet are in same straight line On;If so, the first computing module of triggering;If not, triggering corner position data determining module;
First computing module, for based in the position data packet first the second location data and last A second location data calculates the mileage travelled;
The corner position data determining module, for determining the corner position number in the multiple second location data According to;Wherein, the corner position data are the second location data when transferring in driver's driving process;
Second computing module, for based on first second location data, the corner position data and it is described most The second location data of the latter calculates the mileage travelled.
Compared with prior art, the present invention can be obtained including following technical effect:
The present invention provides a kind of position data method for uploading, a kind of Method for Calculate Mileage and devices.The present invention is by sentencing The order placement service state at the driver end of breaking determines and opens arq mode in different location data.When driver end is not in order clothes When business state, the first location data satisfaction only can be obtained to the location requirement of driver by positioning service;When driver end is in When order placement service state, due to can equally upload the second location data in mileage calculation service, positioning service can be closed, It avoids same position data repeatedly to upload, while by the way that multiple second location datas are carried out compression packing, obtaining positional number The data volume of upload can be greatly reduced according to packet to further decrease the loss of data traffic.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes a part of the invention, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of one embodiment of position data method for uploading of the embodiment of the present invention;
Fig. 2 is a kind of flow chart of another embodiment of position data method for uploading of the embodiment of the present invention;
Fig. 3 is that a kind of process of one embodiment of Method for Calculate Mileage of the embodiment of the present invention mentions figure;
Fig. 4 is the structural schematic diagram that a kind of position data of the embodiment of the present invention uploads one embodiment of device;
Fig. 5 is the structural schematic diagram that a kind of position data of the embodiment of the present invention uploads another embodiment of device;
Fig. 6 is a kind of structural schematic diagram of one embodiment of mileage calculation device of the embodiment of the present invention.
Specific embodiment
Carry out the embodiment that the present invention will be described in detail below in conjunction with accompanying drawings and embodiments, thereby how the present invention is applied Technological means solves technical problem and reaches the realization process of technical effect to fully understand and implement.
As used some vocabulary to censure specific components in the specification and claims.Those skilled in the art answer It is understood that hardware manufacturer may call the same component with different nouns.This specification and claims are not with name The difference of title is as the mode for distinguishing component, but with the difference of component functionally as the criterion of differentiation.Such as logical The "comprising" of piece specification and claim mentioned in is an open language, therefore should be construed to " include but do not limit In "." substantially " refer within the acceptable error range, those skilled in the art can solve technology within a certain error range Problem basically reaches technical effect.In addition, " coupling " word includes any direct and indirect electric property coupling means herein.Cause This, if it is described herein that a first device is coupled to a second device, then representing first device can be directly electrically coupled to the second dress It sets, or second device indirectly electrically coupled through other devices or coupling means.Specification subsequent descriptions are to implement this hair Bright better embodiment, so description is the model that is not intended to limit the invention for the purpose of illustrating rule of the invention It encloses.Protection scope of the present invention is as defined by the appended claims.
GPS positioning data are carried out to repeat upload in order to solve driver end, the technology of the loss of flow and resource is caused to ask Topic, inventor pass through a series of technical solutions for having researched and proposed the embodiment of the present application.The present invention provides a kind of position datas Method for uploading, a kind of Method for Calculate Mileage and device.The present invention, which passes through, judges that the order placement service state determination at the driver end is opened Open arq mode in different location datas.When driver end is not in order placement service state, can only be obtained by positioning service First location data meets the location requirement to driver;When driver end is in order placement service state, due to mileage calculation service In can equally upload the second location data, therefore positioning service can be closed, avoid same position data and repeatedly upload, simultaneously By the way that multiple second location datas are carried out compression packing, obtain position data packet can greatly reduce the data volume of upload to Further decrease the loss of data traffic.
Technical scheme is described in detail below in conjunction with attached drawing.
Fig. 1 is a kind of flow chart of one embodiment of position data method for uploading of the embodiment of the present invention.This method is answered For driver end, this method may include:
101:Judge whether driver end is in order placement service state, if so, executing step 102;If not, executing step 104。
It includes user terminal, server-side, Si Jiduan that existing network, which runs vehicle service framework,.User is ordered by user terminal generation It is singly sent to server-side, server-side determines user position and order is pushed to driver end with after vehicle demand, and driver passes through Driver end carries out competition for orders or carries out worksheet processing according to driver position by server-side.Therefore, server-side is carrying out worksheet processing or order Need to obtain the real time position of driver when push.
In the prior art, due to after the starting operation of driver end, that is, opening positioning service and by positioning service at interval of 5 Minute carries out a position and positions and upload GPS positioning data to server-side.And driver terminates Dan Houhui and opens mileage calculation clothes Business, mileage calculation service can position at interval of the position of progress in 1 second and upload GPS positioning data to server-side, by servicing The mileage travelled for holding the GPS positioning data persistently uploaded according to mileage calculation service to calculate driver is valuated.This results in taking charge of Generator terminal carries out GPS positioning data to repeat upload, since driver end uploads location data to server-side, needs to expend driver end Data traffic, therefore the waste of unnecessary floating resources is caused, increase the operation cost of driver.
102:Open positioning service.
103:A position positioning, which is carried out, at interval of the first preset time by the positioning service obtains the first positioning number According to, and first location data is uploaded to server-side, so that the server-side determines driver based on first location data Position.
In practice, it in order to avoid the upload of GPS positioning Data duplication, can first determine whether to take charge of after driver end starts operation Whether generator terminal is in order placement service state.If driver end is not in order placement service state, positioning service is only opened, this first Preset time can be determined according to active service end location data refreshing frequency, such as still carry out a position positioning for 5 minutes, It obtains the first location data and the first location data is uploaded into server-side.Refresh determining for a driver end within server-side every 5 minutes Position data, and the order in service range is located to driver end according to current position determination data push.Driver end is pushed according to order Situation selects order or competition for orders, and order placement service state is in after order.
104:It closes the positioning service and opens mileage calculation service.
105:A position positioning is carried out at interval of the second preset time by the mileage calculation service, it is fixed to obtain second Position data.
106:Multiple second location datas continuously obtained are subjected to compression and are packaged acquisition position data packet.
107:The position data packet is uploaded to the server-side, so that the server-side is solved from the position data packet It compresses and obtains the multiple second location data, in the traveling that the driver end is calculated based on the multiple second location data Journey.
Driver terminates single after order placement service state, it is necessary to next order can be just connect after the completion of current order It is serviced, therefore can trigger and close positioning service while opening mileage calculation service.But order placement service is in driver There is still a need for even if the calculating that position positioning carries out mileage travelled is carried out to driver end when state, for example, the service where driver end It is had on vehicle and makes table device, the mileage travelled skip list that making table device can calculate according to server-side is valuated.
Mileage calculation service is to obtain the second location data by carrying out position positioning to driver end in real time, and according to second Location data calculates the mileage travelled at driver end and can recorde travel route.In practice, service vehicle actual travel speed can To calculate according to 60 kilometers/hour, the table device of beating of service vehicle is valuated by every traveling table of 0.1 kilometer of jump, therefore, just In mileage calculation and save the data traffic of upload.Driver end can carry out a position positioning, but not another second for still every 1 second Second location data is uploaded to server-side, but 10 the second location datas continuously obtained in every 10 seconds can be carried out Compression is uploaded to server-side after being packaged as position data packet.The data volume of the position data packet obtained after overcompression is packaged is significantly Reduce, therefore reduces the loss of the driver end flow in mileage calculation service process.Server-side is according to the position data of acquisition Packet obtains continuous 10 the second location datas after can decompressing, and calculates servicer according to continuous 10 location datas Ten seconds in mileage travelled.
Certainly, the embodiment of the present invention is not limited in mileage calculation service, carries out a position positioning at interval of 1 second Second location data is obtained, 10 the second location datas continuously obtained in 10 seconds are then subjected to compression and are packaged acquisition one A position data packet, in practice, can according to different positioning accuracy, mileage calculation precision and beat the precision of table device or meter into Row setting, is not specifically limited herein.
Optionally, in certain embodiments, if the driver end is not in order placement service state, positioning service packet is opened It includes:
If driver end is not in order placement service state, judge whether the driver end is in working state;
If so, opening the positioning service;
If not, closing the positioning service.
In practical application, in order to further avoid causing the waste of driver's end data flow, order is not at driver end When service state, it can also judge whether driver is in working state.Since driver is in idle situation, driver end may It is still in open state, at this moment positioning service carries out position positioning, continue to upload the first location data to server-side, but this When driver will not order again.Therefore, it can judge whether current time is in work by setting working time section at driver end In period, if it is think that driver end is in working state, continue starting positioning service, in order to which server-side is to driver end Push order;If being not in working time section, it is believed that driver end is not in working state, then closes positioning service progress, keep away Exempt to cause the flow loss at driver end.
In the embodiment of the present application, crosses and judge that the order placement service state at the driver end determines in the different location data of unlatching Arq mode.When driver end is not in order placement service state, the first location data satisfaction pair only can be obtained by positioning service The location requirement of driver;It is fixed due to can equally upload second in mileage calculation service when driver end is in order placement service state Position data, therefore positioning service can be closed, it avoids same position data and repeatedly uploads, while by being positioned multiple second Data carry out compression packing, and the data volume of upload can be greatly reduced to further decrease data traffic by obtaining position data packet Loss.
Fig. 2 is a kind of flow chart of another embodiment of position data method for uploading of the embodiment of the present invention.This method Applied to driver end, this method may include:
201:Judge whether driver end is in order placement service state, if so, executing step 202;If not, executing step 204。
202:Open positioning service.
203:A position positioning, which is carried out, at interval of the first preset time by the positioning service obtains the first positioning number According to, and first location data is uploaded to server-side, so that the server-side determines driver based on first location data Position.
204:It closes the positioning service and opens mileage calculation service.
205:A position positioning is carried out at interval of the second preset time by the mileage calculation service, it is fixed to obtain second Position data.
206:By the second location data of each of the second multiple location data continuously acquired according to preset data Format carries out data encoding respectively.
207:The multiple the second location data according to preset format coding is successively subjected to compression packing, is obtained The position data packet.
208:The position data packet is uploaded to the server-side at interval of the third time, so that the server-side is from described Decompression obtains multiple second location datas obtained in third interval time in position data packet, based on the multiple the Two location datas calculate the mileage travelled at the driver end.
In practice, in order to be effectively reduced the damage that the data volume of position data packet further decreases driver's end data flow Consumption can carry out data encoding and assembly to the second location data according to preset data format, and being packaged by compression can be big The big data volume for reducing position data packet.
In practice, which is for being packaged as second location data of a position data packet according to compression is carried out Number determination.For example, carrying out the positioning of position at interval of 1 second obtains second location data, if the per continuous 10 Two position location datas carry out compression and are packaged as a position data packet, then the third time is 10 seconds, i.e., obtain one within every ten seconds A position data packet is simultaneously uploaded to server-side.
The coded format of the second location data is given in the embodiment of the present invention, as follows.
Optionally, in certain embodiments, each of described second multiple location data that will be continuously acquired Two location datas carry out data encoding according to preset data form respectively, by the multiple according to the of preset format coding Two location datas successively carry out compression packing, obtain the position data packet, including:
Determine the latitude value and warp of the second location data of each of multiple second location datas continuously obtained Angle value;
The dimension values of each second location data and longitude are subjected to data encoding according to preset data form.
It can be fixed including the order number of current service, driver ID, and by position in each practical position data packet The latitude value and longitude of corresponding second location data of position each anchor point of acquisition and the number of satellite of current location, Travel speed, driving direction and positioning time etc..Therefore, the coded format of the second location data can be according to:<Order number> long+<Driver ID>long+<GPS group sequence number>int+<The dimension values of first point>double+<The longitude of first point >double+<The positioning accuracy of first point>float+<The number of satellite of first point>short+<The traveling side of first point To value>float+<The time of first point>long+<The dimension values of second point>double+<The longitude of second point> double+<The positioning accuracy of second point>float+<The number of satellite of second point>short+<The traveling side of second point To value>float+<The time of second point>long+.......<N-th point of dimension values>double+<N-th point of longitude Value>double+<N-th point of positioning accuracy>float+<N-th point of number of satellite>short+<N-th point of traveling side To value>float+<N-th point of time>long.In practice, include in n expression one position data packet of boil down to is continuous The number of second location data.
Above-mentioned every kind of data type is converted to hexadecimal and is encoded, and is assemblied into string in the order described above, In, long accounts for 8, and double accounts for 8, and float accounts for 4, and int accounts for 4, and short accounts for 2.This can occupy data packet Data volume reduce while, ensure that be uploaded in server-side to driver end positioning accuracy.Certainly, according to server-side meter Calculate mileage travelled accuracy difference, the preset data form be not limited to aforesaid way can according to available accuracy demand into Row setting, is not specifically limited herein.
Optionally, in certain embodiments, described to continuously acquire in order to further decrease the data volume of position data packet The second location data of each of the second multiple location data carry out data encoding respectively according to preset data form, will The multiple the second location data according to preset format coding successively carries out compression packing, obtains the position data Packet, including:
Determine the second location data of each of second location data continuously obtained relative to its previous The latitudinal offset amount and longitude offset of two location datas;
The dimension offset of each second location data and longitude offset are carried out according to preset data form Data encoding.
After determining the longitude and latitude value of the second location data of first anchor point, the of second anchor point The longitude and dimension values of two location datas can be indicated with the longitude of first anchor point and the difference of position.
Longitude offset-lists are shown as:Longitude diff=(longitude of the previous anchor point of the longitude-of current anchor point) * 1000000;
Dimension offset-lists are shown as:Dimension diff=(latitude value of the previous anchor point of the latitude value-of current anchor point) * 1000000;
Time offset is expressed as:Time diff=(m- previous anchor point time when current anchor point)/millisecond.
That is the coded format of the second location data can be according to:<Order number>long+<Driver ID>long+<GPS group sequence Number>int+<The dimension diff of first point>short+<The longitude diff of first point>short+<The positioning accurate of first point Degree>float+<The number of satellite of first point>short+<The driving direction value of first point>float+<First point when Between diff>short+<The dimension diff of second point>short+<The longitude diff of second point>short+<Second point Positioning accuracy>float+<The number of satellite of second point>short+<The driving direction value of second point>float+<Second The time diff of point>short+.......<N-th point of dimension diff>short+<N-th point of longitude diff>short+< N-th point of positioning accuracy>float+<N-th point of number of satellite>short+<N-th point of driving direction value>float+< N-th point of time diff>short.
As can be seen that coding and data assembly are carried out to the second location data by longitude offset and dimension offset, So that needing to occupy 8 (long) longitudes and latitude value originally, it is adjusted to only to need to account for 2 (short) longitude offsets With dimension offset, the Data Position of each second location data occupancy is greatly reduced, to further reduced position The data volume of data packet.
Optionally, server-side carries out mileage calculation in practice, can be according to each location data in position data packet What longitude and latitude value calculated.If the corresponding anchor point of second position data acquired in the third time is located at same straight line On, then it is assumed that service vehicle, therefore can also be only by first anchor point acquired in the third time and last in straight-line travelling The corresponding second position data of one anchor point carry out compression and are packaged the mileage travelled that can be calculated in the third time.When Corresponding multiple anchor points not point-blank, then show that service vehicle is not straight-line travelling, driver end can in the third time The corresponding anchor point of inflection point that service vehicle is determined according to the second location data obtained in the third time, by the first anchor point, Inflection point and the last one anchor point carry out compression and are packaged the mileage travelled that can be calculated in the third time.It can further drop in this way The data volume of lower position data packet, while ensure that the computational accuracy of mileage travelled.
The embodiment of the present application, by being encoded according to different pre-arranged code formats to the second location data, and will be by Assembled multiple second location datas of coding are carried out according to pre-arranged code format and carry out compression packing acquisition position data packet, further The data volume for reducing position data packet ensure that the computational accuracy of mileage travelled simultaneously, avoid the repetition and waste of resource.
Fig. 3 is a kind of flow chart of one embodiment of Method for Calculate Mileage of the embodiment of the present invention.This method is applied to Server-side, this method may include;
301:Receive the position data packet that the driver end is sent.
Wherein, the position data packet is that multiple second location datas continuously obtained are carried out to compression to be packaged acquisition;Institute Stating the second location data is the driver end when be in order placement service state, closes the positioning service and opens mileage calculation and takes Business;Carry out what a position positioning obtained at interval of the second preset time by the mileage calculation service.
302:Based on the position data packet, decompression obtains the multiple second location data.
303:Judge whether multiple location datas in the position data packet are on same straight line;If so, executing Step 304;If not, executing step 305.
304:Based on first the second location data and the last one second location data in the position data packet Calculate the mileage travelled.
305:Determine the corner position data in the multiple second location data;Wherein, the corner position data are The second location data when transferring in driver's driving process.
306:Based on first second location data, the corner position data and the last one described second positioning Data calculate the mileage travelled.
In practice, after server-side receives the position data packet that driver end is sent, according to the pre-arranged code format pair of agreement Position data packet, which is decoded, obtains multiple second location datas, and calculates the row in the third time according to the second location data Mileage is sailed to valuate.
The calculating time is saved in order to improve computational efficiency, can judge that multiple second location data is corresponding by two-value method Anchor point whether be located along the same line, if it is, directly according to corresponding second location data of first anchor point and The last one difference for positioning corresponding second location data calculates mileage travelled, does not need each adjacent two positioning pair The second location data answered makes the difference, and calculates continuous range difference.Servicer is then defined as the anchor point on no longer same straight line Inflection point, and determine the corresponding corner position data of inflection point.At this point, server-side according to first between anchor point and inflection point it is right The range difference of corresponding position data between the range difference and inflection point and the last one anchor point of the position data answered calculates traveling Mileage.Inflection point can be multiple in practice, can determine effective inflection point number according to the length of third time, when inflection point is in the presence of more Need to calculate the range difference of the position data between adjacent comers when a, also to calculate acquisition mileage travelled.
In the embodiment of the present application, the computational efficiency of mileage travelled can be greatly improved by the Method for Calculate Mileage, simultaneously It ensure that the computational accuracy of mileage travelled.Server-side is timely feedbacked according to the mileage travelled of calculating to driver end, so as to driver end Make table device or meter is valuated according to mileage travelled in time, further improve efficiency of service and service quality.
Fig. 4 is the structural schematic diagram that a kind of position data of the embodiment of the present invention uploads one embodiment of device.The dress It sets and is applied to driver end, the apparatus may include:
First judgment module 401 triggers first service module for judging whether driver end is in order placement service state 402;If so, triggering second service module 404.
First service module 402 opens positioning service.
First location data obtains module 403, for carrying out one at interval of the first preset time by the positioning service Secondary position positioning obtains the first location data, and uploads first location data to server-side, so that the server-side is based on First location data determines driver position.
Second service module 404, for closing the positioning service and opening mileage calculation service.
Second location data obtain module 405, for by the mileage calculation service at interval of the second preset time into Position positioning of row, obtains the second location data.
Position data packet obtains module 406, obtains for multiple second location datas continuously obtained to be carried out compression packing Obtain position data packet.
Uploading module 407, for uploading the position data packet to the server-side, so that the server-side is from institute's rheme It sets decompression in data packet and obtains the multiple second location data, the driver is calculated based on the multiple second location data The mileage travelled at end.
Driver terminates single after order placement service state, it is necessary to next order can be just connect after the completion of current order It is serviced, therefore can trigger and close positioning service while opening mileage calculation service.But order placement service is in driver There is still a need for even if the calculating that position positioning carries out mileage travelled is carried out to driver end when state, for example, the service where driver end It is had on vehicle and makes table device, the mileage travelled skip list that making table device can calculate according to server-side is valuated.
Mileage calculation service is to obtain the second location data by carrying out position positioning to driver end in real time, and according to second Location data calculates the mileage travelled at driver end and can recorde travel route.In practice, service vehicle actual travel speed can To calculate according to 60 kilometers/hour, the table device of beating of service vehicle is valuated by every traveling table of 0.1 kilometer of jump, therefore, just In mileage calculation and save the data traffic of upload.Driver end can carry out a position positioning, but not another second for still every 1 second Second location data is uploaded to server-side, but 10 the second location datas continuously obtained in every 10 seconds can be carried out Compression is uploaded to server-side after being packaged as position data packet.The data volume of the position data packet obtained after overcompression is packaged is significantly Reduce, therefore reduces the loss of the driver end flow in mileage calculation service process.Server-side is according to the position data of acquisition Packet obtains continuous 10 the second location datas after can decompressing, and calculates servicer according to continuous 10 location datas Ten seconds in mileage travelled.
Certainly, the embodiment of the present invention is not limited in mileage calculation service, carries out a position positioning at interval of 1 second Second location data is obtained, 10 the second location datas continuously obtained in 10 seconds are then subjected to compression and are packaged acquisition one A position data packet, in practice, can according to different positioning accuracy, mileage calculation precision and beat the precision of table device or meter into Row setting, is not specifically limited herein.
Optionally, in certain embodiments, the first service module 402 specifically can be used for:
Judge whether the driver end is in working state;
If so, opening the positioning service;
If not, closing the positioning service.
In practical application, in order to further avoid causing the waste of driver's end data flow, order is not at driver end When service state, it can also judge whether driver is in working state.Since driver is in idle situation, driver end may It is still in open state, at this moment positioning service carries out position positioning, continue to upload the first location data to server-side, but this When driver will not order again.Therefore, it can judge whether current time is in work by setting working time section at driver end In period, if it is think that driver end is in working state, continue starting positioning service, in order to which server-side is to driver end Push order;If being not in working time section, it is believed that driver end is not in working state, then closes positioning service progress, keep away Exempt to cause the flow loss at driver end.
In the embodiment of the present application, crosses and judge that the order placement service state at the driver end determines in the different location data of unlatching Arq mode.When driver end is not in order placement service state, the first location data satisfaction pair only can be obtained by positioning service The location requirement of driver;It is fixed due to can equally upload second in mileage calculation service when driver end is in order placement service state Position data, therefore positioning service can be closed, it avoids same position data and repeatedly uploads, while by being positioned multiple second Data carry out compression packing, and the data volume of upload can be greatly reduced to further decrease data traffic by obtaining position data packet Loss.
Fig. 5 is the structural schematic diagram that a kind of position data of the embodiment of the present invention uploads another embodiment of device.It should Device is applied to driver end, the apparatus may include:
First judgment module 501 triggers first service module for judging whether driver end is in order placement service state 502;If so, triggering second service module 504.
First service module 502 opens positioning service.
First location data obtains module 503, for carrying out one at interval of the first preset time by the positioning service Secondary position positioning obtains the first location data, and uploads first location data to server-side, so that the server-side is based on First location data determines driver position.
Second service module 504, for closing the positioning service and opening mileage calculation service.
Second location data obtain module 505, for by the mileage calculation service at interval of the second preset time into Position positioning of row, obtains the second location data.
Position data packet obtains module 506, obtains for multiple second location datas continuously obtained to be carried out compression packing Obtain position data packet.
Optionally, position data packet acquisition module 506 may include:
Coding unit 511:For by the second location data of each of the second multiple location data continuously acquired Data encoding is carried out respectively according to preset data form;
Packaged unit 512:For the multiple the second location data according to preset format coding successively to be carried out Compression is packaged, and obtains the position data packet.
Uploading module 507, for uploading the position data packet to the server-side, so that the server-side is from institute's rheme It sets decompression in data packet and obtains the multiple second location data, the driver is calculated based on the multiple second location data The mileage travelled at end.
Uploading module specific 507 specifically can be used for:
The position data packet is uploaded to the server-side at interval of the third time, so that the server-side is from the position Decompression obtains multiple second location datas obtained in the third interval time in data packet, fixed based on the multiple second Position data calculate the mileage travelled at the driver end.
In practice, in order to be effectively reduced the damage that the data volume of position data packet further decreases driver's end data flow Consumption can carry out data encoding and assembly to the second location data according to preset data format, and being packaged by compression can be big The big data volume for reducing position data packet.
In practice, which is for being packaged as second location data of a position data packet according to compression is carried out Number determination.For example, carrying out the positioning of position at interval of 1 second obtains second location data, if the per continuous 10 Two position location datas carry out compression and are packaged as a position data packet, then the third time is 10 seconds, i.e., obtain one within every ten seconds A position data packet is simultaneously uploaded to server-side.
The coded format of the second location data is given in the embodiment of the present invention, as follows.
Optionally, in certain embodiments, the coding unit 511 specifically can be used for:
Determine the latitude value and warp of the second location data of each of multiple second location datas continuously obtained Angle value;
The dimension values of each second location data and longitude are subjected to data encoding according to preset data form.
It can be fixed including the order number of current service, driver ID, and by position in each practical position data packet The latitude value and longitude of corresponding second location data of position each anchor point of acquisition and the number of satellite of current location, Travel speed, driving direction and positioning time etc..Therefore, the coded format of the second location data can be according to:<Order number> long+<Driver ID>long+<GPS group sequence number>int+<The dimension values of first point>double+<The longitude of first point >double+<The positioning accuracy of first point>float+<The number of satellite of first point>short+<The traveling side of first point To value>float+<The time of first point>long+<The dimension values of second point>double+<The longitude of second point> double+<The positioning accuracy of second point>float+<The number of satellite of second point>short+<The traveling side of second point To value>float+<The time of second point>long+.......<N-th point of dimension values>double+<N-th point of longitude Value>double+<N-th point of positioning accuracy>float+<N-th point of number of satellite>short+<N-th point of traveling side To value>float+<N-th point of time>long.In practice, include in n expression one position data packet of boil down to is continuous The number of second location data.
Above-mentioned every kind of data type is converted to hexadecimal and is encoded, and is assemblied into string in the order described above, In, long accounts for 8, and double accounts for 8, and float accounts for 4, and int accounts for 4, and short accounts for 2.This can occupy data packet Data volume reduce while, ensure that be uploaded in server-side to driver end positioning accuracy.Certainly, according to server-side meter Calculate mileage travelled accuracy difference, the preset data form be not limited to aforesaid way can according to available accuracy demand into Row setting, is not specifically limited herein.
Optionally, in certain embodiments, the coding unit 512 is specifically used for:
Determine the second location data of each of second location data continuously obtained relative to its previous The latitudinal offset amount and longitude offset of two location datas;
The dimension offset of each second location data and longitude offset are carried out according to preset data form Data encoding.
After determining the longitude and latitude value of the second location data of first anchor point, the of second anchor point The longitude and dimension values of two location datas can be indicated with the longitude of first anchor point and the difference of position.
Longitude offset-lists are shown as:Longitude diff=(longitude of the previous anchor point of the longitude-of current anchor point) * 1000000;
Dimension offset-lists are shown as:Dimension diff=(latitude value of the previous anchor point of the latitude value-of current anchor point) * 1000000;
Time offset is expressed as:Time diff=(m- previous anchor point time when current anchor point)/millisecond.
That is the coded format of the second location data can be according to:<Order number>long+<Driver ID>long+<GPS group sequence Number>int+<The dimension diff of first point>short+<The longitude diff of first point>short+<The positioning accurate of first point Degree>float+<The number of satellite of first point>short+<The driving direction value of first point>float+<First point when Between diff>short+<The dimension diff of second point>short+<The longitude diff of second point>short+<Second point Positioning accuracy>float+<The number of satellite of second point>short+<The driving direction value of second point>float+<Second The time diff of point>short+.......<N-th point of dimension diff>short+<N-th point of longitude diff>short+< N-th point of positioning accuracy>float+<N-th point of number of satellite>short+<N-th point of driving direction value>float+< N-th point of time diff>short.
As can be seen that coding and data assembly are carried out to the second location data by longitude offset and dimension offset, So that needing to occupy 8 (long) longitudes and latitude value originally, it is adjusted to only to need to account for 2 (short) longitude offsets With dimension offset, the Data Position of each second location data occupancy is greatly reduced, to further reduced position The data volume of data packet.
Optionally, server-side carries out mileage calculation in practice, can be according to each location data in position data packet What longitude and latitude value calculated.If the corresponding anchor point of second position data acquired in the third time is located at same straight line On, then it is assumed that service vehicle, therefore can also be only by first anchor point acquired in the third time and last in straight-line travelling The corresponding second position data of one anchor point carry out compression and are packaged the mileage travelled that can be calculated in the third time.When Corresponding multiple anchor points not point-blank, then show that service vehicle is not straight-line travelling, driver end can in the third time The corresponding anchor point of inflection point that service vehicle is determined according to the second location data obtained in the third time, by the first anchor point, Inflection point and the last one anchor point carry out compression and are packaged the mileage travelled that can be calculated in the third time.It can further drop in this way The data volume of lower position data packet, while ensure that the computational accuracy of mileage travelled.
The embodiment of the present application, by being encoded according to different pre-arranged code formats to the second location data, and will be by Assembled multiple second location datas of coding are carried out according to pre-arranged code format and carry out compression packing acquisition position data packet, further The data volume for reducing position data packet ensure that the computational accuracy of mileage travelled simultaneously, avoid the repetition and waste of resource.
Fig. 6 is a kind of structural schematic diagram of one embodiment of mileage calculation device of the embodiment of the present invention.The device is answered For server-side, the apparatus may include:
Position data packet receiving module 601, the position data packet sent for receiving the driver end.
Wherein, the position data packet is that multiple second location datas continuously obtained are carried out to compression to be packaged acquisition;Institute Stating the second location data is the driver end when be in order placement service state, closes the positioning service and opens mileage calculation and takes Business;Carry out what a position positioning obtained at interval of the second preset time by the mileage calculation service.
Decompression module 602, for being based on the position data packet, decompression obtains the multiple second location data.
Second judgment module is used for 603, judges whether multiple location datas in the position data packet are in always On line;If so, the first computing module 604 of triggering;If not, triggering corner position data determining module 605.
First computing module 604, for based in the position data packet first the second location data and last A second location data calculates the mileage travelled.
Corner position data determining module 605, for determining the corner position data in the multiple second location data; Wherein, the corner position data are the second location data when transferring in driver's driving process.
Second computing module 606, for based on first second location data, corner position data and described The last one second location data calculates the mileage travelled.
In practice, after server-side receives the position data packet that driver end is sent, according to the pre-arranged code format pair of agreement Position data packet, which is decoded, obtains multiple second location datas, and calculates the row in the third time according to the second location data Mileage is sailed to valuate.
The calculating time is saved in order to improve computational efficiency, can judge that multiple second location data is corresponding by two-value method Anchor point whether be located along the same line, if it is, directly according to corresponding second location data of first anchor point and The last one difference for positioning corresponding second location data calculates mileage travelled, does not need each adjacent two positioning pair The second location data answered makes the difference, and calculates continuous range difference.Servicer is then defined as the anchor point on no longer same straight line Inflection point, and determine the corresponding corner position data of inflection point.At this point, server-side according to first between anchor point and inflection point it is right The range difference of corresponding position data between the range difference and inflection point and the last one anchor point of the position data answered calculates traveling Mileage.Inflection point can be multiple in practice, can determine effective inflection point number according to the length of third time, when inflection point is in the presence of more Need to calculate the range difference of the position data between adjacent comers when a, also to calculate acquisition mileage travelled.
In the embodiment of the present application, the computational efficiency of mileage travelled can be greatly improved by the Method for Calculate Mileage, simultaneously It ensure that the computational accuracy of mileage travelled.Server-side is timely feedbacked according to the mileage travelled of calculating to driver end, so as to driver end Make table device or meter is valuated according to mileage travelled in time, further improve efficiency of service and service quality.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Include, so that commodity or system including a series of elements not only include those elements, but also including not clear The other element listed, or further include for this commodity or the intrinsic element of system.In the feelings not limited more Under condition, the element that is limited by sentence " including one ... ", it is not excluded that also deposited in the commodity or system for including element In other identical element
Several preferred embodiments of the invention have shown and described in above description, but as before, it should be understood that the present invention is not It is confined to form disclosed herein, should not be regarded as an exclusion of other examples, and can be used for various other combinations, modification And environment, and can apply in contemplated scope herein, modifications can be made through the above teachings or related fields of technology or knowledge. And changes and modifications made by those skilled in the art do not depart from the spirit and scope of the present invention, then it all should be in right appended by the present invention It is required that protection scope in.

Claims (14)

1. a kind of position data method for uploading, which is characterized in that including:
Judge whether driver end is in order placement service state;
If driver end is not in order placement service state, positioning service is opened;
A position positioning is carried out at interval of the first preset time by the positioning service and obtains the first location data, and is uploaded First location data is to server-side, so that the server-side determines driver position based on first location data;
If the driver end is in order placement service state, closes the positioning service and open mileage calculation service;
A position positioning is carried out at interval of the second preset time by the mileage calculation service, obtains the second location data;
Multiple second location datas continuously obtained are subjected to compression and are packaged acquisition position data packet;
The position data packet is uploaded to the server-side, is obtained so that the server-side is decompressed from the position data packet The multiple second location data calculates the service mileage at the driver end based on the multiple second location data.
2. the method according to claim 1, wherein described carry out multiple second location datas continuously obtained Compression, which is packaged, obtains position data packet, including:
The second location data of each of the second multiple location data continuously acquired is distinguished according to preset data form Carry out data encoding;
The multiple the second location data according to preset format coding is successively subjected to compression packing, obtains the position Data packet.
3. the position data packet is uploaded to the server-side the method according to claim 1, wherein described, So that the server-side is decompressed from the position data packet obtains the multiple second location data, based on the multiple the Two location datas calculate the mileage travelled at the driver end, including:
The position data packet is uploaded to the server-side at interval of the third time, so that the server-side is from the position data Decompression obtains multiple second location datas obtained in the third interval time in packet, based on the multiple second positioning number According to the mileage travelled for calculating the driver end.
4. according to the method described in claim 2, it is characterized in that, in the second multiple location datas that will be continuously acquired Each second location data carry out data encoding respectively according to preset data form and include:
Determine the latitude value and longitude of the second location data of each of multiple second location datas continuously obtained;
The dimension values of each second location data and longitude are subjected to data encoding according to preset data form.
5. according to the method described in claim 2, it is characterized in that, in the second multiple location datas that will be continuously acquired Each second location data carry out data encoding respectively according to preset data form and include:
Determine that the second location data of each of second location data continuously obtained is previous second fixed relative to its The latitudinal offset amount and longitude offset of position data;
The dimension offset of each second location data and longitude offset are subjected to data according to preset data form Coding.
6. open the method according to claim 1, wherein if the driver end is not in order placement service state Opening positioning service includes:
If driver end is not in order placement service state, judge whether the driver end is in working state;
If so, opening the positioning service;
If not, closing the positioning service.
7. a kind of Method for Calculate Mileage, which is characterized in that including:
Receive the position data packet that the driver end is sent;Wherein, the position data packet is will continuously obtain multiple second Location data carries out compression and is packaged acquisition;When second location data is that the driver end is in order placement service state, close The positioning service simultaneously opens mileage calculation service;It is carried out once by the mileage calculation service at interval of the second preset time Position positioning obtains;
Based on the position data packet, decompression obtains the multiple second location data;
Judge whether multiple location datas in the position data packet are on same straight line;
If so, based on first the second location data and the calculating of the last one second location data in the position data packet The service mileage;
If not, determining the corner position data in the multiple second location data;Wherein, the corner position data are institute State the second location data when transferring in driver's driving process;
It is calculated based on first second location data, the corner position data and the last one described second location data The service mileage.
8. a kind of position data uploads device, which is characterized in that including:
First judgment module, for judging whether driver end is in order placement service state;If not, triggering first service module; If so, triggering second service module;
The first service module, for opening positioning service;
First location data obtains module, fixed for carrying out a position at interval of the first preset time by the positioning service Position obtains the first location data, and uploads first location data to server-side, so that the server-side is based on described first Location data determines driver position;
The second service module, for closing the positioning service and opening mileage calculation service;
Second location data obtains module, for carrying out primary position at interval of the second preset time by the mileage calculation service Positioning is set, the second location data is obtained;
Position data packet obtains module, is packaged acquisition positional number for multiple second location datas continuously obtained to be carried out compression According to packet;
Uploading module, for uploading the position data packet to the server-side, so that the server-side is from the position data Decompression obtains the multiple second location data in packet, and the row at the driver end is calculated based on the multiple second location data Sail mileage.
9. device according to claim 8, which is characterized in that the position data packet obtains module and includes:
Coding unit:For by the second location data of each of the second multiple location data continuously acquired according to default Data format carries out data encoding respectively;
Packaged unit:It is beaten for the multiple the second location data according to preset format coding successively to be carried out compression Packet, obtains the position data packet.
10. device according to claim 8, which is characterized in that the uploading module is specifically used for:
The position data packet is uploaded to the server-side at interval of the third time, so that the server-side is from the position data Decompression obtains multiple second location datas obtained in the third interval time in packet, based on the multiple second positioning number According to the mileage travelled for calculating the driver end.
11. device according to claim 9, which is characterized in that the coding unit is specifically used for:
Determine the latitude value and longitude of the second location data of each of multiple second location datas continuously obtained;
The dimension values of each second location data and longitude are subjected to data encoding according to preset data form.
12. device according to claim 9, which is characterized in that the coding unit is specifically used for:
Determine that the second location data of each of second location data continuously obtained is previous second fixed relative to its The latitudinal offset amount and longitude offset of position data;
The dimension offset of each second location data and longitude offset are subjected to data according to preset data form Coding.
13. device according to claim 8, which is characterized in that the first service module is specifically used for:
Judge whether the driver end is in working state;
If so, opening the positioning service;
If not, closing the positioning service.
14. a kind of mileage calculation device, which is characterized in that including:
Position data packet receiving module, the position data packet sent for receiving the driver end;Wherein, the position data packet Acquisition is packaged for multiple second location datas continuously obtained are carried out compression;Second location data is at the driver end When order placement service state, closes the positioning service and open mileage calculation service;Every is serviced by the mileage calculation Carry out what a position positioning obtained every the second preset time;
Decompression module, for being based on the position data packet, decompression obtains the multiple second location data;
Second judgment module is used for, and judges whether multiple location datas in the position data packet are on same straight line;Such as Fruit is to trigger the first computing module;If not, triggering corner position data determining module;
First computing module, for based in the position data packet first the second location data and the last one the Two location datas calculate the service mileage;
The corner position data determining module, for determining the corner position data in the multiple second location data;Its In, the corner position data are the second location data when transferring in driver's driving process;
Second computing module, for based on first second location data, the corner position data and it is described last A second location data calculates the service mileage.
CN201810891408.0A 2018-08-07 2018-08-07 Position data method for uploading, Method for Calculate Mileage and device Pending CN108924766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810891408.0A CN108924766A (en) 2018-08-07 2018-08-07 Position data method for uploading, Method for Calculate Mileage and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810891408.0A CN108924766A (en) 2018-08-07 2018-08-07 Position data method for uploading, Method for Calculate Mileage and device

Publications (1)

Publication Number Publication Date
CN108924766A true CN108924766A (en) 2018-11-30

Family

ID=64393766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810891408.0A Pending CN108924766A (en) 2018-08-07 2018-08-07 Position data method for uploading, Method for Calculate Mileage and device

Country Status (1)

Country Link
CN (1) CN108924766A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743385A (en) * 2018-12-29 2019-05-10 首约科技(北京)有限公司 Method for Calculate Mileage, device and storage medium
CN111835700A (en) * 2019-12-04 2020-10-27 北京嘀嘀无限科技发展有限公司 Data processing method and device, electronic equipment and storage medium
CN112804293A (en) * 2020-12-24 2021-05-14 湖北华威科智能股份有限公司 Electric power equipment monitoring data transmission method based on cyclic marks
CN113804216A (en) * 2021-08-30 2021-12-17 浙江吉利控股集团有限公司 Method and device for calculating driving mileage, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080103657A1 (en) * 2006-10-05 2008-05-01 Merritt Norton System and method for tracking information related to a vehicle
CN201142815Y (en) * 2007-12-25 2008-10-29 厦门雅迅网络股份有限公司 Vehicle mounted terminal
CN102646294A (en) * 2012-05-11 2012-08-22 海华电子企业(中国)有限公司 Vehicle-using record counting method based on satellite positioning and radio identification technology
CN103925929A (en) * 2013-01-14 2014-07-16 北京中交兴路信息科技有限公司 Method and device for statistics of movement distance of moving target
CN105371864A (en) * 2014-08-27 2016-03-02 深圳市赛格导航科技股份有限公司 Method and system for obtaining vehicle mileage by reporting GPS information
CN105702075A (en) * 2016-03-24 2016-06-22 苏州数字地图信息科技股份有限公司 Method and system for monitoring vehicle track

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080103657A1 (en) * 2006-10-05 2008-05-01 Merritt Norton System and method for tracking information related to a vehicle
CN201142815Y (en) * 2007-12-25 2008-10-29 厦门雅迅网络股份有限公司 Vehicle mounted terminal
CN102646294A (en) * 2012-05-11 2012-08-22 海华电子企业(中国)有限公司 Vehicle-using record counting method based on satellite positioning and radio identification technology
CN103925929A (en) * 2013-01-14 2014-07-16 北京中交兴路信息科技有限公司 Method and device for statistics of movement distance of moving target
CN105371864A (en) * 2014-08-27 2016-03-02 深圳市赛格导航科技股份有限公司 Method and system for obtaining vehicle mileage by reporting GPS information
CN105702075A (en) * 2016-03-24 2016-06-22 苏州数字地图信息科技股份有限公司 Method and system for monitoring vehicle track

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743385A (en) * 2018-12-29 2019-05-10 首约科技(北京)有限公司 Method for Calculate Mileage, device and storage medium
CN111835700A (en) * 2019-12-04 2020-10-27 北京嘀嘀无限科技发展有限公司 Data processing method and device, electronic equipment and storage medium
CN111835700B (en) * 2019-12-04 2022-07-22 北京嘀嘀无限科技发展有限公司 Data processing method and device, electronic equipment and storage medium
CN112804293A (en) * 2020-12-24 2021-05-14 湖北华威科智能股份有限公司 Electric power equipment monitoring data transmission method based on cyclic marks
CN112804293B (en) * 2020-12-24 2023-03-24 湖北华威科智能股份有限公司 Electric power equipment monitoring data transmission method based on cyclic marks
CN113804216A (en) * 2021-08-30 2021-12-17 浙江吉利控股集团有限公司 Method and device for calculating driving mileage, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108924766A (en) Position data method for uploading, Method for Calculate Mileage and device
CN108288096A (en) Method and device for estimating journey time, model training
CN108510313A (en) A kind of prediction of information transferring rate, information recommendation method and device
US20230408278A1 (en) Path planning method, apparatus and electronic device
CN101794345B (en) Data processing method and device
CN107014392B (en) Route planning method and equipment
EP3483801A1 (en) Methods and apparatuses for fuel consumption prediction
JP7106794B2 (en) Road condition prediction method, device, equipment, program and computer storage medium
CN110570678A (en) Method and device for predicting total travel time of bus from starting point to end point
CN113535399B (en) NFV resource scheduling method, device and system
CN111353620A (en) Method, device and equipment for constructing network point component prediction model and storage medium
Raphael et al. From goods to traffic: first steps toward an auction-based traffic signal controller
Farooq et al. GPS based public transport arrival time prediction
Zhang et al. Generative AI-enabled vehicular networks: Fundamentals, framework, and case study
CN113899381A (en) Method, apparatus, device, medium and product for generating route information
CN112287178B (en) Data cleaning method and device, electronic equipment and storage medium
CN111667083B (en) Method and device for determining estimated network taxi
CN110490595B (en) Risk control method and device
CN109919713A (en) Method for pushing, device and the readable storage medium storing program for executing of order
CN110113660A (en) A kind of method, apparatus, terminal and the storage medium of the estimation of transcoding duration
CN110020780A (en) The method, apparatus and electronic equipment of information output
CN110046075A (en) A kind of HPL test method and equipment
CN114550453B (en) Model training method, model determining method, electronic device and computer storage medium
CN108965465B (en) File transmission method and device and computer storage medium
US20220019869A1 (en) Hardware-optimized neural architecture search

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181130