GPS data processing method and server

文档序号:138529 发布日期:2021-10-22 浏览:26次 中文

阅读说明:本技术 一种gps数据处理方法及服务器 (GPS data processing method and server ) 是由 王利宁 张俊亚 刘京海 高建军 李沛瑶 周大龙 于 2021-06-22 设计创作,主要内容包括:本申请提供了一种GPS数据处理方法及服务器,在本申请中,接收车载机发送的第一GPS数据,根据该第一GPS数据中携带的标识信息,判断该第一GPS数据是否为补发的GPS数据,若是,则根据该第一GPS数据中携带的目标采集时间以及是否为营运的状态信息,确定该第一GPS数据对应的目标异常车次,根据该第一GPS数据,对该目标异常车次的行驶路径进行更新。在本申请中,当确定第一GPS数据为补发的GPS数据后,通过该第一GPS数据对目标异常车次的行驶路径进行更新,提高了公交车的实际行驶路径和行驶里程计算的准确度。(The application provides a GPS data processing method and a server, wherein in the application, first GPS data sent by a vehicle-mounted machine is received, whether the first GPS data is reissued GPS data or not is judged according to identification information carried in the first GPS data, if yes, a target abnormal train number corresponding to the first GPS data is determined according to target acquisition time carried in the first GPS data and whether the first GPS data is operating state information, and a driving path of the target abnormal train number is updated according to the first GPS data. In the method and the device, after the first GPS data are determined to be the reissued GPS data, the running path of the target abnormal bus number is updated through the first GPS data, and the accuracy of calculating the actual running path and the running mileage of the bus is improved.)

1. A method for processing GPS data, the method comprising:

receiving first GPS data sent by a vehicle-mounted machine, and judging whether the first GPS data is complementary GPS data or not according to identification information carried in the first GPS data;

if so, determining a target abnormal train number corresponding to the first GPS data according to target acquisition time carried in the first GPS data and state information of whether the bus operates or not;

and updating the running path of the target abnormal train number according to the first GPS data.

2. The method of claim 1, wherein the determining the target abnormal number of vehicles corresponding to the first GPS data according to the target acquisition time carried in the first GPS data and the status information of whether the bus is in operation comprises:

and if the operating state information is non-operating state information or operating state information, determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table.

3. The method of claim 2, wherein determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table comprises:

if the operating state information is non-operating state information, acquiring first state switching GPS data which is recorded in the state switching record table and is before the target acquisition time and is closest to the target acquisition time;

if the sub-state information whether the first GPS data is operated or not carried in the first state switching GPS data is inconsistent, acquiring second state switching GPS data which is recorded in the state switching record table and is behind the target acquisition time and is closest to the target acquisition time;

and determining a target non-operation abnormal train number corresponding to the first GPS data according to the first GPS data, the first state switching GPS data and the second state switching GPS data.

4. The method of claim 3, wherein determining the target non-operational abnormal number of vehicles corresponding to the first GPS data according to the first GPS data, the first stateful switchover GPS data and the second stateful switchover GPS data comprises:

and if the sub-state information of whether the operation is carried in the first GPS data and the second state switching GPS data is consistent, determining a first train number which takes the first acquisition time of the first state switching GPS data as the starting time and takes the target acquisition time of the first GPS data as the ending time as a target non-operation abnormal train number.

5. The method of claim 3, wherein determining the target non-operational abnormal number of vehicles corresponding to the first GPS data according to the first GPS data, the first stateful switchover GPS data and the second stateful switchover GPS data comprises:

if the sub-state information whether the first GPS data and the third GPS data are operated is not consistent, adding the first GPS data in the state switching record table;

and determining a second train number which takes the first acquisition time of the first state switching GPS data as the starting time and the target acquisition time of the first GPS data as the ending time, and a third train number which takes the target acquisition time of the first GPS data as the starting time and the second acquisition time of the second state switching GPS data as the ending time as the target non-operation abnormal train number.

6. The method of claim 2, wherein determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table comprises:

if the operating state information is the operating state information, judging whether the first GPS data is any one of GPS data arriving at a first station, GPS data leaving the first station, GPS data arriving at a terminal station or GPS data leaving the terminal station;

if yes, determining second GPS data which is before the target acquisition time and is closest to the target acquisition time from the received GPS data, and determining third GPS data which is after the target acquisition time and is closest to the target acquisition time;

determining a fourth train number which takes the third acquisition time of the second GPS data as the end time as a target operation abnormal train number, and updating the end time of the fourth train number as the target acquisition time;

and if the fourth train number taking the third acquisition time of the second GPS data as the end time is not identified, determining the identified fifth train number taking the fourth acquisition time of the third GPS data as the start time as the target operation abnormal train number, and updating the start time of the fifth train number to the target acquisition time.

7. A server, characterized in that the server comprises:

a communication unit configured to perform reception of first GPS data transmitted by a vehicle-mounted machine;

a processor configured to perform:

responding to the identification information carried in the first GPS data, and judging whether the first GPS data is complementary GPS data; if so, determining a target abnormal train number corresponding to the first GPS data according to target acquisition time carried in the first GPS data and state information of whether the bus operates or not; and updating the running path of the target abnormal train number according to the first GPS data.

8. The server according to claim 7, wherein the processor is specifically configured to:

and if the operating state information is non-operating state information or operating state information, determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table.

9. The server according to claim 8, wherein the processor is specifically configured to:

if the operating state information is non-operating state information, acquiring first state switching GPS data which is recorded in the state switching record table and is before the target acquisition time and is closest to the target acquisition time; if the sub-state information whether the first GPS data is operated or not carried in the first state switching GPS data is inconsistent, acquiring second state switching GPS data which is recorded in the state switching record table and is behind the target acquisition time and is closest to the target acquisition time; and determining a target non-operation abnormal train number corresponding to the first GPS data according to the first GPS data, the first state switching GPS data and the second state switching GPS data.

10. The server according to claim 8, wherein the processor is specifically configured to:

if the operating state information is the operating state information, judging whether the first GPS data is any one of GPS data arriving at a first station, GPS data leaving the first station, GPS data arriving at a terminal station or GPS data leaving the terminal station; if yes, determining second GPS data which is before the target acquisition time and is closest to the target acquisition time from the received GPS data, and determining third GPS data which is after the target acquisition time and is closest to the target acquisition time; determining a fourth train number which takes the third acquisition time of the second GPS data as the end time as a target operation abnormal train number, and updating the end time of the fourth train number as the target acquisition time; and if the fourth train number taking the third acquisition time of the second GPS data as the end time is not identified, determining the identified fifth train number taking the fourth acquisition time of the third GPS data as the start time as the target operation abnormal train number, and updating the start time of the fifth train number to the target acquisition time.

Technical Field

The application relates to the technical field of intelligent traffic, in particular to a Global Positioning System (GPS) data processing method and a server.

Background

With the development of science and technology, buses are popularized in various towns, and in the operation process of the buses, the actual driving mileage of the buses needs to be accurately recorded for settling driver wages, applying subsidies, calculating indexes, calculating vehicle maintenance and the like. According to the national industry or policies of various regions, each operation unit needs to add Global Positioning System (GPS) vehicle-mounted equipment to the bus to record all the actual running tracks and the driving mileage of the bus. Specifically, according to a preset operation plan, automatically matching operation vehicle numbers, and calculating the mileage of each operation vehicle number based on a GPS; the switching between the operating number and the non-operating number is performed according to the manual operation of the driver, and the GPS mileage of the non-operating number is calculated according to the GPS data received between the switching from the operating number to the non-operating number and the switching from the non-operating number to the operating number.

However, at the start or end of a commercial vehicle or at the start or end of a non-commercial vehicle, the GPS in-vehicle device may not transmit the GPS data because the signal is unstable, and the GPS in-vehicle device may not transmit the GPS data. Even if the supplementary sending of the GPS data is carried out after the data communication signal of the GPS vehicle-mounted equipment is stable, in the prior art, the supplementary sending of the GPS data is not processed. When reissue data exists, the calculated GPS mileage is possibly inaccurate, economic losses are caused to drivers and public transport enterprises, the vehicle maintenance period is interfered, and potential safety hazards are generated.

Disclosure of Invention

The application provides a GPS data processing method and a server, which are used for solving the problems that in the prior art, due to the fact that reissue data exist, the accuracy of actual driving paths and driving mileage calculation of a bus is reduced, interference is caused to a vehicle maintenance cycle, and potential safety hazards are generated.

In a first aspect, the present application provides a GPS data processing method, including:

receiving first GPS data sent by a vehicle-mounted machine, and judging whether the first GPS data is complementary GPS data or not according to identification information carried in the first GPS data;

if so, determining a target abnormal train number corresponding to the first GPS data according to target acquisition time carried in the first GPS data and state information of whether the bus operates or not;

and updating the running path of the target abnormal train number according to the first GPS data.

In a second aspect, the present application further provides a server, including:

a communication unit configured to perform reception of first GPS data transmitted by a vehicle-mounted machine;

a processor configured to perform:

responding to identification information carried in the first GPS data, and judging whether the first GPS data is supplemented GPS data; if so, determining a target abnormal train number corresponding to the first GPS data according to target acquisition time carried in the first GPS data and state information of whether the bus operates or not; and updating the running path of the target abnormal train number according to the first GPS data.

In a third aspect, the present application further provides an electronic device, which at least includes a processor and a memory, and the processor is configured to implement the steps of the GPS data processing method when executing the computer program stored in the memory.

In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the steps of any of the above-mentioned GPS data processing methods.

In the method, first GPS data sent by a vehicle-mounted machine is received, whether the first GPS data is reissued GPS data or not is judged according to identification information carried in the first GPS data, if yes, a target abnormal vehicle number corresponding to the first GPS data is determined according to target acquisition time carried in the first GPS data and whether the target abnormal vehicle number is operating state information, and a driving path of the target abnormal vehicle number is updated according to the first GPS data. In the method and the device, after the first GPS data are determined to be the reissued GPS data, the running path of the target abnormal bus number is updated through the first GPS data, and the accuracy of calculating the actual running path and the running mileage of the bus is improved.

Drawings

In order to more clearly illustrate the technical solutions of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.

FIG. 1 is a schematic diagram of a GPS data processing process provided herein;

FIG. 2 is a schematic illustration of a bus and server interaction provided by some embodiments of the present application;

FIG. 3 is a schematic structural diagram of a GPS data processing apparatus provided in the present application;

fig. 4 is a schematic structural diagram of an electronic device provided in the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

In order to update the driving path of the bus through the reissued GPS data and improve the use experience of a user, the application provides a GPS data processing method and a server.

Fig. 1 is a schematic diagram of a GPS data processing process provided in the present application, where the process includes:

s101: the method comprises the steps of receiving first GPS data sent by a vehicle-mounted machine, and judging whether the first GPS data is reissued GPS data or not according to identification information carried in the first GPS data.

The GPS data processing method is applied to a vehicle algorithm engine, and the vehicle algorithm engine is located on a PC or a server and other equipment. The following description will take the example where the vehicle algorithm engine is located on a server.

In the application, the bus-mounted equipment is installed in the bus, wherein the bus-mounted equipment comprises a GPS module and a GPRS module, the GPS module acquires the positioning information of the bus from the satellite, and sends the first GPS data carrying the positioning information of the bus to the server through the GPRS module according to a preset time interval. In the present application, in order to distinguish the latest received GPS data from the previously received GPS data by the server, the latest received GPS data is referred to as first GPS data.

In the application, after receiving the first GPS data, the server determines whether the first GPS data is complementary GPS data according to the identification information carried in the first GPS data. Specifically, a preset character string, a number, or the like may be used as the identification information to identify whether the first GPS data is complementary GPS data, for example, if the identification information is a number 1, the first GPS data is real-time GPS data, and if the identification information is a number 0, the first GPS data is complementary GPS data.

S102: if so, determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time carried in the first GPS data and the state information of whether the bus operates or not.

In this application, the actual driving process of the bus may include an operation state and a non-operation state, wherein the operation state is a state in which the bus is driven according to a preset operation plan, that is, the bus is driven according to a preset driving route passing through each stop in sequence, and the non-operation state is a state in which the bus is driven except the operation state, such as refueling and repairing. In order to count the running path of the bus in the operating state and the running path of the bus in the non-operating state, the first GPS data also carries the state information of whether the bus is in operation or not and the target acquisition time of the first GPS data.

In the application, after the first GPS data is determined to be the reissued GPS data, the target abnormal train number corresponding to the first GPS data is also determined, and then the running path of the target abnormal train number is updated.

Specifically, in the application, the first GPS data may also carry status information of whether the bus is in operation or not, and target acquisition time of the first GPS data, and a target abnormal number of vehicles corresponding to the first GPS data is determined according to the status information of whether the bus is in operation or not and the target acquisition time. If the first GPS data carries operating state information, searching an operating train number corresponding to the target acquisition time carried in the first GPS data from the operating train numbers, and determining the operating train number as a target abnormal train number; and if the first GPS data carries non-operation state information, searching a non-operation vehicle number corresponding to the target acquisition time carried in the first GPS data from the non-operation vehicle numbers, and determining the non-operation vehicle number as a target abnormal vehicle number.

S103: and updating the running path of the target abnormal train number according to the first GPS data.

In the present application, after the target abnormal number of vehicles is determined, the travel route of the target abnormal number of vehicles is updated based on the first GPS data. Specifically, after the target abnormal train number is determined, the position of the bus at the target acquisition time in the target abnormal train number is determined according to the target acquisition time, and the position is updated by using the position information carried in the first GPS data.

In the method and the device, after the first GPS data are determined to be the reissued GPS data, the running path of the target abnormal bus number is updated through the first GPS data, and the accuracy of calculating the actual running path and the running mileage of the bus is improved.

In order to determine the target abnormal number of vehicles corresponding to the first GPS data, on the basis of the above embodiment, in the present application, the determining the target abnormal number of vehicles corresponding to the first GPS data according to the target acquisition time carried in the first GPS data and the status information of whether the bus operates includes:

and if the operating state information is non-operating state information or operating state information, determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table.

In the application, for any non-complementary GPS data received, if the sub-state information of whether to operate carried in the non-complementary GPS data is before the acquisition time of the non-complementary GPS data and the sub-state information of whether to operate carried in the GPS data closest to the acquisition time is inconsistent, the non-complementary GPS data is marked as state switching GPS data, and the non-complementary GPS data is stored in a state switching record table according to the acquisition time of the non-complementary GPS data.

In the application, when the target abnormal train number corresponding to the first GPS data is determined, the target abnormal train number corresponding to the first GPS data may be determined according to the state information of whether the first GPS data is operated, the target acquisition time of the first GPS data, and the recorded state switching record table. The operating status information may be operating status information or non-operating status information.

In order to determine a target abnormal number of vehicles corresponding to first GPS data, on the basis of the foregoing embodiments, in this application, the determining a target abnormal number of vehicles corresponding to first GPS data according to the target acquisition time and a recorded state switching record table includes:

if the operating state information is non-operating state information, acquiring first state switching GPS data which is recorded in the state switching record table and is before the target acquisition time and is closest to the target acquisition time;

if the sub-state information whether the first GPS data is operated or not carried in the first state switching GPS data is inconsistent, acquiring second state switching GPS data which is recorded in the state switching record table and is behind the target acquisition time and is closest to the target acquisition time;

and determining a target non-operation abnormal train number corresponding to the first GPS data according to the first GPS data, the first state switching GPS data and the second state switching GPS data.

In the application, all the driving times of the bus before the current time are recorded in the server, the driving times comprise abnormal driving times and non-abnormal driving times, and the abnormal driving times further comprise abnormal operation driving times and non-abnormal operation driving times. Therefore, when the target abnormal vehicle number corresponding to the first GPS data is determined, it is necessary to determine whether the target abnormal vehicle number corresponding to the first GPS data is the target non-operation abnormal vehicle number or the target operation abnormal vehicle number. And if the operating state information carried in the first GPS data is non-operating state information, the target abnormal train number corresponding to the first GPS data is a target non-operating abnormal train number.

In the present application, the operational status information carried in the first GPS data includes operational status information and non-operational status information, and the operational status information includes a plurality of sub-status information, such as uplink status information in a direction toward the destination, downlink status information in a direction toward the primary station, primary station status information for parking the primary station or the destination, and secondary station status information for parking the intermediate station; the non-operational status information also includes a plurality of sub-status information, such as sub-status information for refueling, sub-status information for vehicle repair, and the like.

In the application, when the target abnormal train number is determined, the first state switching GPS data which is before the target acquisition time of the first GPS data and is closest to the target acquisition time is determined according to the state switching record table recorded in the server. The first state-switched GPS data may be state-switched GPS data switched from an operating state to a non-operating state, state-switched GPS data switched from the non-operating state to the operating state, or state-switched GPS data switched from any one sub-state information of the non-operating state information to another sub-state information of the non-operating state information.

When the first GPS data is inconsistent with the sub-state information whether the first state switching GPS data is operated or not, determining second state switching GPS data which is before the target acquisition time of the first GPS data and is closest to the target acquisition time. The second state-switching GPS data may be state-switching GPS data for switching from the operating state to the non-operating state, or may be state-switching GPS data for switching from any sub-state information in the non-operating state information to another sub-state information in the non-operating state information. And determining a target non-operation abnormal train number corresponding to the first GPS data according to the first GPS data, the first state switching GPS data and the second state switching GPS data.

In this application, when the first GPS data is consistent with the operating state information carried in the first state switching GPS data, the first GPS data is not processed.

In order to determine the target non-operation abnormal number of cars corresponding to the first GPS data, in the present application, on the basis of the above embodiments, the determining the target non-operation abnormal number of cars corresponding to the first GPS data according to the first GPS data, the first state switching GPS data, and the second state switching GPS data includes:

and if the sub-state information of whether the operation is carried in the first GPS data and the second state switching GPS data is consistent, determining a first train number which takes the first acquisition time of the first state switching GPS data as the starting time and takes the target acquisition time of the first GPS data as the ending time as a target non-operation abnormal train number.

In the application, after the first state switching GPS data and the second state switching GPS data are determined, since the first state switching GPS data is consistent with the sub-state information of whether to operate carried by the first GPS data, it is determined that the target non-operating train number is necessarily related to the train number corresponding to the first state switching and having the non-operation abnormality.

At this time, whether the sub-state information carried in the first GPS data and the second state switching GPS data is in agreement or not is judged, and if the sub-state information is in agreement and the target acquisition time of the first GPS data is earlier than the second acquisition time of the second state switching GPS data, it is indicated that the switching of the state information has occurred at the target acquisition time, but the server does not receive the GPS data carrying the switching of the sub-state information whether to operate. Therefore, in the present application, when the complemented first GPS data is received and the sub-state information of whether to operate carried in the first GPS data is consistent with the sub-state information of whether to operate carried in the second state switching GPS data, the second state switching GPS data is updated with the first GPS data, and the first train number in which the first collection time of the first state switching GPS data is used as the start time and the target collection time of the first GPS data is used as the end time is determined as the target non-operation abnormal train number.

In order to determine the target non-operation abnormal number of cars corresponding to the first GPS data, in the present application, on the basis of the above embodiments, the determining the target non-operation abnormal number of cars corresponding to the first GPS data according to the first GPS data, the first state switching GPS data, and the second state switching GPS data includes:

if the sub-state information whether the first GPS data and the third GPS data are operated is not consistent, adding the first GPS data in the state switching record table;

and determining a second train number which takes the first acquisition time of the first state switching GPS data as the starting time and the target acquisition time of the first GPS data as the ending time, and a third train number which takes the target acquisition time of the first GPS data as the starting time and the second acquisition time of the second state switching GPS data as the ending time as the target non-operation abnormal train number.

In the present application, if the operating sub-state information carried in the first GPS data is not identical to the operating sub-state information carried in the second state switching GPS data, it is described that at least one state switching occurs between the target acquisition times of the first state switching GPS data and the second state switching GPS data, but the server does not receive the GPS data. And because the target acquisition time of the first GPS data is between the first acquisition time of the first state switching GPS data and the second acquisition time of the second state switching GPS data, and the state information of whether to operate carried in the first GPS data is consistent with the sub-state information of whether to operate carried in the first state switching GPS data and is inconsistent with the sub-state information of whether to operate carried in the second state switching GPS data, determining that the bus is at the target acquisition time of the first GPS data, and switching from the sub-state information carried in the first state switching GPS data to the sub-state information carried in the second state switching GPS data.

Therefore, when the target non-operation abnormal train number corresponding to the first GPS data is determined, a second train number which takes the first acquisition time of switching the GPS data in the first state as the starting time and the target acquisition time of the first GPS data as the ending time, and a third train number which takes the target acquisition time of the first GPS data as the starting time and the second acquisition time of switching the GPS data in the second state as the ending time are determined as the target non-operation abnormal train number.

In the application, after a second train number and a third train number are determined, determining the received GPS data, namely the GPS data which is before the first acquisition time and is closest to the first acquisition time, and determining the acquisition time of the GPS data which is before the first acquisition time and is closest to the first acquisition time and a first time interval of the first acquisition time; determining the GPS data which is before the target acquisition time and is closest to the target acquisition time, and determining a second time interval between the acquisition time of the GPS data which is before the target acquisition time and is closest to the target acquisition time and the target acquisition time; and determining the GPS data which is before the second acquisition time and is closest to the second acquisition time, and determining the acquisition time of the GPS data which is before the target acquisition time and is closest to the target acquisition time and a third time interval of the second acquisition time. If the first time interval and the second time interval are both smaller than a preset time interval threshold, marking the second train number as a normal train number, if the second time interval and the third time interval are both smaller than a preset time interval threshold, marking the third train number as a normal train number, otherwise, marking the third train number as an abnormal train number.

In order to determine a target abnormal number of vehicles corresponding to first GPS data, on the basis of the foregoing embodiments, in this application, the determining a target abnormal number of vehicles corresponding to first GPS data according to the target acquisition time and a recorded state switching record table includes:

if the operating state information is the operating state information, judging whether the first GPS data is any one of GPS data arriving at a first station, GPS data leaving the first station, GPS data arriving at a terminal station or GPS data leaving the terminal station;

if yes, determining second GPS data which is before the target acquisition time and is closest to the target acquisition time from the received GPS data, and determining third GPS data which is after the target acquisition time and is closest to the target acquisition time;

determining a fourth train number which takes the third acquisition time of the second GPS data as the end time as a target operation abnormal train number, and updating the end time of the fourth train number as the target acquisition time;

and if the fourth train number taking the third acquisition time of the second GPS data as the end time is not identified, determining the identified fifth train number taking the fourth acquisition time of the third GPS data as the start time as the target operation abnormal train number, and updating the start time of the fifth train number to the target acquisition time.

In the application, all the driving times of the bus before the current time are recorded in the server, the driving times comprise abnormal driving times and non-abnormal driving times, and the abnormal driving times further comprise abnormal operation driving times and non-abnormal operation driving times. Therefore, when the target abnormal vehicle number corresponding to the first GPS data is determined, it is necessary to determine whether the target abnormal vehicle number corresponding to the first GPS data is the target non-operation abnormal vehicle number or the target operation abnormal vehicle number. And if the operating state information carried in the first GPS data is the operating state information, the target abnormal train number corresponding to the first GPS data is the target operating abnormal train number.

In this application, if the operating status information is the operating status information, the number of vehicles is affected only when the first GPS data is any one of the GPS data arriving at the initial station, the GPS data leaving the initial station, the GPS data arriving at the destination station, and the GPS data leaving the destination station, and if the first GPS data is only the GPS data of the intermediate station, the number of vehicles where the first GPS data is located is not abnormal due to the absence of the first GPS data.

Therefore, in the present application, after determining whether the operating status information carried in the first GPS data is the operating status information, it is determined whether the first GPS data is any one of the GPS data arriving at the first station, the GPS data leaving the first station, the GPS data arriving at the destination station, or the GPS data leaving the destination station, and if so, it is determined that the target operation abnormal number corresponding to the first GPS data is determined.

Specifically, it is determined that, of the GPS data that the server has received, the second GPS data that is acquired before the target acquisition time of the first GPS data and is closest to the target acquisition time of the first GPS data, and the third GPS data that is acquired after the target acquisition time of the first GPS data and is closest to the target acquisition time of the first GPS data. And identifying whether a fourth train number with the third acquisition time of the second GPS data as the end time exists, if so, indicating that the fourth train number ends at the third acquisition time, and if the first GPS data is any one of the GPS data arriving at the first station, the GPS data leaving the first station, the GPS data arriving at the terminal station or the GPS data leaving the terminal station, and the target acquisition time of the GPS data is after the third acquisition time of the second GPS data, and if the fourth train number should end at the target acquisition time of the first GPS data, determining the fourth train number as a target operation abnormal train number, and updating the end time of the fourth train number to the target acquisition time of the first GPS data. If the fourth train number taking the third acquisition time of the second GPS data as the end time is not identified, identifying a fifth train number taking the fourth acquisition time of the third GPS data as the start time, determining the fifth train number as a target operation abnormal train number, and updating the start time of the fifth train number to the acquisition time of the first GPS data.

In the application, if the received first GPS data is real-time GPS data, the data in the recorded state switching record table is updated according to the GPS data, and the recorded number of buses is updated.

Specifically, the first GPS data is compared with the last third-state switching GPS data in the state switching record table, whether sub-state information carried in the first GPS data and the third-state switching GPS data is consistent or not is judged, and if the sub-state information carried in the first GPS data and the third-state switching GPS data is consistent, it indicates that the state of the bus does not change in a time period from a fifth acquisition time of the third-state switching GPS data to a target acquisition time of the first GPS data, and the third-state switching GPS data is updated by the first GPS data; if the sub-state information whether the first GPS data and the third state switching GPS data are in operation is not consistent, it indicates that the state of the bus has changed within a time period from the fifth acquisition time of the third state switching GPS data to the target acquisition time of the first GPS data, and the first GPS data is added to the state switching record table.

If the first GPS data is the GPS data switched from other sub-state information except the uplink state information to the uplink state information and the first GPS data is the data leaving the initial station, generating an operation train number taking the target acquisition time of the first GPS data as the starting time; and if the first GPS data is the GPS data switched from the other sub-state information except the uplink state information to the uplink state information, but the first GPS data is not the data leaving the initial station, generating an operation abnormal train number taking the target acquisition time of the first GPS data as the starting time.

If the first GPS data is the GPS data switched from other sub-state information except the downlink state information to the downlink state information and the first GPS data is the data leaving the terminal station, generating an operation train number taking the target acquisition time of the first GPS data as the starting time; and if the first GPS data is the GPS data switched from other sub-state information except the downlink state information to the downlink state information, but the first GPS data is not the data leaving the terminal station, generating an abnormal operation train number taking the target acquisition time of the first GPS data as the starting time.

And if the first GPS data is the GPS data switched from other sub-state information except the state information of the main stop station to the state information of the main stop station, and the first GPS data is the data arriving at the terminal station or the data arriving at the first station, generating the operation train number taking the target acquisition time of the first GPS data as the end time.

And if the first GPS data is the GPS data switched from other sub-state information except the state information of the main stop station to the state information of the main stop station, but the first GPS data does not arrive at the terminal station or arrive at the first station, generating an abnormal operation train number taking the target acquisition time of the first GPS data as the end time.

And if the first GPS data is the GPS data switched from the operating state information to the non-operating state information, and the time interval between the target acquisition time and the sixth acquisition time of the third GPS data which is before the target acquisition time and is closest to the target acquisition time does not exceed a preset time interval threshold, generating a non-operating train number taking the target acquisition time as the starting time.

And if the first GPS data is the GPS data switched from the operating state information to the non-operating state information, and the time interval between the target acquisition time and the sixth acquisition time of the third GPS data which is before the target acquisition time and is closest to the target acquisition time exceeds a preset time interval threshold, generating a non-operating abnormal train number taking the target acquisition time as the starting time.

And if the first GPS data is the GPS data switched from the non-operation state information to the operation state information, and the time interval between the target acquisition time and the sixth acquisition time of the third GPS data which is before the target acquisition time and is closest to the target acquisition time does not exceed a preset time interval threshold, generating a non-operation train number taking the target acquisition time as the end time.

And if the first GPS data is the GPS data switched from the non-operation state information to the operation state information, and the time interval between the target acquisition time and the sixth acquisition time of the third GPS data which is before the target acquisition time and is closest to the target acquisition time exceeds a preset time interval threshold, generating a non-operation abnormal train number taking the target acquisition time as the end time.

Fig. 2 is an interaction schematic diagram of a bus and a server according to some embodiments of the present application, and as shown in fig. 2, a vehicle-mounted device is installed in the bus, where the vehicle-mounted device includes a GPS module and a GPRS module, and the GPS module obtains positioning information of the bus from a satellite and sends first GPS data carrying the positioning information of the bus to the server through the GPRS module according to a preset time interval. And the server determines and stores the driving mileage of the bus according to the first GPS data and the previously received GPS data. The driving mileage of the bus can be inquired from the server through the client.

Fig. 3 is a schematic structural diagram of a server provided in the present application, where the apparatus includes:

a communication unit 301 configured to receive first GPS data transmitted by a vehicle-mounted machine;

a processor 302 configured to perform:

responding to identification information carried in the first GPS data, and judging whether the first GPS data is supplemented GPS data; if the first GPS data is reissued GPS data, determining a target abnormal train number corresponding to the first GPS data according to target acquisition time carried in the first GPS data and state information of whether the bus operates or not; and updating the running path of the target abnormal train number according to the first GPS data.

In a possible implementation, the processor is specifically configured to:

and if the operating state information is non-operating state information or operating state information, determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table.

In a possible implementation, the processor is specifically configured to:

if the operating state information is non-operating state information, acquiring first state switching GPS data which is recorded in the state switching record table and is before the target acquisition time and is closest to the target acquisition time; if the sub-state information whether the first GPS data is operated or not carried in the first state switching GPS data is inconsistent, acquiring second state switching GPS data which is recorded in the state switching record table and is behind the target acquisition time and is closest to the target acquisition time; and determining a target non-operation abnormal train number corresponding to the first GPS data according to the first GPS data, the first state switching GPS data and the second state switching GPS data.

In a possible implementation, the processor is specifically configured to:

and if the sub-state information of whether the operation is carried in the first GPS data and the second state switching GPS data is consistent, determining a first train number which takes the first acquisition time of the first state switching GPS data as the starting time and takes the target acquisition time of the first GPS data as the ending time as a target non-operation abnormal train number.

In a possible implementation, the processor is specifically configured to:

if the sub-state information whether the first GPS data and the third GPS data are operated is not consistent, adding the first GPS data in the state switching record table; and determining a second train number which takes the first acquisition time of the first state switching GPS data as the starting time and the target acquisition time of the first GPS data as the ending time, and a third train number which takes the target acquisition time of the first GPS data as the starting time and the second acquisition time of the second state switching GPS data as the ending time as the target non-operation abnormal train number.

In a possible implementation, the processor is specifically configured to:

if the operating state information is the operating state information, judging whether the first GPS data is any one of GPS data arriving at a first station, GPS data leaving the first station, GPS data arriving at a terminal station or GPS data leaving the terminal station; if yes, determining second GPS data which is before the target acquisition time and is closest to the target acquisition time from the received GPS data, and determining third GPS data which is after the target acquisition time and is closest to the target acquisition time; determining a fourth train number which takes the third acquisition time of the second GPS data as the end time as a target operation abnormal train number, and updating the end time of the fourth train number as the target acquisition time; and if the fourth train number taking the third acquisition time of the second GPS data as the end time is not identified, determining the identified fifth train number taking the fourth acquisition time of the third GPS data as the start time as the target operation abnormal train number, and updating the start time of the fifth train number to the target acquisition time.

Fig. 4 is a schematic structural diagram of an electronic device provided in the present application, and on the basis of the foregoing embodiments, the present application further provides an electronic device, as shown in fig. 4, including: the system comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete mutual communication through the communication bus 404;

the memory 403 has stored therein a computer program which, when executed by the processor 701, causes the processor 401 to perform the steps of:

receiving first GPS data sent by a vehicle-mounted machine, and judging whether the first GPS data is complementary GPS data or not according to identification information carried in the first GPS data;

if so, determining a target abnormal train number corresponding to the first GPS data according to target acquisition time carried in the first GPS data and state information of whether the bus operates or not;

and updating the running path of the target abnormal train number according to the first GPS data.

In a possible implementation manner, the determining, according to the target acquisition time carried in the first GPS data and the state information of whether the bus is in operation or not, the target abnormal number of vehicles corresponding to the first GPS data includes:

and if the operating state information is non-operating state information or operating state information, determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table.

In a possible implementation manner, the determining, according to the target acquisition time and the recorded state switching record table, the target abnormal train number corresponding to the first GPS data includes:

if the operating state information is non-operating state information, acquiring first state switching GPS data which is recorded in the state switching record table and is before the target acquisition time and is closest to the target acquisition time;

if the sub-state information whether the first GPS data is operated or not carried in the first state switching GPS data is inconsistent, acquiring second state switching GPS data which is recorded in the state switching record table and is behind the target acquisition time and is closest to the target acquisition time;

and determining a target non-operation abnormal train number corresponding to the first GPS data according to the first GPS data, the first state switching GPS data and the second state switching GPS data.

In a possible implementation manner, the determining, according to the first GPS data, the first state switching GPS data, and the second state switching GPS data, the target non-operation abnormal number of vehicles corresponding to the first GPS data includes:

and if the sub-state information of whether the operation is carried in the first GPS data and the second state switching GPS data is consistent, determining a first train number which takes the first acquisition time of the first state switching GPS data as the starting time and takes the target acquisition time of the first GPS data as the ending time as a target non-operation abnormal train number.

In a possible implementation manner, the determining, according to the first GPS data, the first state switching GPS data, and the second state switching GPS data, the target non-operation abnormal number of vehicles corresponding to the first GPS data includes:

if the sub-state information whether the first GPS data and the third GPS data are operated is not consistent, adding the first GPS data in the state switching record table;

and determining a second train number which takes the first acquisition time of the first state switching GPS data as the starting time and the target acquisition time of the first GPS data as the ending time, and a third train number which takes the target acquisition time of the first GPS data as the starting time and the second acquisition time of the second state switching GPS data as the ending time as the target non-operation abnormal train number.

In a possible implementation manner, the determining, according to the target acquisition time and the recorded state switching record table, the target abnormal train number corresponding to the first GPS data includes:

if the operating state information is the operating state information, judging whether the first GPS data is any one of GPS data arriving at a first station, GPS data leaving the first station, GPS data arriving at a terminal station or GPS data leaving the terminal station;

if yes, determining second GPS data which is before the target acquisition time and is closest to the target acquisition time from the received GPS data, and determining third GPS data which is after the target acquisition time and is closest to the target acquisition time;

determining a fourth train number which takes the third acquisition time of the second GPS data as the end time as a target operation abnormal train number, and updating the end time of the fourth train number as the target acquisition time;

and if the fourth train number taking the third acquisition time of the second GPS data as the end time is not identified, determining the identified fifth train number taking the fourth acquisition time of the third GPS data as the start time as the target operation abnormal train number, and updating the start time of the fifth train number to the target acquisition time.

Because the principle of the electronic device for solving the problem is similar to the GPS data processing method, the electronic device may be implemented by referring to the above embodiments, and repeated details are not repeated.

The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface 402 is used for communication between the above-described electronic apparatus and other apparatuses. The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor. The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.

On the basis of the foregoing embodiments, the present application further provides a computer-readable storage medium, in which a computer program executable by a processor is stored, and when the program is run on the processor, the processor is caused to execute the following steps:

receiving first GPS data sent by a vehicle-mounted machine, and judging whether the first GPS data is complementary GPS data or not according to identification information carried in the first GPS data;

if so, determining a target abnormal train number corresponding to the first GPS data according to target acquisition time carried in the first GPS data and state information of whether the bus operates or not;

and updating the running path of the target abnormal train number according to the first GPS data.

In a possible implementation manner, the determining, according to the target acquisition time carried in the first GPS data and the state information of whether the bus is in operation or not, the target abnormal number of vehicles corresponding to the first GPS data includes:

and if the operating state information is non-operating state information or operating state information, determining the target abnormal train number corresponding to the first GPS data according to the target acquisition time and the recorded state switching record table.

In a possible implementation manner, the determining, according to the target acquisition time and the recorded state switching record table, the target abnormal train number corresponding to the first GPS data includes:

if the operating state information is non-operating state information, acquiring first state switching GPS data which is recorded in the state switching record table and is before the target acquisition time and is closest to the target acquisition time;

if the sub-state information whether the first GPS data is operated or not carried in the first state switching GPS data is inconsistent, acquiring second state switching GPS data which is recorded in the state switching record table and is behind the target acquisition time and is closest to the target acquisition time;

and determining a target non-operation abnormal train number corresponding to the first GPS data according to the first GPS data, the first state switching GPS data and the second state switching GPS data.

In a possible implementation manner, the determining, according to the first GPS data, the first state switching GPS data, and the second state switching GPS data, the target non-operation abnormal number of vehicles corresponding to the first GPS data includes:

and if the sub-state information of whether the operation is carried in the first GPS data and the second state switching GPS data is consistent, determining a first train number which takes the first acquisition time of the first state switching GPS data as the starting time and takes the target acquisition time of the first GPS data as the ending time as a target non-operation abnormal train number.

In a possible implementation manner, the determining, according to the first GPS data, the first state switching GPS data, and the second state switching GPS data, the target non-operation abnormal number of vehicles corresponding to the first GPS data includes:

if the sub-state information whether the first GPS data and the third GPS data are operated is not consistent, adding the first GPS data in the state switching record table;

and determining a second train number which takes the first acquisition time of the first state switching GPS data as the starting time and the target acquisition time of the first GPS data as the ending time, and a third train number which takes the target acquisition time of the first GPS data as the starting time and the second acquisition time of the second state switching GPS data as the ending time as the target non-operation abnormal train number.

In a possible implementation manner, the determining, according to the target acquisition time and the recorded state switching record table, the target abnormal train number corresponding to the first GPS data includes:

if the operating state information is the operating state information, judging whether the first GPS data is any one of GPS data arriving at a first station, GPS data leaving the first station, GPS data arriving at a terminal station or GPS data leaving the terminal station;

if yes, determining second GPS data which is before the target acquisition time and is closest to the target acquisition time from the received GPS data, and determining third GPS data which is after the target acquisition time and is closest to the target acquisition time;

determining a fourth train number which takes the third acquisition time of the second GPS data as the end time as a target operation abnormal train number, and updating the end time of the fourth train number as the target acquisition time;

and if the fourth train number taking the third acquisition time of the second GPS data as the end time is not identified, determining the identified fifth train number taking the fourth acquisition time of the third GPS data as the start time as the target operation abnormal train number, and updating the start time of the fifth train number to the target acquisition time.

Since the principle of the computer readable medium provided above for solving the problem is similar to the GPS data processing method, after the processor executes the computer program in the computer readable medium, the steps implemented may refer to the above embodiments, and repeated parts are not described again.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于物联网的汽车检测装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!