CN112948407A - Data updating method, device, equipment and storage medium - Google Patents

Data updating method, device, equipment and storage medium Download PDF

Info

Publication number
CN112948407A
CN112948407A CN202110232154.3A CN202110232154A CN112948407A CN 112948407 A CN112948407 A CN 112948407A CN 202110232154 A CN202110232154 A CN 202110232154A CN 112948407 A CN112948407 A CN 112948407A
Authority
CN
China
Prior art keywords
driving data
target
data
target driving
period
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.)
Granted
Application number
CN202110232154.3A
Other languages
Chinese (zh)
Other versions
CN112948407B (en
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.)
Wuxi Cheliantianxia Information Technology Co ltd
Original Assignee
Wuxi Cheliantianxia Information 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 Wuxi Cheliantianxia Information Technology Co ltd filed Critical Wuxi Cheliantianxia Information Technology Co ltd
Priority to CN202110232154.3A priority Critical patent/CN112948407B/en
Publication of CN112948407A publication Critical patent/CN112948407A/en
Application granted granted Critical
Publication of CN112948407B publication Critical patent/CN112948407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Traffic Control Systems (AREA)
  • Time Recorders, Dirve Recorders, Access Control (AREA)

Abstract

The application provides a data updating method, a data updating device, equipment and a storage medium, wherein the method comprises the following steps: acquiring driving data sent by a target vehicle according to a preset period in the driving process; judging whether a first difference value of the driving data and the historical driving data acquired in the previous period on the designated attribute is smaller than or equal to a first preset threshold value or not; if the first difference is smaller than or equal to a first preset threshold value, judging whether the driving data comprises first target driving data; if the driving data comprises first target driving data, updating a first data statistical record of the first target driving data in the previous period according to the first target driving data for each first target driving data; by the method, time consumption of travel data calculation is reduced, and waiting time of a user is reduced.

Description

Data updating method, device, equipment and storage medium
Technical Field
The present application relates to the field of vehicle data processing, and in particular, to a data updating method, apparatus, device, and storage medium.
Background
With the development of the automobile manufacturing industry, various sensors are installed on different hardware parts of a vehicle to acquire data generated during the driving process of the vehicle, and a vehicle travel calculation system installed in the vehicle acquires and stores the data acquired by the sensors on the vehicle.
After the journey is finished, when a user driving the vehicle needs to check the journey data of the vehicle in the journey, the vehicle journey calculation system calculates the journey data by using the stored data, and as the running time of the vehicle in the journey is longer and longer, the data collected by the sensors stored in the database is more, so that the more time consumed for calculating the journey data is, the longer the waiting time of the user is.
Disclosure of Invention
In view of this, embodiments of the present application provide a data updating method, apparatus, device, and storage medium, which are beneficial to reducing time consumption of travel data calculation, so as to reduce waiting time of a user.
Mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a data updating method, where the method includes:
acquiring driving data sent by a target vehicle according to a preset period in the driving process;
judging whether a first difference value of the driving data and historical driving data acquired in a previous period on a specified attribute is smaller than or equal to a first preset threshold value, wherein the specified attribute comprises the time for generating the driving data;
if the first difference is smaller than or equal to the first preset threshold, judging whether the driving data comprises first target driving data, wherein the first target driving data comprises a driving event, a driving distance, driving behaviors and driving duration of the target vehicle;
if the driving data comprises the first target driving data, for each first target driving data, updating a first data statistical record of the first target driving data in a previous period according to the first target driving data, wherein the first data statistical record of the first target driving data in the previous period is obtained by updating a first data statistical record of the first historical target driving data in the first period according to first historical target driving data obtained in the previous period, the first historical target driving data has the same attribute with the first target driving data, and the first period is adjacent to and earlier than the previous period.
Optionally, if the first difference is smaller than or equal to the first preset threshold, the method further includes:
judging whether the driving data comprises second target driving data or not, wherein the second target driving data comprises the position of the target vehicle;
if the driving data comprises the second target driving data, judging whether a second difference value between the second target driving data and second historical driving data obtained in the previous period is smaller than or equal to a second preset threshold value, wherein the second historical driving data and the second target driving data have the same attribute;
and if the second difference is smaller than or equal to the second preset threshold, updating a second data statistical record of the second target driving data in the previous period according to the second target driving data, wherein the second data statistical record of the second target driving data in the previous period is obtained by updating a second data statistical record of the second historical target driving data in the first period according to the second historical target driving data.
Optionally, the method further includes:
acquiring driving data sent by the target vehicle in a second period;
judging whether a third difference value of the driving data sent in the second period and the historical driving data acquired in the first period on the specified attribute is smaller than or equal to a first preset threshold value or not;
if the third difference is smaller than or equal to the first preset threshold, judging whether the driving data sent in the second period includes third target driving data, and if the driving data sent in the second period includes the third target driving data, obtaining a third data statistical record by counting the third target driving data and third history target driving data acquired in the first period for each third target driving data, wherein the third target driving data includes a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle, and the third history target driving data and the third target driving data have the same attribute;
if the third difference is smaller than or equal to the first preset threshold, judging whether the driving data sent in the second period includes fourth target driving data, if the driving data sent in the second period includes the fourth target driving data, judging whether a fourth difference between the fourth target driving data and fourth historical target driving data obtained in the first period is smaller than or equal to a third preset threshold, and if the fourth difference is smaller than or equal to the third preset threshold, obtaining a fourth data statistical record by counting the fourth target driving data and the fourth historical target driving data, wherein the fourth target driving data includes the position of the target vehicle, and the fourth historical target driving data and the fourth target driving data have the same attribute.
Optionally, if the first difference is smaller than or equal to the first preset threshold, the method further includes:
judging whether the driving data comprise fifth target driving data or not, wherein the fifth target driving data comprise the speed of the target vehicle;
if the driving data comprises the fifth target driving data, judging whether a fifth difference value between the fifth target driving data and fifth historical target driving data acquired in the previous period is smaller than or equal to a fourth preset threshold value, wherein the fifth historical target driving data and the fifth target driving data have the same attribute;
if the fifth difference is smaller than or equal to the fourth preset threshold, analyzing the driving state of the target vehicle in the current period according to the fifth target driving data and a fifth data statistical record of the fifth target driving data in the previous period, wherein the fifth data statistical record comprises fifth target driving data acquired by the target vehicle in each period before the current period;
and updating the corresponding times of the running state in the running process.
Optionally, if the first difference is greater than the first preset threshold, the method further includes:
caching the driving data in a first database;
judging whether the first database has candidate driving data with the difference value of the historical driving data on the specified attribute smaller than or equal to the first preset threshold value;
if the candidate driving data exist in the first database, taking the candidate driving data as the driving data to be processed;
judging whether the driving data to be processed comprises sixth target driving data or not, if the driving data to be processed comprises the sixth target driving data, updating a first data statistical record with the same attribute as the sixth target driving data according to the sixth target driving data aiming at each sixth target driving data, wherein the sixth target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle;
judging whether the driving data to be processed comprises seventh target driving data or not, if the driving data to be processed comprises the seventh target driving data, judging whether a sixth difference value between the seventh target driving data and the second historical target driving data is smaller than or equal to a second preset threshold value or not, and if the sixth difference value is smaller than or equal to the second preset threshold value, updating a second data statistical record with the same attribute as the seventh target driving data according to the seventh target driving data, wherein the seventh target driving data comprises the position of the target vehicle;
judging whether the to-be-processed driving data comprises eighth target driving data or not, if the to-be-processed driving data comprises the eighth target driving data, judging whether a seventh difference value between the eighth target driving data and fifth historical target driving data is smaller than or equal to a fourth preset threshold value or not, if the seventh difference value is smaller than or equal to the fourth preset threshold value, analyzing the driving state of the target vehicle in the current period according to the seventh target driving data and the fifth data statistical record, and updating the corresponding times of the driving state in the driving process, wherein the fifth target driving data comprises the speed of the target vehicle.
Optionally, if the candidate driving data does not exist in the first database, the method further includes:
adding a label used for representing a screening condition after the first data statistical record, wherein the screening condition is that the difference value of the screening condition and the historical driving data on the designated attribute is smaller than or equal to the first preset threshold value;
and when the selected driving data meeting the screening condition is acquired, taking the selected driving data as the driving data to be processed.
Optionally, the target difference includes the second difference or the fifth difference, the target preset threshold includes the second preset threshold or the fourth preset threshold, and if the target difference is greater than the target preset threshold, the method includes:
when the target difference is the second difference, the target preset threshold is the second preset threshold, and the second target driving data is changed according to the second data statistical record and the driving data which is acquired in the next period and has the same attribute as the second target driving data;
and when the target difference is the fifth difference, the target preset threshold is the fourth preset threshold, and the fifth target driving data is changed according to the fifth data statistical record and the driving data which is acquired in the next period and has the same attribute as the fifth target driving data.
In a second aspect, an embodiment of the present application provides a data updating apparatus, including:
the first acquisition module is used for acquiring driving data sent by a target vehicle according to a preset period in the driving process;
the first judging module is used for judging whether a first difference value of the driving data and historical driving data acquired in a previous period on a specified attribute is smaller than or equal to a first preset threshold value, wherein the specified attribute comprises the time for generating the driving data;
the second judgment module is used for judging whether the driving data comprises first target driving data or not if the first difference is smaller than or equal to the first preset threshold, wherein the first target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle;
and if the driving data includes the first target driving data, for each first target driving data, according to the first target driving data, updating a first data statistical record of the first target driving data in a previous period, where the first data statistical record of the first target driving data in the previous period is obtained by updating a first data statistical record of the first historical target driving data in the first period according to first historical target driving data obtained in the previous period, the first historical target driving data has the same attribute as the first target driving data, and the first period is adjacent to the previous period and is earlier than the previous period.
Optionally, if the first difference is smaller than or equal to the first preset threshold, the second determining module is further configured to:
judging whether the driving data comprises second target driving data or not, wherein the second target driving data comprises the position of the target vehicle;
if the driving data comprises the second target driving data, judging whether a second difference value between the second target driving data and second historical driving data obtained in the previous period is smaller than or equal to a second preset threshold value, wherein the second historical driving data and the second target driving data have the same attribute;
and if the second difference is smaller than or equal to the second preset threshold, updating a second data statistical record of the second target driving data in the previous period according to the second target driving data, wherein the second data statistical record of the second target driving data in the previous period is obtained by updating a second data statistical record of the second historical target driving data in the first period according to the second historical target driving data.
Optionally, the data updating apparatus further includes:
the second acquisition module is used for acquiring the driving data sent by the target vehicle in a second period;
the third judging module is used for judging whether a third difference value of the driving data sent in the second period and the historical driving data acquired in the first period on the specified attribute is smaller than or equal to the first preset threshold value or not;
the first statistical module is configured to determine whether the driving data sent in the second period includes third target driving data if the third difference is smaller than or equal to the first preset threshold, and obtain a third data statistical record by, for each third target driving data, performing statistics on the third target driving data and third history target driving data obtained in the first period if the driving data sent in the second period includes the third target driving data, where the third target driving data includes a driving event, a driving distance, a driving behavior, and a driving duration of the target vehicle, and the third history target driving data and the third target driving data have the same attribute;
a second statistical module, configured to determine whether the driving data sent in the second period includes fourth target driving data if the third difference is smaller than or equal to the first preset threshold, determine whether a fourth difference between the fourth target driving data and fourth historical target driving data obtained in the first period is smaller than or equal to a third preset threshold if the driving data sent in the second period includes the fourth target driving data, and if the fourth difference is smaller than or equal to the third preset threshold, obtaining a fourth data statistical record by counting the fourth target driving data and the fourth historical target driving data, the fourth target driving data comprises the position of the target vehicle, and the fourth historical target driving data and the fourth target driving data have the same attribute.
Optionally, if the first difference is smaller than or equal to the first preset threshold, the second determining module is further configured to:
judging whether the driving data comprise fifth target driving data or not, wherein the fifth target driving data comprise the speed of the target vehicle;
if the driving data comprises the fifth target driving data, judging whether a fifth difference value between the fifth target driving data and fifth historical target driving data acquired in the previous period is smaller than or equal to a fourth preset threshold value, wherein the fifth historical target driving data and the fifth target driving data have the same attribute;
if the fifth difference is smaller than or equal to the fourth preset threshold, analyzing the driving state of the target vehicle in the current period according to the fifth target driving data and a fifth data statistical record of the fifth target driving data in the previous period, wherein the fifth data statistical record comprises fifth target driving data acquired by the target vehicle in each period before the current period;
and updating the corresponding times of the running state in the running process.
Optionally, if the first difference is greater than the first preset threshold, the second determining module is further configured to:
caching the driving data in a first database;
judging whether the first database has candidate driving data with the difference value of the historical driving data on the specified attribute smaller than or equal to the first preset threshold value;
if the candidate driving data exist in the first database, taking the candidate driving data as the driving data to be processed;
judging whether the driving data to be processed comprises sixth target driving data or not, if the driving data to be processed comprises the sixth target driving data, updating a first data statistical record with the same attribute as the sixth target driving data according to the sixth target driving data aiming at each sixth target driving data, wherein the sixth target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle;
judging whether the driving data to be processed comprises seventh target driving data or not, if the driving data to be processed comprises the seventh target driving data, judging whether a sixth difference value between the seventh target driving data and the second historical target driving data is smaller than or equal to a second preset threshold value or not, and if the sixth difference value is smaller than or equal to the second preset threshold value, updating a second data statistical record with the same attribute as the seventh target driving data according to the seventh target driving data, wherein the seventh target driving data comprises the position of the target vehicle;
judging whether the to-be-processed driving data comprises eighth target driving data or not, if the to-be-processed driving data comprises the eighth target driving data, judging whether a seventh difference value between the eighth target driving data and fifth historical target driving data is smaller than or equal to a fourth preset threshold value or not, if the seventh difference value is smaller than or equal to the fourth preset threshold value, analyzing the driving state of the target vehicle in the current period according to the seventh target driving data and the fifth data statistical record, and updating the corresponding times of the driving state in the driving process, wherein the fifth target driving data comprises the speed of the target vehicle.
Optionally, if the candidate driving data does not exist in the first database, the second determining module is further configured to:
adding a label used for representing a screening condition after the first data statistical record, wherein the screening condition is that the difference value of the screening condition and the historical driving data on the designated attribute is smaller than or equal to the first preset threshold value;
and when the selected driving data meeting the screening condition is acquired, taking the selected driving data as the driving data to be processed.
Optionally, the target difference includes the second difference or the fifth difference, the target preset threshold includes the second preset threshold or the fourth preset threshold, and if the target difference is greater than the target preset threshold, the data updating apparatus further includes:
the first changing module is used for changing the second target driving data according to the second data statistical record and the driving data which is acquired in the next period and has the same attribute with the second target driving data, wherein the target preset threshold is the second preset threshold when the target difference is the second difference;
and the second changing module is used for changing the fifth target driving data according to the fifth data statistical record and the driving data which is acquired in the next period and has the same attribute with the fifth target driving data, wherein the target preset threshold is the fourth preset threshold when the target difference is the fifth difference.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the data updating method described in any one of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the data updating method in any one of the first aspect.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
according to the data updating method provided by the embodiment of the application, when the target vehicle sends the driving data acquired in the current period to the cloud computing platform, whether the driving data is valid or not needs to be judged, the subsequent computation can be performed when the driving data is valid, and the meaningless computation performed by using invalid driving data is avoided, namely: whether a first difference value of the driving data and historical driving data acquired in a previous period on a designated attribute is smaller than or equal to a first preset threshold value or not needs to be judged, if the first difference value is smaller than or equal to the first preset threshold value, it is indicated that the driving data is valid, then it is determined that the driving data includes first target driving data, so as to update a first data statistical record corresponding to the first target driving data according to the first target driving data for the first target driving data included in each driving data, after a current stroke is finished, driving data transmitted by a target vehicle in a last period is acquired, under the condition that the driving data transmitted in the last period is valid, a first data statistical record corresponding to a penultimate period is updated by using the driving data transmitted in the last period, and the updated first data statistical record is stroke data of the target vehicle in the current stroke, when a user driving the target vehicle needs to check the travel data of the target vehicle in the current travel, compared with the method for obtaining the travel data of the target vehicle in the current travel by using a large amount of stored data in the prior art, the data updating method in the application can obtain the travel data of the target vehicle in the current travel by using only two pieces of data, the calculation speed of the travel data is high, the influence of the travel time is avoided, the time consumption of travel data calculation is reduced, and the waiting time of the user is reduced.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flow chart illustrating a data updating method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram illustrating a data updating apparatus according to a second embodiment of the present application;
fig. 3 shows a schematic structural diagram of a computer device provided in a third embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Embodiments of the present application provide a data updating method, an apparatus, a device, and a storage medium, which are described below by way of embodiments.
Example one
Fig. 1 is a flowchart illustrating a data updating method provided in an embodiment of the present application, where as shown in fig. 1, the method includes the following steps:
step S101: and acquiring the driving data sent by the target vehicle according to a preset period in the driving process.
Specifically, the target vehicle is started to be flamed out, the target vehicle transmits driving data acquired in the current period to the mobile base station through the communication terminal according to a preset period so as to send the driving data to the cloud computing platform, and the cloud computing platform acquires the driving data, wherein the preset period refers to a time interval for sending the driving data, which is set in advance manually, such as: setting 1s to send driving data once, wherein the driving data refers to vehicle terminal data which can be collected by a target vehicle, the driving data comprises data such as the altitude, the oil consumption, the speed, the position, the driving time, the driving distance, the ignition event, the flameout event, the brake event, the driving behavior and the like of the target vehicle, each piece of acquired driving data exists in the form of the time when the driving data corresponds to the driving data, the target vehicle sends the driving data through an MQTT (Message Queuing Telemetry Transport) Internet of things protocol, after the driving data are sent to the cloud computing platform, the data in the cloud computing platform are stored by adopting a kafka distributed message queue, and the big data real-time computing engine is used for operating the driving data on the cloud computing platform, so that the speed and the safety of processing the driving data are improved.
Step S102: and judging whether a first difference value of the driving data and the historical driving data acquired in the previous period on a specified attribute is smaller than or equal to a first preset threshold value, wherein the specified attribute comprises the time for generating the driving data.
Specifically, after the driving data is acquired, the driving data exists in a form of a time when the driving data is generated corresponding to the driving data, so that the time when the driving data is generated can be acquired, when the specified attribute is the time when the driving data is generated, a first difference between the time corresponding to the driving data and the time of historical driving data is calculated, and after the first difference is calculated, whether the first difference is smaller than or equal to a first preset threshold value or not is judged, wherein the historical driving data refers to the driving data sent to the cloud computing platform by the target vehicle in a previous period, the previous period is adjacent to the current period and is earlier than the current period, and the first preset threshold value is equal to an interval between the two adjacent periods.
Step S103: if the first difference is smaller than or equal to the first preset threshold, judging whether the driving data comprises first target driving data, wherein the first target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle.
Specifically, if the first difference is less than or equal to a first preset threshold, it is determined that the acquired data is driving data of the target vehicle in the current period, a subsequent statistical calculation operation may be performed according to the driving data, to determine whether the driving data includes first target data, in other words, which first target data is included in the driving data, the first target data not included in the driving data is first target data that is not acquired by the target vehicle or is lost in the transmission process of the target vehicle, the driving event of the target vehicle includes driving events such as an ignition event of the target vehicle, a flameout event of the target vehicle, and a braking event of the target vehicle, and the driving distance of the target vehicle is a total driving distance of the target vehicle from purchase to present, and the driving behavior of the target vehicle includes fastening/unfastening a safety belt, turning on/off a turn signal lamp, and the like, Driving behavior such as turning on/off night lights, and the driving time period of the subject vehicle refers to the total driving time period of the subject vehicle from purchase to the present.
Step S104: if the driving data comprises the first target driving data, for each first target driving data, updating a first data statistical record of the first target driving data in a previous period according to the first target driving data, wherein the first data statistical record of the first target driving data in the previous period is obtained by updating a first data statistical record of the first historical target driving data in the first period according to first historical target driving data obtained in the previous period, the first historical target driving data has the same attribute with the first target driving data, and the first period is adjacent to and earlier than the previous period.
Specifically, for each first target driving data included in the driving data, a first data statistical record is updated according to the first target driving data, before the first data statistical record is updated, the first data statistical record is obtained, the obtained first data statistical record is obtained after the first data statistical record of a first period is updated according to a first historical target driving record, the first historical target driving record refers to data which is obtained in a previous period and has the same attribute with the first target driving record, in other words, the data has the same meaning, the previous period is adjacent to the current period and is earlier than the current period, and the first period is adjacent to the previous period and is earlier than the previous period, for example: the cycle sequence is the third second, the fourth second and the fifth second, when the current cycle is the fifth second, the last cycle is the fourth second, and the first cycle is the third second.
It should be noted that, for different first target driving data, if corresponding first data statistical records are different, the manner of updating the first data statistical record corresponding to the first target driving data is also different, when the first target driving data is a driving event, the first data statistical record corresponding to the driving event is the number of times of occurrence of the driving event in the current trip, and the updating manner corresponding to the driving event is to add one to the number of times of occurrence of the driving event; when the first target driving data is driving behavior, the first data statistics record corresponding to the driving behavior is the frequency of the driving behavior in the current journey, and the updating mode corresponding to the driving behavior is to add one to the frequency of the driving behavior; when the first target driving data is driving distance, the first data statistics record corresponding to the driving distance is the driving distance of the target vehicle in the current trip, and the updating mode corresponding to the driving distance is that the driving distance is used for subtracting the corresponding historical driving distance when the vehicle is started; when the first target driving data is driving duration, the first data statistics record corresponding to the driving distance is the driving duration of the target vehicle in the current travel, and the updating mode corresponding to the driving duration is that the driving duration is used to subtract the historical driving duration corresponding to the vehicle starting.
According to the data updating method provided by the first drawing, when the target vehicle sends the driving data acquired in the current period to the cloud computing platform, whether the driving data is valid needs to be judged, and the subsequent computation can be performed when the driving data is valid, so that the invalid driving data is prevented from being used for performing meaningless computation, namely: whether a first difference value of the driving data and historical driving data acquired in a previous period on a designated attribute is smaller than or equal to a first preset threshold value or not needs to be judged, if the first difference value is smaller than or equal to the first preset threshold value, it is indicated that the driving data is valid, then it is determined that the driving data includes first target driving data, so as to update a first data statistical record corresponding to the first target driving data according to the first target driving data for the first target driving data included in each driving data, after a current stroke is finished, driving data transmitted by a target vehicle in a last period is acquired, under the condition that the driving data transmitted in the last period is valid, a first data statistical record corresponding to a penultimate period is updated by using the driving data transmitted in the last period, and the updated first data statistical record is stroke data of the target vehicle in the current stroke, when a user driving the target vehicle needs to check the travel data of the target vehicle in the current travel, compared with the method for obtaining the travel data of the target vehicle in the current travel by using a large amount of stored data in the prior art, the data updating method in the application can obtain the travel data of the target vehicle in the current travel by using only two pieces of data, the calculation speed of the travel data is high, the influence of the travel time is avoided, the time consumption of travel data calculation is reduced, and the waiting time of the user is reduced.
In a possible embodiment, if the first difference is smaller than or equal to the first preset threshold, the data updating method may further include:
step S201: and judging whether the driving data comprises second target driving data or not, wherein the second target driving data comprises the position of the target vehicle.
Step S202: and if the driving data comprises the second target driving data, judging whether a second difference value between the second target driving data and second historical driving data acquired in the previous period is smaller than or equal to a second preset threshold value, wherein the second historical driving data and the second target driving data have the same attribute.
Step S203: and if the second difference is smaller than or equal to the second preset threshold, updating a second data statistical record of the second target driving data in the previous period according to the second target driving data, wherein the second data statistical record of the second target driving data in the previous period is obtained by updating a second data statistical record of the second historical target driving data in the first period according to the second historical target driving data.
Specifically, if the first difference is less than or equal to a first preset threshold, it is further required to determine whether the driving data includes second target driving data, where the second target driving data includes a position of the target vehicle acquired in a current period, and the position of the target vehicle is used as second target driving data for explanation, and the second historical target driving data has the same attribute as the second target driving data, so that when the second target driving data is the position of the target vehicle in the current period, the second historical target driving data is the position of the target vehicle in the previous period, and the second data statistics is the statistics result of the second driving data acquired in each period before the current period, so when the second target driving data is the position of the target vehicle in the current period, the second data statistics is the driving trajectory of the target vehicle in the ending current period, therefore, the manner of updating the second data statistical record of the previous period is to supplement the acquired position of the target vehicle of the current period to the trajectory obtained in the previous period, and for the manner of updating the second data statistical record of the first period, the manner of updating the second data statistical record of the previous period is referred to, and is not described herein again.
When the driving data comprises the position of the target vehicle, the position of the target vehicle acquired by the cloud computing platform in the previous period is acquired, the distance between the two positions is calculated, the calculated distance is used as a second difference value, after the second difference value is obtained, whether the second difference value is smaller than or equal to a second preset threshold value is judged, the second preset threshold value is smaller than or equal to the maximum distance which the target vehicle can travel in the adjacent period interval, and when the second difference value is smaller than or equal to the second preset threshold value, the second data statistical record is updated according to the position of the target vehicle in the current period.
In a possible embodiment, the data updating method further comprises the following steps:
step S301: and acquiring the driving data sent by the target vehicle in the second period.
Step S302: and judging whether a third difference value of the driving data sent in the second period and the historical driving data acquired in the first period on the specified attribute is smaller than or equal to the first preset threshold value.
Specifically, when the target vehicle is started, the target vehicle starts to send data, the cloud computing platform obtains driving data sent by the target vehicle in a first period, and in a next period of the first period, the data are: in the second period, the cloud computing platform obtains the driving data sent by the target vehicle in the second period, then calculates a third difference between the driving data sent in the second period and the historical driving data obtained in the first period on the specified attribute, and after obtaining the third difference, determines that the third difference is smaller than or equal to the first preset threshold, and refers to the explanation of the step S102 for the calculation mode of the third difference and the explanation of the judgment mode according to the third difference, which is not described herein again.
Step S303: if the third difference is smaller than or equal to the first preset threshold, judging whether the driving data sent in the second period includes third target driving data, and if the driving data sent in the second period includes the third target driving data, obtaining a third data statistical record by counting the third target driving data and third history target driving data acquired in the first period for each third target driving data, wherein the third target driving data includes a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle, and the third history target driving data and the third target driving data have the same attribute.
Specifically, for the description of the third target driving data, the description of the first target driving data is referred to, and is not repeated here, and for the relationship between the third history target driving data and the third target driving data, the relationship between the first history target driving data and the first target driving data is referred to, and is not repeated here.
It should be noted that, for the statistical manner of the third data statistical record, for different third target driving data, if the corresponding third data statistical records are different, the manner of obtaining the third data statistical record is also different, when the third target driving data is a driving event, the third data statistical record corresponding to the driving event is the number of times of occurrence of the driving event in the current trip, and the manner of obtaining the third data statistical record corresponding to the driving event is to add one to the number of times of occurrence of the driving event; when the third target driving data is driving behavior, the third data statistical record corresponding to the driving behavior is the frequency of the driving behavior in the current trip, and the mode of obtaining the third data statistical record corresponding to the driving behavior is to add one to the frequency of the driving behavior; when the third target driving data is the driving distance, the third data statistical record corresponding to the driving distance is the driving distance of the target vehicle in the current trip, and the mode of obtaining the third data statistical record corresponding to the driving distance is that the historical driving distance of the target vehicle obtained in the first period is subtracted from the driving distance; when the third target driving data is driving duration, the third data statistical record corresponding to the driving distance is the driving duration of the target vehicle in the current trip, and the mode of obtaining the third data statistical record corresponding to the driving duration is that the historical driving duration of the target vehicle obtained in the first period is subtracted from the driving duration.
Step S304: if the third difference is smaller than or equal to the first preset threshold, judging whether the driving data sent in the second period includes fourth target driving data, if the driving data sent in the second period includes the fourth target driving data, judging whether a fourth difference between the fourth target driving data and fourth historical target driving data obtained in the first period is smaller than or equal to a third preset threshold, and if the fourth difference is smaller than or equal to the third preset threshold, obtaining a fourth data statistical record by counting the fourth target driving data and the fourth historical target driving data, wherein the fourth target driving data includes the position of the target vehicle, and the fourth historical target driving data and the fourth target driving data have the same attribute.
Specifically, for the description of the fourth target driving data, the description of the second target driving data is referred to, and is not repeated here, and for the relationship between the fourth historical target driving data and the fourth target driving data, the relationship between the second historical target driving data and the second target driving data is referred to, and is not repeated here, and for the description of the third preset threshold, the description of the second preset threshold is referred to, and is not repeated here, where the third preset threshold may be equal to the second preset threshold, or may not be equal to the second preset threshold.
In the statistical method of the fourth statistical data record, when the fourth target traveling data is the position of the target vehicle in the second period, the fourth statistical data record is the traveling locus of the target vehicle in the first period to the second period, so that the traveling locus of the target vehicle is configured by using the position of the target vehicle acquired in the first period and the position of the target vehicle acquired in the second period to obtain the fourth statistical data record.
In a possible embodiment, if the first difference is smaller than or equal to the first preset threshold, the data updating method may further include:
step S401: and judging whether the driving data comprises fifth target driving data or not, wherein the fifth target driving data comprises the speed of the target vehicle.
Step S402: and if the driving data comprises the fifth target driving data, judging whether a fifth difference value between the fifth target driving data and fifth historical driving data acquired in the previous period is smaller than or equal to a fourth preset threshold value, wherein the fifth historical driving data and the fifth target driving data have the same attribute.
Step S403: and if the fifth difference is smaller than or equal to the fourth preset threshold, analyzing the driving state of the target vehicle in the current period according to the fifth target driving data and a fifth data statistical record of the fifth target driving data in the previous period, wherein the fifth data statistical record comprises fifth target driving data acquired by the target vehicle in each period before the current period.
Step S404: and updating the corresponding times of the running state in the running process.
Specifically, if the first difference is less than or equal to a first preset threshold, it is further required to determine whether the driving data includes fifth target driving data, where the fifth target driving data includes a speed of the target vehicle acquired in a current period, and the speed of the target vehicle is used as fifth target driving data for explanation, where fifth historical target driving data has the same attribute as the fifth target driving data, so that when the fifth target driving data is the speed of the target vehicle acquired in the current period, the fifth historical target driving data is the speed of the target vehicle acquired in a previous period, a fourth preset threshold is less than or equal to a maximum speed difference that can be achieved by the target vehicle in an interval of an adjacent period, and a fifth data statistical record includes fifth target driving data acquired in each period before the current period, so that when the fifth target driving data is a set of speeds of the target vehicle acquired in each period before the current period, a set of speeds of the target vehicle acquired in each period before the current period is further required to be judged And (6) mixing.
When the fifth target driving data is the speed of the target vehicle acquired in the current period, calculating the acceleration of the target vehicle in the current period and each period before the current period according to the speed of the target vehicle acquired in the current period and the set of speeds of the target vehicle acquired in each period before the current period, judging the driving state of the target vehicle in the current period according to the variation condition of each calculated acceleration, wherein the driving state of the target vehicle comprises constant-speed driving, acceleration, deceleration, turning and the like, and after the driving state of the target vehicle is obtained, adding one to the corresponding times of the driving state in the current driving process.
In another possible embodiment, the number of times the driving behavior is updated is displayed.
In a possible embodiment, if the first difference is greater than the first preset threshold, the data updating method may further include:
step S501: and caching the driving data in a first database.
Step S502: and judging whether the first database has the candidate driving data with the difference value of the historical driving data on the specified attribute smaller than or equal to the first preset threshold value.
Step S503: and if the candidate driving data exist in the first database, taking the candidate driving data as the driving data to be processed.
Step S504: and judging whether the driving data to be processed comprises sixth target driving data or not, if so, updating a first data statistical record with the same attribute as the sixth target driving data according to the sixth target driving data aiming at each sixth target driving data, wherein the sixth target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle.
Step S505: and judging whether the driving data to be processed comprises seventh target driving data, if the driving data to be processed comprises the seventh target driving data, judging whether a sixth difference value between the seventh target driving data and the second historical target driving data is smaller than or equal to a second preset threshold, and if the sixth difference value is smaller than or equal to the second preset threshold, updating a second data statistical record with the same attribute as the seventh target driving data according to the seventh target driving data, wherein the seventh target driving data comprises the position of the target vehicle.
Step S506: judging whether the to-be-processed driving data comprises eighth target driving data or not, if the to-be-processed driving data comprises the eighth target driving data, judging whether a seventh difference value between the eighth target driving data and fifth historical target driving data is smaller than or equal to a fourth preset threshold value or not, if the seventh difference value is smaller than or equal to the fourth preset threshold value, analyzing the driving state of the target vehicle in the current period according to the seventh target driving data and the fifth data statistical record, and updating the corresponding times of the driving state in the driving process, wherein the fifth target driving data comprises the speed of the target vehicle.
Specifically, the first difference is greater than a first preset threshold, which indicates that the driving data acquired in the current period and the historical driving data acquired in the previous period are not adjacent driving data, the driving data is cached in a first database, and then whether a difference between each driving data stored in the first database except the driving data and the historical driving data on a specified attribute is smaller than or equal to the first preset threshold is respectively judged, so as to determine unique candidate driving data, which have a difference with the historical driving data on the specified attribute smaller than or equal to the first preset threshold, and then the candidate driving data is used as to-be-processed data, where the to-be-processed data is driving data adjacent to the historical driving data acquired in the previous period and has a period later than the previous period.
It should be noted that after the to-be-processed data is obtained, the operation in step S504 needs to be performed on the to-be-processed step, and for the description of the relevant operation in step S504, reference is made to the description in step S103 to step S104, where for the description of the sixth target driving data, reference is made to the description of the first target driving data, and details are not repeated herein; after the data to be processed is obtained, the operation in step S505 needs to be performed on the step to be processed, and for the description of the relevant operation in step S505, reference is made to the description in step S201 to step S203, where for the description of the seventh target driving data, reference is made to the description of the second target driving data, which is not described again here; after the data to be processed is obtained, the operation in step S506 needs to be performed on the step to be processed, and for the description of the relevant operation in step S506, reference is made to the description in step S401 to step S404, where for the description of the eighth target driving data, reference is made to the description of the fifth target driving data, and details are not repeated here.
In a possible embodiment, if the candidate driving data does not exist in the first database, the data updating method may further include:
step S601: and adding a label used for representing a screening condition after the first data statistical record, wherein the screening condition is that the difference value of the screening condition and the historical driving data on the specified attribute is less than or equal to the first preset threshold value.
Step S602: and when the selected driving data meeting the screening condition is acquired, taking the selected driving data as the driving data to be processed.
Specifically, if no candidate driving data is found in the first database, it is described that driving data that is adjacent to the historical driving data acquired in the previous period and has a period later than the previous period is not yet sent to the cloud computing platform, so that a tag needs to be added after the first data statistical record, where the tag represents a screening condition for the required driving data, when the driving data is acquired in each period after the current period, whether the driving data meets the screening condition is determined according to the screening condition, and if a selected driving data meeting the screening condition is found, the selected driving data is used as the driving data to be processed, so as to perform the operations in the steps S504 to S506.
In a possible embodiment, the target difference includes the second difference or the fifth difference, the target preset threshold includes the second preset threshold or the fourth preset threshold, and if the target difference is greater than the target preset threshold, the data updating method further includes:
and when the target difference is the second difference, the target preset threshold is the second preset threshold, and the second target driving data is changed according to the second data statistical record and the driving data which is acquired in the next period and has the same attribute as the second target driving data.
And when the target difference is the fifth difference, the target preset threshold is the fourth preset threshold, and the fifth target driving data is changed according to the fifth data statistical record and the driving data which is acquired in the next period and has the same attribute as the fifth target driving data.
Specifically, if a second difference between the second target driving data and the second historical driving data is greater than a second preset threshold, which indicates that the second target driving data is wrong, the second target driving data is cached, when the driving data with the same attribute as the second target driving data is acquired in the next period, the second target driving data is changed according to a second data statistical record and the driving data with the same attribute as the second target driving data acquired in the next period, so that the second difference between the second target driving data and the second historical driving data is less than or equal to a second preset threshold, if the second difference cannot be corrected, and discarding the second target driving data, and replacing the second target driving data with the alternative driving data which has a second difference value with the second historical target driving data smaller than or equal to a second preset threshold and has the highest similarity with the second target driving data.
And explaining a correction mode of second target driving data by taking the position of a target vehicle as an example, wherein a second data statistical record (driving track) is displayed on an A expressway, driving data with the same attribute as the second target driving data acquired in the next period is also on the A expressway, the second target driving data is position coordinates on a path beside the A expressway, and the second target driving data is changed into position coordinates on the A expressway and close to the driving track.
If the fifth difference value between the fifth target driving data and the fifth historical driving data is larger than the fourth preset threshold value, which indicates that the fifth target driving data is wrong, the fifth target driving data is cached, when the driving data with the same attribute as the fifth target driving data is acquired in the next period, the fifth target driving data is changed according to a fifth data statistical record and the driving data with the same attribute as the fifth target driving data acquired in the next period, so that the fifth difference between the fifth target driving data and the fifth historical driving data is less than or equal to the fourth preset threshold, if the fifth target driving data cannot be corrected, and discarding the fifth target driving data, and replacing the fifth target driving data with the alternative driving data which has a fifth difference value with the fifth historical target driving data smaller than or equal to a fourth preset threshold and has the highest similarity with the fifth target driving data.
And explaining a correction mode of the fifth target driving data by taking the speed of the target vehicle as an example, wherein the fifth data statistics record is speed 5, speed 5 and speed 5, the driving data which is acquired in the next period and has the same attribute as the fifth target driving data is also speed 5, the fifth target driving data is speed 30, and if the fifth target driving data is not regular, the fifth target driving data is corrected to speed 5.
In another possible implementation scheme, the updated data statistics records of the current period are displayed, and when a help-seeking request sent by the target vehicle is received, the data statistics records are sent to the monitoring system, so that a worker can conveniently log in the monitoring system to check and provide help.
In another possible implementation, if the first difference is greater than the first preset threshold, or the target difference is greater than the target preset threshold, the processing may be performed through measures such as a time window, a message time trigger, and a message watermark, so as to solve the problems of message disorder, trip waiting, and the like.
In another possible implementation, if the first difference is smaller than or equal to a first preset threshold, it is determined whether the driving data includes ninth target driving data, and if the driving data includes the ninth target driving data, the ninth target driving data included in the driving data is displayed, where the ninth target driving data includes data of altitude, oil consumption, and the like of the target vehicle.
In another possible implementation, if the driving data includes second target driving data, according to a target position of the target vehicle in the current period included in the second target driving data, first data including a weather condition and a road condition of an area to which the target position belongs is acquired; and displaying the first data.
In another possible implementation, the first target driving data includes at least one driving behavior, and for each driving behavior, whether the driving behavior meets a preset vehicle driving behavior specification is determined; and if not, deducting the driving behavior according to a deduction fine rule table preset for the driving standard of the vehicle.
In another feasible implementation scheme, the driving data sent by the target vehicle acquired in each period is stored, so that after the vehicle is shut down, each data statistical record is verified according to the stored driving data, and in addition, each data statistical record updated in the current period is stored, so that a user can trace back a historical record.
Example two
Fig. 2 is a schematic structural diagram of a data updating apparatus according to a second embodiment of the present application, and as shown in fig. 2, the data updating apparatus includes:
the first obtaining module 201 is configured to obtain driving data sent by a target vehicle according to a preset period in a driving process;
the first judging module 202 is configured to judge whether a first difference between the driving data and historical driving data acquired in a previous period in a specified attribute is smaller than or equal to a first preset threshold, where the specified attribute includes time for generating the driving data;
the second determining module 203 is configured to determine whether the driving data includes first target driving data if the first difference is smaller than or equal to the first preset threshold, where the first target driving data includes a driving event, a driving distance, a driving behavior, and a driving duration of the target vehicle;
the updating module 204 is configured to update, for each first target driving data, a first data statistical record of the first target driving data in a previous period according to the first target driving data if the driving data includes the first target driving data, where the first data statistical record of the first target driving data in the previous period is obtained by updating a first data statistical record of the first historical target driving data in the first period according to a first historical target driving data obtained in the previous period, the first historical target driving data has the same attribute as the first target driving data, and the first period is adjacent to and earlier than the previous period.
In a possible implementation manner, if the first difference is smaller than or equal to the first preset threshold, the second determining module 203 is further configured to:
judging whether the driving data comprises second target driving data or not, wherein the second target driving data comprises the position of the target vehicle;
if the driving data comprises the second target driving data, judging whether a second difference value between the second target driving data and second historical driving data obtained in the previous period is smaller than or equal to a second preset threshold value, wherein the second historical driving data and the second target driving data have the same attribute;
and if the second difference is smaller than or equal to the second preset threshold, updating a second data statistical record of the second target driving data in the previous period according to the second target driving data, wherein the second data statistical record of the second target driving data in the previous period is obtained by updating a second data statistical record of the second historical target driving data in the first period according to the second historical target driving data.
In a possible embodiment, the data updating apparatus further includes:
the second acquisition module is used for acquiring the driving data sent by the target vehicle in a second period;
the third judging module is used for judging whether a third difference value of the driving data sent in the second period and the historical driving data acquired in the first period on the specified attribute is smaller than or equal to the first preset threshold value or not;
the first statistical module is configured to determine whether the driving data sent in the second period includes third target driving data if the third difference is smaller than or equal to the first preset threshold, and obtain a third data statistical record by, for each third target driving data, performing statistics on the third target driving data and third history target driving data obtained in the first period if the driving data sent in the second period includes the third target driving data, where the third target driving data includes a driving event, a driving distance, a driving behavior, and a driving duration of the target vehicle, and the third history target driving data and the third target driving data have the same attribute;
a second statistical module, configured to determine whether the driving data sent in the second period includes fourth target driving data if the third difference is smaller than or equal to the first preset threshold, determine whether a fourth difference between the fourth target driving data and fourth historical target driving data obtained in the first period is smaller than or equal to a third preset threshold if the driving data sent in the second period includes the fourth target driving data, and if the fourth difference is smaller than or equal to the third preset threshold, obtaining a fourth data statistical record by counting the fourth target driving data and the fourth historical target driving data, the fourth target driving data comprises the position of the target vehicle, and the fourth historical target driving data and the fourth target driving data have the same attribute.
In a possible implementation manner, if the first difference is smaller than or equal to the first preset threshold, the second determining module 203 is further configured to:
judging whether the driving data comprise fifth target driving data or not, wherein the fifth target driving data comprise the speed of the target vehicle;
if the driving data comprises the fifth target driving data, judging whether a fifth difference value between the fifth target driving data and fifth historical target driving data acquired in the previous period is smaller than or equal to a fourth preset threshold value, wherein the fifth historical target driving data and the fifth target driving data have the same attribute;
if the fifth difference is smaller than or equal to the fourth preset threshold, analyzing the driving state of the target vehicle in the current period according to the fifth target driving data and a fifth data statistical record of the fifth target driving data in the previous period, wherein the fifth data statistical record comprises fifth target driving data acquired by the target vehicle in each period before the current period;
and updating the corresponding times of the running state in the running process.
In a possible implementation manner, if the first difference is greater than the first preset threshold, the second determining module 203 is further configured to:
caching the driving data in a first database;
judging whether the first database has candidate driving data with the difference value of the historical driving data on the specified attribute smaller than or equal to the first preset threshold value;
if the candidate driving data exist in the first database, taking the candidate driving data as the driving data to be processed;
judging whether the driving data to be processed comprises sixth target driving data or not, if the driving data to be processed comprises the sixth target driving data, updating a first data statistical record with the same attribute as the sixth target driving data according to the sixth target driving data aiming at each sixth target driving data, wherein the sixth target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle;
judging whether the driving data to be processed comprises seventh target driving data or not, if the driving data to be processed comprises the seventh target driving data, judging whether a sixth difference value between the seventh target driving data and the second historical target driving data is smaller than or equal to a second preset threshold value or not, and if the sixth difference value is smaller than or equal to the second preset threshold value, updating a second data statistical record with the same attribute as the seventh target driving data according to the seventh target driving data, wherein the seventh target driving data comprises the position of the target vehicle;
judging whether the to-be-processed driving data comprises eighth target driving data or not, if the to-be-processed driving data comprises the eighth target driving data, judging whether a seventh difference value between the eighth target driving data and fifth historical target driving data is smaller than or equal to a fourth preset threshold value or not, if the seventh difference value is smaller than or equal to the fourth preset threshold value, analyzing the driving state of the target vehicle in the current period according to the seventh target driving data and the fifth data statistical record, and updating the corresponding times of the driving state in the driving process, wherein the fifth target driving data comprises the speed of the target vehicle.
In a possible implementation, if the candidate driving data does not exist in the first database, the second determining module 203 is further configured to:
adding a label used for representing a screening condition after the first data statistical record, wherein the screening condition is that the difference value of the screening condition and the historical driving data on the designated attribute is smaller than or equal to the first preset threshold value;
and when the selected driving data meeting the screening condition is acquired, taking the selected driving data as the driving data to be processed.
In a possible implementation, the target difference includes the second difference or the fifth difference, the target preset threshold includes the second preset threshold or the fourth preset threshold, and if the target difference is greater than the target preset threshold, the data updating apparatus further includes:
the first changing module is used for changing the second target driving data according to the second data statistical record and the driving data which is acquired in the next period and has the same attribute with the second target driving data, wherein the target preset threshold is the second preset threshold when the target difference is the second difference;
and the second changing module is used for changing the fifth target driving data according to the fifth data statistical record and the driving data which is acquired in the next period and has the same attribute with the fifth target driving data, wherein the target preset threshold is the fourth preset threshold when the target difference is the fifth difference.
The apparatus provided in the embodiments of the present application may be specific hardware on a device, or software or firmware installed on a device, etc. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
According to the data updating method provided by the embodiment of the application, when the target vehicle sends the driving data acquired in the current period to the cloud computing platform, whether the driving data is valid or not needs to be judged, the subsequent computation can be performed when the driving data is valid, and the meaningless computation performed by using invalid driving data is avoided, namely: whether a first difference value of the driving data and historical driving data acquired in a previous period on a designated attribute is smaller than or equal to a first preset threshold value or not needs to be judged, if the first difference value is smaller than or equal to the first preset threshold value, it is indicated that the driving data is valid, then it is determined that the driving data includes first target driving data, so as to update a first data statistical record corresponding to the first target driving data according to the first target driving data for the first target driving data included in each driving data, after a current stroke is finished, driving data transmitted by a target vehicle in a last period is acquired, under the condition that the driving data transmitted in the last period is valid, a first data statistical record corresponding to a penultimate period is updated by using the driving data transmitted in the last period, and the updated first data statistical record is stroke data of the target vehicle in the current stroke, when a user driving the target vehicle needs to check the travel data of the target vehicle in the current travel, compared with the method for obtaining the travel data of the target vehicle in the current travel by using a large amount of stored data in the prior art, the data updating method in the application can obtain the travel data of the target vehicle in the current travel by using only two pieces of data, the calculation speed of the travel data is high, the influence of the travel time is avoided, the time consumption of travel data calculation is reduced, and the waiting time of the user is reduced.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a computer device provided in a third embodiment of the present application, and as shown in fig. 3, the device includes a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302, where the processor 302 implements the data updating method when executing the computer program.
Specifically, the memory 301 and the processor 302 can be general memories and processors, which are not limited to the specific embodiments, and when the processor 302 runs the computer program stored in the memory 301, the data updating method can be executed, so that the problems that the calculation of the trip data in the prior art consumes much time and the waiting time of the user is long are solved.
Example four
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the data updating method.
Specifically, the storage medium can be a general storage medium, such as a removable disk, a hard disk, and the like, and when a computer program on the storage medium is run, the data updating method can be executed, so that the problems that in the prior art, the calculation of the travel data consumes much time, and the waiting time of a user is long are solved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for updating data, the method comprising:
acquiring driving data sent by a target vehicle according to a preset period in the driving process;
judging whether a first difference value of the driving data and historical driving data acquired in a previous period on a specified attribute is smaller than or equal to a first preset threshold value, wherein the specified attribute comprises the time for generating the driving data;
if the first difference is smaller than or equal to the first preset threshold, judging whether the driving data comprises first target driving data, wherein the first target driving data comprises a driving event, a driving distance, driving behaviors and driving duration of the target vehicle;
if the driving data comprises the first target driving data, for each first target driving data, updating a first data statistical record of the first target driving data in a previous period according to the first target driving data, wherein the first data statistical record of the first target driving data in the previous period is obtained by updating a first data statistical record of the first historical target driving data in the first period according to first historical target driving data obtained in the previous period, the first historical target driving data has the same attribute with the first target driving data, and the first period is adjacent to and earlier than the previous period.
2. The method of claim 1, wherein if the first difference is less than or equal to the first predetermined threshold, the method further comprises:
judging whether the driving data comprises second target driving data or not, wherein the second target driving data comprises the position of the target vehicle;
if the driving data comprises the second target driving data, judging whether a second difference value between the second target driving data and second historical driving data obtained in the previous period is smaller than or equal to a second preset threshold value, wherein the second historical driving data and the second target driving data have the same attribute;
and if the second difference is smaller than or equal to the second preset threshold, updating a second data statistical record of the second target driving data in the previous period according to the second target driving data, wherein the second data statistical record of the second target driving data in the previous period is obtained by updating a second data statistical record of the second historical target driving data in the first period according to the second historical target driving data.
3. The method of claim 1 or claim 2, further comprising:
acquiring driving data sent by the target vehicle in a second period;
judging whether a third difference value of the driving data sent in the second period and the historical driving data acquired in the first period on the specified attribute is smaller than or equal to a first preset threshold value or not;
if the third difference is smaller than or equal to the first preset threshold, judging whether the driving data sent in the second period includes third target driving data, and if the driving data sent in the second period includes the third target driving data, obtaining a third data statistical record by counting the third target driving data and third history target driving data acquired in the first period for each third target driving data, wherein the third target driving data includes a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle, and the third history target driving data and the third target driving data have the same attribute;
if the third difference is smaller than or equal to the first preset threshold, judging whether the driving data sent in the second period includes fourth target driving data, if the driving data sent in the second period includes the fourth target driving data, judging whether a fourth difference between the fourth target driving data and fourth historical target driving data obtained in the first period is smaller than or equal to a third preset threshold, and if the fourth difference is smaller than or equal to the third preset threshold, obtaining a fourth data statistical record by counting the fourth target driving data and the fourth historical target driving data, wherein the fourth target driving data includes the position of the target vehicle, and the fourth historical target driving data and the fourth target driving data have the same attribute.
4. The method of claim 1, wherein if the first difference is less than or equal to the first predetermined threshold, the method further comprises:
judging whether the driving data comprise fifth target driving data or not, wherein the fifth target driving data comprise the speed of the target vehicle;
if the driving data comprises the fifth target driving data, judging whether a fifth difference value between the fifth target driving data and fifth historical target driving data acquired in the previous period is smaller than or equal to a fourth preset threshold value, wherein the fifth historical target driving data and the fifth target driving data have the same attribute;
if the fifth difference is smaller than or equal to the fourth preset threshold, analyzing the driving state of the target vehicle in the current period according to the fifth target driving data and a fifth data statistical record of the fifth target driving data in the previous period, wherein the fifth data statistical record comprises fifth target driving data acquired by the target vehicle in each period before the current period;
and updating the corresponding times of the running state in the running process.
5. The method of claim 1, claim 2 or claim 4, wherein if the first difference is greater than the first predetermined threshold, the method further comprises:
caching the driving data in a first database;
judging whether the first database has candidate driving data with the difference value of the historical driving data on the specified attribute smaller than or equal to the first preset threshold value;
if the candidate driving data exist in the first database, taking the candidate driving data as the driving data to be processed;
judging whether the driving data to be processed comprises sixth target driving data or not, if the driving data to be processed comprises the sixth target driving data, updating a first data statistical record with the same attribute as the sixth target driving data according to the sixth target driving data aiming at each sixth target driving data, wherein the sixth target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle;
judging whether the driving data to be processed comprises seventh target driving data or not, if the driving data to be processed comprises the seventh target driving data, judging whether a sixth difference value between the seventh target driving data and the second historical target driving data is smaller than or equal to a second preset threshold value or not, and if the sixth difference value is smaller than or equal to the second preset threshold value, updating a second data statistical record with the same attribute as the seventh target driving data according to the seventh target driving data, wherein the seventh target driving data comprises the position of the target vehicle;
judging whether the to-be-processed driving data comprises eighth target driving data or not, if the to-be-processed driving data comprises the eighth target driving data, judging whether a seventh difference value between the eighth target driving data and fifth historical target driving data is smaller than or equal to a fourth preset threshold value or not, if the seventh difference value is smaller than or equal to the fourth preset threshold value, analyzing the driving state of the target vehicle in the current period according to the seventh target driving data and the fifth data statistical record, and updating the corresponding times of the driving state in the driving process, wherein the fifth target driving data comprises the speed of the target vehicle.
6. The method of claim 5, wherein if the candidate trip data does not exist in the first database, the method further comprises:
adding a label used for representing a screening condition after the first data statistical record, wherein the screening condition is that the difference value of the screening condition and the historical driving data on the designated attribute is smaller than or equal to the first preset threshold value;
and when the selected driving data meeting the screening condition is acquired, taking the selected driving data as the driving data to be processed.
7. The method of claim 2 or claim 4, wherein a target difference comprises the second difference or the fifth difference, a target preset threshold comprises the second preset threshold or the fourth preset threshold, and if the target difference is greater than the target preset threshold, the method comprises:
when the target difference is the second difference, the target preset threshold is the second preset threshold, and the second target driving data is changed according to the second data statistical record and the driving data which is acquired in the next period and has the same attribute as the second target driving data;
and when the target difference is the fifth difference, the target preset threshold is the fourth preset threshold, and the fifth target driving data is changed according to the fifth data statistical record and the driving data which is acquired in the next period and has the same attribute as the fifth target driving data.
8. A data update apparatus, comprising:
the first acquisition module is used for acquiring driving data sent by a target vehicle according to a preset period in the driving process;
the first judging module is used for judging whether a first difference value of the driving data and historical driving data acquired in a previous period on a specified attribute is smaller than or equal to a first preset threshold value, wherein the specified attribute comprises the time for generating the driving data;
the second judgment module is used for judging whether the driving data comprises first target driving data or not if the first difference is smaller than or equal to the first preset threshold, wherein the first target driving data comprises a driving event, a driving distance, a driving behavior and a driving duration of the target vehicle;
and if the driving data includes the first target driving data, for each first target driving data, according to the first target driving data, updating a first data statistical record of the first target driving data in a previous period, where the first data statistical record of the first target driving data in the previous period is obtained by updating a first data statistical record of the first historical target driving data in the first period according to first historical target driving data obtained in the previous period, the first historical target driving data has the same attribute as the first target driving data, and the first period is adjacent to the previous period and is earlier than the previous period.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of the preceding claims 1-7 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of the preceding claims 1 to 7.
CN202110232154.3A 2021-03-02 2021-03-02 Data updating method, device, equipment and storage medium Active CN112948407B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110232154.3A CN112948407B (en) 2021-03-02 2021-03-02 Data updating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110232154.3A CN112948407B (en) 2021-03-02 2021-03-02 Data updating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112948407A true CN112948407A (en) 2021-06-11
CN112948407B CN112948407B (en) 2024-01-23

Family

ID=76247234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110232154.3A Active CN112948407B (en) 2021-03-02 2021-03-02 Data updating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112948407B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023125837A1 (en) * 2021-12-31 2023-07-06 深圳云天励飞技术股份有限公司 Device state monitoring method and apparatus, computer device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160275796A1 (en) * 2015-03-19 2016-09-22 Hyundai Motor Company Vehicle, server and vehicle monitoring system having the same
CN106294463A (en) * 2015-06-01 2017-01-04 阿里巴巴集团控股有限公司 The data point update method of a kind of performance graph and equipment
CN110909006A (en) * 2019-10-15 2020-03-24 中国平安人寿保险股份有限公司 Data synchronization method and device, computer equipment and storage medium
CN111243266A (en) * 2018-11-29 2020-06-05 杭州海康威视数字技术股份有限公司 Vehicle information determination method and device and electronic equipment
CN111352793A (en) * 2018-12-24 2020-06-30 中移(杭州)信息技术有限公司 Method and device for monitoring application use data
CN111679302A (en) * 2020-05-28 2020-09-18 北京百度网讯科技有限公司 Vehicle positioning method, device, electronic equipment and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160275796A1 (en) * 2015-03-19 2016-09-22 Hyundai Motor Company Vehicle, server and vehicle monitoring system having the same
CN106294463A (en) * 2015-06-01 2017-01-04 阿里巴巴集团控股有限公司 The data point update method of a kind of performance graph and equipment
CN111243266A (en) * 2018-11-29 2020-06-05 杭州海康威视数字技术股份有限公司 Vehicle information determination method and device and electronic equipment
CN111352793A (en) * 2018-12-24 2020-06-30 中移(杭州)信息技术有限公司 Method and device for monitoring application use data
CN110909006A (en) * 2019-10-15 2020-03-24 中国平安人寿保险股份有限公司 Data synchronization method and device, computer equipment and storage medium
CN111679302A (en) * 2020-05-28 2020-09-18 北京百度网讯科技有限公司 Vehicle positioning method, device, electronic equipment and computer storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023125837A1 (en) * 2021-12-31 2023-07-06 深圳云天励飞技术股份有限公司 Device state monitoring method and apparatus, computer device and storage medium

Also Published As

Publication number Publication date
CN112948407B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
EP2157406B1 (en) Driving evaluation system and driving evaluation method
US20170103101A1 (en) System for database data quality processing
CN110784825B (en) Method and device for generating vehicle running track
CN106170826A (en) The monitoring method and system of cab-getter's number
CN112258837B (en) Vehicle early warning method, related device, equipment and storage medium
JP2010039920A (en) Safe driving evaluation system and safe driving evaluation program
CN113611104B (en) Risk identification method and device for freight vehicle, storage medium and terminal
US20190243633A1 (en) Vehicular communication system
CN112948407A (en) Data updating method, device, equipment and storage medium
CN113257039A (en) Driving early warning method and device based on big data analysis
CN113673815A (en) Mine car scheduling method and device based on vehicle data processing
CN111898624B (en) Method, device, equipment and storage medium for processing positioning information
CN110602233B (en) Information monitoring method and device and computer storage medium
US11881064B2 (en) Technologies for determining driver efficiency
CN115547106A (en) Road information early warning method, system, electronic equipment and storage medium
CN111824138A (en) Vehicle collision avoidance method, apparatus and computer readable storage medium
CN112686415B (en) Method and device for monitoring network taxi appointment behaviors
CN114683857A (en) Method for recording actual driving mileage of automobile
CN114863715A (en) Parking data determination method and device, electronic equipment and storage medium
CN114199274A (en) Vehicle travel determining method, device and equipment and readable storage medium
US11346980B2 (en) Precipitation index estimation apparatus
CN111524389A (en) Vehicle driving method and device
CN111693295A (en) Journey analysis method and device based on vehicle engine state
CN111242668A (en) Information processing apparatus, information processing method, and non-transitory storage medium
CN112734144A (en) Driving behavior evaluation method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant