CN110610557A - Data sampling method and device - Google Patents

Data sampling method and device Download PDF

Info

Publication number
CN110610557A
CN110610557A CN201910860003.5A CN201910860003A CN110610557A CN 110610557 A CN110610557 A CN 110610557A CN 201910860003 A CN201910860003 A CN 201910860003A CN 110610557 A CN110610557 A CN 110610557A
Authority
CN
China
Prior art keywords
data
sampled
sampling
event
current execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910860003.5A
Other languages
Chinese (zh)
Inventor
王凤君
董旭
李宝环
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongsoft Ruichi Automotive Technology (shenyang) Co Ltd
Neusoft Reach Automotive Technology Shenyang Co Ltd
Original Assignee
Dongsoft Ruichi Automotive Technology (shenyang) 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 Dongsoft Ruichi Automotive Technology (shenyang) Co Ltd filed Critical Dongsoft Ruichi Automotive Technology (shenyang) Co Ltd
Priority to CN201910860003.5A priority Critical patent/CN110610557A/en
Publication of CN110610557A publication Critical patent/CN110610557A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C5/00Registering or indicating the working of vehicles
    • G07C5/08Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
    • G07C5/0841Registering performance data

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The application discloses a data sampling method and device, after data to be sampled at the current moment is obtained, whether the data to be sampled is target data or not is judged firstly, so that when the data to be sampled is determined to be the target data, the data to be sampled is sampled, and the sampling data at the current moment is obtained. When the ECU adopts the data sampling method to sample data, the data to be sampled is only sampled when the data to be sampled is target data, so that the sampling frequency and the sampling data quantity of the ECU are reduced, the system overhead of the ECU during data sampling and the system overhead of the ECU during processing of the sampled data are reduced, and the data processing performance of the ECU is improved. Based on the above, when the ECU performs data sampling by using the data sampling method, the data processing performance of the ECU can be improved without changing the structure of the ECU, and the cost for improving the data processing performance of the ECU is reduced.

Description

Data sampling method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data sampling method and apparatus.
Background
With the development of smart vehicles, the number of functions provided by the vehicles is increasing, which results in a rapid increase in data generated by the vehicles per Unit time, and thus the amount of data that needs to be processed by an Electronic Control Unit (ECU) per Unit time is increasing rapidly. Therefore, in order to ensure that the ECU can perform data processing in a timely manner, the data processing performance of the ECU is increasingly required.
Currently, in order to improve the data processing performance of an ECU, it is generally necessary to improve the structure of the ECU so that the ECU with the improved structure can process a large amount of data per unit time. However, in order to improve the structure of the ECU, it is generally necessary to modify the structure of the old ECU, add new components to the old ECU, or replace the old ECU with the new ECU having the modified structure, and these modifications all require a high cost, and therefore, when the data processing performance of the ECU is improved by using the modified ECU, the high cost is required, and the cost for improving the data processing performance of the ECU is high.
Disclosure of Invention
In order to solve the technical problems in the prior art, the application provides a data sampling method and a data sampling device, which improve the data processing performance of the ECU by adjusting the data sampling mode without changing the structure of the ECU, thereby reducing the cost for improving the data processing performance of the ECU.
In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:
the embodiment of the application provides a data sampling method, which comprises the following steps:
acquiring data to be sampled at the current moment;
when the data to be sampled is determined to be target data, sampling the data to be sampled to obtain sampled data at the current moment; the target data comprises demand data of a current execution event or data meeting preset conditions or demand data of the current execution event meeting the preset conditions.
Optionally, the preset condition specifically includes: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
Optionally, the preset condition specifically includes:
and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
Optionally, the current execution event includes at least one of an abnormality detection event, an abnormality cause analysis event, an operating state analysis event of the associated device, and a function implementation event of the associated device.
Optionally, if the target data includes demand data of a current execution event or demand data of a current execution event that meets a preset condition, the method further includes:
acquiring a current execution event;
determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event;
and determining the target data according to the demand data of the current execution event.
An embodiment of the present application further provides a data sampling apparatus, including:
the data acquisition unit is used for acquiring data to be sampled at the current moment;
the data sampling unit is used for sampling the data to be sampled when the data to be sampled is determined to be target data, so as to obtain sampling data at the current moment; the target data comprises demand data of a current execution event or data meeting preset conditions or demand data of the current execution event meeting the preset conditions.
Optionally, the preset condition specifically includes: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
Optionally, the preset condition specifically includes:
and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
Optionally, the current execution event includes at least one of an abnormality detection event, an abnormality cause analysis event, an operating state analysis event of the associated device, and a function implementation event of the associated device.
Optionally, if the target data includes demand data of a current execution event or demand data of a current execution event that meets a preset condition, the apparatus further includes:
the event acquisition unit is used for acquiring a current execution event;
the first determining unit is used for determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event;
and the second determining unit is used for determining the target data according to the demand data of the current execution event.
An embodiment of the present application further provides an apparatus, where the apparatus includes a processor and a memory:
the memory is used for storing a computer program;
the processor is configured to execute any of the embodiments of the data sampling method provided above according to the computer program.
An embodiment of the present application further provides a computer-readable storage medium, which is used for storing a computer program, where the computer program is used for executing any implementation of the data sampling method provided above.
Compared with the prior art, the embodiment of the application has at least the following advantages:
in the data sampling method provided by the embodiment of the application, after the data to be sampled at the current moment is acquired, whether the data to be sampled is the target data is judged first, so that when the data to be sampled is determined to be the target data, the data to be sampled is sampled, and the sampled data at the current moment is acquired. The process of judging whether the data to be sampled is the target data is the required data of the current execution event, the data meeting the preset conditions or the required data of the current execution event meeting the preset conditions. Based on this, in the embodiment of the application, the data to be sampled is sampled only when the data to be sampled is determined to be the required data of the current execution event, the data meeting the preset condition, or the required data of the current execution event meeting the preset condition, so that the sampling times of data sampling are reduced, the system overhead caused by data sampling is reduced, and the system can process the data more quickly. In addition, in the embodiment of the application, along with the reduction of the sampling times, the data volume of the sampled data obtained by sampling is also reduced, so that the data volume during subsequent data processing is reduced, and the system can further process the data more quickly. Therefore, when the ECU adopts the data sampling method to perform data sampling, the data to be sampled is only sampled when the data to be sampled is the target data, so that the ECU sampling frequency and the sampling data volume are reduced, the system overhead of the ECU during data sampling and the system overhead of the ECU during processing of the sampled data are reduced, and the data processing performance of the ECU is improved. Based on the above, when the ECU performs data sampling by using the data sampling method, the data processing performance of the ECU can be improved without changing the structure of the ECU, and the cost for improving the data processing performance of the ECU is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a data sampling method provided in an embodiment of the present application;
fig. 2 is a flowchart of a data sampling method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data sampling apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus provided in an embodiment of the present application.
Detailed Description
In order to solve the technical problems in the background art section, the inventors have studied and found that: (1) when sampling data, a data sampling method in a time dimension may be adopted for sampling. Here, the data sampling in the time dimension means sampling at a sampling frequency in time. That is, data sampling in the time dimension means that data sampling is performed every certain time (for example, 1 second). (2) In practical applications, the data changes relatively slowly, so that data closer to time are substantially the same. (3) In practical applications, only when a specific event (e.g., an anomaly detection event) is executed, the requirement data corresponding to the specific event is used.
Based on the above findings, the inventors have further studied and found that: because the data sampling method in the time dimension is to sample according to the sampling frequency, the data sampling process only needs to consider time without considering other factors, and thus the data sampling method in the time dimension is to sample and calculate according to the sampling frequency when a specific event is not executed, thereby increasing the system overhead and further causing the waste of the system overhead. In addition, because the sampling frequency of the data sampling method in the time dimension is higher, the sampling data with similar sampling time is basically the same, so that a large amount of sampling data actually only includes less useful data due to more repeated data in the sampling data, but the system directly processes and analyzes the large amount of sampling data subsequently, so that the system overhead for data sampling is increased, and the waste of the system overhead is caused.
In order to solve technical problems in the background art and technical problems of the data sampling method in the time dimension, an embodiment of the present application provides a data sampling method, in which after data to be sampled at a current time is acquired, it is first determined whether the data to be sampled is target data, so that when it is determined that the data to be sampled is the target data, the data to be sampled is sampled to obtain sampled data at the current time.
In the data sampling method provided in the embodiment of the application, the target data includes the demand data of the current execution event, the data meeting the preset condition, or the demand data of the current execution event meeting the preset condition, and therefore, the process of determining whether the data to be sampled is the target data is to determine whether the data to be sampled is the demand data of the current execution event, the data meeting the preset condition, or the demand data of the current execution event meeting the preset condition. Based on this, in the embodiment of the application, the data to be sampled is sampled only when the data to be sampled is determined to be the required data of the current execution event, the data meeting the preset condition, or the required data of the current execution event meeting the preset condition, so that the sampling times of data sampling are reduced, the system overhead caused by data sampling is reduced, and the system can process the data more quickly. In addition, in the embodiment of the application, along with the reduction of the sampling times, the data volume of the sampled data obtained by sampling is also reduced, so that the data volume during subsequent data processing is reduced, and the system can further process the data more quickly. In addition, in the embodiment of the application, only the data carrying the useful information is sampled, and more repeated sampling data are avoided from appearing in the sampling data, so that the follow-up processing of the repeated sampling data by the system is avoided, the system overhead caused by data sampling is reduced, and the system can process the data more quickly.
Therefore, when the ECU adopts the data sampling method to perform data sampling, the data to be sampled is only sampled when the data to be sampled is the target data, so that the ECU sampling frequency and the sampling data volume are reduced, the system overhead of the ECU during data sampling and the system overhead of the ECU during processing of the sampled data are reduced, and the data processing performance of the ECU is improved. Based on the above, when the ECU performs data sampling by using the data sampling method, the data processing performance of the ECU can be improved without changing the structure of the ECU, and the cost for improving the data processing performance of the ECU is reduced.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Method embodiment one
Referring to fig. 1, the figure is a flowchart of a data sampling method provided in an embodiment of the present application.
The data sampling method provided by the embodiment of the application comprises the following steps of S1-S4:
s1: and acquiring data to be sampled at the current moment.
The data type of the data to be sampled is not limited in the embodiments of the present application, for example, the data to be sampled may include at least one of a voltage value, a pressure difference value, a temperature value, and a temperature difference value.
The embodiment of the present application does not limit the manner of acquiring the data to be sampled, and the data to be sampled may be sent to a device (e.g., an ECU) that executes the data sampling method by a data acquisition device (e.g., a sensor), or may be directly acquired from another device (e.g., a storage device) by the device (e.g., an ECU) that executes the data sampling method. For ease of understanding and explanation, the following description is made in conjunction with examples.
It is assumed that the device performing the data sampling method is an ECU; when the data to be sampled comprises voltage values, the data sent by the voltage sensors are received in a period from 8 points 30 to 10 points 30 in turn0、V1、V2、……、Vn) (ii) a And V is0Is received earlier than V1,V1Is received earlier than V2,……,Vn-1Is received earlier than Vn(ii) a And V isnThe receiving time of (1) is 10 o' clock and 30 min; and 10 points 30 are divided into the current time.
As an example, based on the above assumption, step S1 may specifically be: the ECU receives data (V) to be sampled at the current moment (10 points and 30 minutes) of the voltage sensorn)。
S2: judging whether the data to be sampled is target data, if so, executing step S3; if not, step S4 is executed.
The target data is used for recording data related information needing data sampling; also, the target data may include demand data of a current execution event or data satisfying a preset condition or demand data of a current execution event satisfying a preset condition.
The current execution event refers to a task that is being executed by a device (e.g., an ECU) executing the data sampling method at the current time; furthermore, the present embodiment does not limit the type of the current execution event, for example, the current execution event may include at least one of an abnormality detection event, an abnormality cause analysis event, an operating state analysis event of the associated device, and a function implementation event of the associated device. It should be noted that the "associated device" refers to a device having an association relationship with a device that executes the data sampling method, and the association relationship may be a connection relationship, a communication relationship, or another relationship.
The preset condition is used for recording data condition information capable of driving data sampling to occur; moreover, the preset condition may be preset, and particularly may be set according to an application scenario. For ease of understanding and explanation, the following description is made in conjunction with two examples.
As a first example, the preset conditions may specifically include: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
The historical sample data refers to sample data obtained by sampling before the current time. For example, assume that sampling at 5 points 10 yields first sample data, sampling at 6 points 30 yields second sample data, and sampling at 7 points 45 yields third sample data; and the current time is 10 o' clock and 30 minutes. Based on this assumption, the first sample data, the second sample data, and the third sample data are all historical sample data.
The preset change is a preset change, and can be set according to an application scene. As an example, the preset change means that a change value of the data to be sampled with respect to the sampling data sampled in the sampling process closest to the current time is higher than an average change value between the historical sampling data. For example, assume that sampling at 5 points 10 yields first sample data, sampling at 6 points 30 yields second sample data, and sampling at 7 points 45 yields third sample data; and no data sampling is performed from 7 point 45 to 10 point 30; and the current time is 10 o' clock and 30 minutes. Based on this assumption, the third sample data is sample data sampled in the nearest sampling process from the current time. At this time, the preset variation means that a variation value of the data to be sampled with respect to the third sampling data is higher than an average variation value among the historical sampling data (the first sampling data, the second sampling data, and the third sampling data). The "change value" may be an increase value or a decrease value.
The above is a first example of the preset condition.
As a second example, the preset conditions may specifically include: and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
The preset threshold is preset, and especially can be set according to an application scene. For example, the preset threshold is 0.1V.
Assuming that sampling is carried out at 5 points and 10 minutes to obtain first sampling data, sampling is carried out at 6 points and 30 minutes to obtain second sampling data, and sampling is carried out at 7 points and 45 minutes to obtain third sampling data; and no data sampling is performed from 7 point 45 to 10 point 30; and the current time is 10 o' clock and 30 minutes. Based on this assumption, the third sample data is sample data sampled in the nearest sampling process from the current time. At this time, the preset condition may specifically be: and the difference value between the data to be sampled and the third sampled data reaches a preset threshold value.
The above is a second example of the preset condition.
Based on the above-mentioned current execution event and the related content of the preset condition, the present embodiment further provides three implementation manners of step S2, and the three implementation manners of step S2 are sequentially described below.
As a first implementation manner, if the target data includes the demand data of the currently executed event, step S2 may specifically be: judging whether the data to be sampled is the required data of the current execution event, if so, executing step S3; if not, step S4 is executed.
In this embodiment, after the data to be sampled is acquired, it needs to be determined whether the data to be sampled is the required data of the current execution event. If the data to be sampled is not the required data of the current execution event, the purpose of the sampled data at the current moment is not large, and the sampled data does not need to be sampled; if the sampling data is the demand data of the current execution event, it indicates that the purpose of the sampling data at the current time is large, and the sampling processing needs to be performed on the sampling data at this time.
It should be noted that after determining that the data to be sampled is the demand data of the current execution event, any sampling method may be used for sampling, for example, sampling may be performed by using a data sampling method in a time dimension, or sampling may be performed by using a data sampling method in a data change dimension. The data sampling method in the data change dimension is to perform sampling once only when the data change value reaches a preset change threshold value, so that the difference value between the sampled data obtained in two adjacent sampling processes is greater than or equal to the preset change threshold value.
What has been described above is the relevant content of the first embodiment of step S2.
As a second embodiment, if the target data includes data satisfying the preset condition, step S2 may specifically be: judging whether the data to be sampled is data meeting preset conditions, if so, executing step S3; if not, step S4 is executed.
In this embodiment, after the data to be sampled is acquired, it is necessary to determine whether the data to be sampled is data that satisfies a preset condition. If the data to be sampled is the data meeting the preset conditions, sampling the sampled data; and if the data to be sampled is not the data meeting the preset condition, not sampling the sampled data.
For ease of understanding and explanation, the following description is made in conjunction with examples.
It is assumed that the device performing the data sampling method is an ECU; when the data to be sampled comprises voltage values, the data sent by the voltage sensors are received in a period from 8 points 30 to 10 points 30 in turn0、V1、V2、……、Vn) (ii) a And V is0Is received earlier than V1,V1Is received earlier than V2,……,Vn-1Is received earlier than Vn(ii) a And V isnThe receiving time of (1) is 10 o' clock and 30 min; and 10 points 30 are divided into the current moment; and only at 8 points and 30 time sharing pairs V0Carrying out a data sampling process once to obtain first sampling data; and the preset condition is that the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
As an example, based on the above assumption, step S2 may specifically be: judging data V to be samplednAnd the first sampling data V0Whether the difference value between the two values reaches a preset threshold value is judged, if yes, the step S3 is executed; if not, step S4 is executed.
What has been described above is the relevant content of the second embodiment of step S2.
As a third embodiment, if the target data includes the demand data of the current execution event that meets the preset condition, step S2 may specifically be: judging whether the data to be sampled is the required data of the current execution event meeting the preset conditions, if so, executing the step S3; if not, step S4 is executed.
In this embodiment, after the data to be sampled is acquired, as long as it is determined that the data to be sampled is the demand data of the current execution event that meets the preset condition, the sampling processing is performed on the sampled data.
It should be noted that, in the embodiment of the present application, a specific implementation of the "determining whether the data to be sampled is the requirement data of the current execution event that meets the preset condition" is not limited. For the convenience of understanding and explaining the third embodiment of step S2, the following description is made in conjunction with two examples.
As a first example, if the target data includes the demand data of the current execution event that meets the preset condition, step S2 may specifically be: firstly, judging whether the data to be sampled is the required data of the current execution event, and if the data to be sampled is determined not to be the required data of the current execution event, executing the step S4; if the data to be sampled is determined to be the required data of the current execution event, judging whether the data to be sampled meets a preset condition, and if the data to be sampled meets the preset condition, executing step S3; if it is determined that the data to be sampled is not the data satisfying the preset condition, step S4 is performed.
In this example, after the data to be sampled is acquired, it is first determined whether the data to be sampled is required data of a currently executed event, at this time, if the data to be sampled is not required data of the currently executed event, it indicates that the purpose of the sampled data is not great at the current time, and at this time, the sampled data does not need to be sampled; if the sampled data is the required data of the current execution event, it indicates that the purpose of the sampled data is large at the current time, and at this time, it needs to be further determined whether the data to be sampled is the data meeting the preset condition. If the data to be sampled is the data meeting the preset conditions, sampling the sampled data; and if the data to be sampled is not the data meeting the preset condition, not sampling the sampled data.
In the first example, during execution of the current execution event, as long as it is determined that data to be sampled, which belongs to the demand data of the current execution event, satisfies a preset condition, the data to be sampled is subjected to sampling processing. For example, during the execution of the current execution event, as long as it is determined that a difference value between data to be sampled, which belongs to the demand data of the current execution event, and sampled data obtained by sampling in the sampling process closest to the current time reaches a preset threshold value, the data to be sampled needs to be sampled.
The above is the relevant content of the first example.
As a second example, if the target data includes the demand data of the current execution event that meets the preset condition, step S2 may specifically be: firstly, judging whether the data to be sampled is data meeting preset conditions, and if the data to be sampled is determined not to be the data meeting the preset conditions, executing step S4; if the data to be sampled is determined to be the data meeting the preset conditions, judging whether the data to be sampled is the required data of the current execution event, and if the data to be sampled is determined to be the required data of the current execution event, executing the step S3; if it is determined that the data to be sampled is not the demand data of the current execution event, step S4 is executed.
The above is a specific embodiment of step S2.
S3: and sampling the data to be sampled to obtain the sampled data at the current moment.
In the embodiment of the present application, the sampling data may be partial data to be sampled, or may be all data to be sampled.
S4: the data to be sampled is not sampled.
In the embodiment of the application, after it is determined that the data to be sampled is not the target data, it is determined that the data to be sampled has a small usage at the current time, and the data to be sampled may not be sampled at this time.
It should be noted that, in some cases, after it is determined that the data to be sampled is not the target data, the data to be sampled may also be sampled according to a preset rule, where the preset rule is a rule that can ensure that the number of sampling times is reduced. For example, the preset rule may be that data to be sampled of non-target data is sampled once every preset number of times; the preset rule may also be to sample the data to be sampled of the non-target data at preset time intervals.
In the specific implementation manner of the data sampling method provided above for the method embodiment, after the data to be sampled at the current time is acquired, it is first determined whether the data to be sampled is the target data, so that when it is determined that the data to be sampled is the target data, the data to be sampled is sampled, and the sampling data at the current time is acquired. The process of judging whether the data to be sampled is the target data is the required data of the current execution event, the data meeting the preset conditions or the required data of the current execution event meeting the preset conditions. Based on this, in the embodiment of the application, the data to be sampled is sampled only when the data to be sampled is determined to be the required data of the current execution event, the data meeting the preset condition, or the required data of the current execution event meeting the preset condition, so that the sampling times of data sampling are reduced, the system overhead caused by data sampling is reduced, and the system can process the data more quickly. In addition, in the embodiment of the application, along with the reduction of the sampling times, the data volume of the sampled data obtained by sampling is also reduced, so that the data volume during subsequent data processing is reduced, and the system can further process the data more quickly. In addition, in the embodiment of the application, only the data carrying the useful information is sampled, and more repeated sampling data are avoided from appearing in the sampling data, so that the follow-up processing of the repeated sampling data by the system is avoided, the system overhead caused by data sampling is reduced, and the system can process the data more quickly.
Therefore, when the ECU adopts the data sampling method to perform data sampling, the data to be sampled is only sampled when the data to be sampled is the target data, so that the ECU sampling frequency and the sampling data volume are reduced, the system overhead of the ECU during data sampling and the system overhead of the ECU during processing of the sampled data are reduced, and the data processing performance of the ECU is improved. Based on the above, when the ECU performs data sampling by using the data sampling method, the data processing performance of the ECU can be improved without changing the structure of the ECU, and the cost for improving the data processing performance of the ECU is reduced.
Method embodiment two
Based on the specific implementation of the data sampling method provided in the first embodiment of the method, when the target data includes the demand data of the current execution event or the demand data of the current execution event that meets the preset condition, the current execution event may need to be acquired before the action "determining whether the data to be sampled is the target data" is performed, and thus, as shown in fig. 2, the present embodiment further provides another implementation of the data sampling method, where the data sampling method includes steps S5 to S7 in addition to steps S1 to S4:
s5: and acquiring a current execution event.
The embodiment of the present application does not limit the specific implementation manner of the current execution event, for example, an instruction carrying information of the current execution event may be sent to the device executing the data sampling method according to the device executing the current execution event, so that the device executing the data sampling method can obtain the current execution event from the instruction. In addition, the current execution event can be obtained by analyzing the working state of the device executing the current execution event by the device executing the data sampling method.
S6: and determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event.
The mapping relation between the event and the requirement data is used for recording the mapping relation between the execution event and the requirement data corresponding to the execution event.
In the embodiment of the application, after the current execution event is obtained, the requirement data of the current execution event can be obtained by querying according to the mapping relation between the event and the requirement data, so that the requirement data of the current execution event can be used subsequently to generate the target data.
S7: and determining target data according to the demand data of the current execution event.
In this embodiment of the present application, after the requirement data of the current execution event is obtained, the target data may be determined according to the requirement data of the current execution event, and specifically: if the target data comprises the demand data of the current execution event, directly taking the demand data of the current execution event as the target data; if the target data includes the demand data of the current execution event meeting the preset conditions, the target data needs to be generated according to the demand data of the current execution event and the data meeting the preset conditions after the demand data of the current execution event and the data meeting the preset conditions are obtained.
It should be noted that, in the embodiment of the present application, the execution time of steps S5-S7 is not limited, and the execution is completed before step S2 is executed.
In this embodiment, if the target data includes the requirement data of the current execution event or the requirement data of the current execution event that meets the preset condition, before determining whether the data to be sampled is the target data, the current execution event needs to be obtained first, so as to determine the requirement data of the current execution event according to the current execution event by using the mapping relationship between the event and the requirement data, so as to determine the target data according to the requirement data of the current execution event subsequently. The current execution event is obtained in real time, so that the current execution event can accurately represent the information of the current executing event, and the requirement data determined by the current execution event can accurately represent the requirement of the current executing event on the data.
It should be noted that the embodiments of the present application do not limit the execution subject of the data sampling method provided by the foregoing method embodiments, and the execution subject of the data sampling method provided by the foregoing method embodiments may be, for example, a terminal, a vehicle, or a server. For example, the execution subject of the data sampling method provided by the above method embodiments may be an ECU.
Based on the data sampling method provided by the above method embodiment, the embodiment of the present application further provides a data sampling apparatus, which is described below with reference to an example.
Device embodiment
Please refer to the above method embodiments for technical details of the data sampling apparatus provided in the apparatus embodiments.
Referring to fig. 3, the diagram is a schematic structural diagram of a data sampling apparatus according to an embodiment of the present application.
The data sampling apparatus 30 provided in the embodiment of the present application includes:
a data obtaining unit 31, configured to obtain data to be sampled at a current time;
the data sampling unit 32 is configured to sample the data to be sampled when it is determined that the data to be sampled is target data, so as to obtain sampled data at a current moment; the target data comprises demand data of a current execution event or data meeting preset conditions or demand data of the current execution event meeting the preset conditions.
As an embodiment, in order to reduce the number of sampling times on the basis of ensuring the sampling effect, the preset condition specifically includes: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
As an embodiment, in order to reduce the number of sampling times on the basis of ensuring the sampling effect, the preset condition specifically includes:
and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
As an embodiment, in order to reduce the number of sampling times on the basis of ensuring the sampling effect, the current execution event includes at least one of an abnormality detection event, an abnormality cause analysis event, an operation state analysis event of the associated device, and a function implementation event of the associated device.
As an embodiment, in order to reduce the number of sampling times on the basis of ensuring the sampling effect, if the target data includes the demand data of the current execution event or the demand data of the current execution event meeting the preset condition, the apparatus 30 further includes:
the event acquisition unit is used for acquiring a current execution event;
the first determining unit is used for determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event;
and the second determining unit is used for determining the target data according to the demand data of the current execution event.
In this embodiment, after the data to be sampled at the current time is acquired, it is first determined whether the data to be sampled is the target data, so that when it is determined that the data to be sampled is the target data, the data to be sampled is sampled to obtain the sampling data at the current time. The process of judging whether the data to be sampled is the target data is the required data of the current execution event, the data meeting the preset conditions or the required data of the current execution event meeting the preset conditions. Based on this, in the embodiment of the application, the data to be sampled is sampled only when the data to be sampled is determined to be the required data of the current execution event, the data meeting the preset condition, or the required data of the current execution event meeting the preset condition, so that the sampling times of data sampling are reduced, the system overhead caused by data sampling is reduced, and the system can process the data more quickly. In addition, in the embodiment of the application, along with the reduction of the sampling times, the data volume of the sampled data obtained by sampling is also reduced, so that the data volume during subsequent data processing is reduced, and the system can further process the data more quickly. In addition, in the embodiment of the application, only the data carrying the useful information is sampled, and more repeated sampling data are avoided from appearing in the sampling data, so that the follow-up processing of the repeated sampling data by the system is avoided, the system overhead caused by data sampling is reduced, and the system can process the data more quickly.
Therefore, when the ECU adopts the data sampling method to perform data sampling, the data to be sampled is only sampled when the data to be sampled is the target data, so that the ECU sampling frequency and the sampling data volume are reduced, the system overhead of the ECU during data sampling and the system overhead of the ECU during processing of the sampled data are reduced, and the data processing performance of the ECU is improved. Based on the above, when the ECU performs data sampling by using the data sampling method, the data processing performance of the ECU can be improved without changing the structure of the ECU, and the cost for improving the data processing performance of the ECU is reduced.
The application scenarios of the data sampling device provided in the above device embodiment are not limited to the application scenarios of the data sampling device provided in the above device embodiment, and the application scenarios of the data sampling device provided in the above device embodiment may be, for example, a terminal, a vehicle, and a server. For example, the application scenario of the data sampling apparatus provided by the above apparatus embodiment may be an ECU.
Based on the data sampling method provided by the above method embodiment, the embodiment of the present application further provides a device, which is explained and explained below with reference to the accompanying drawings.
Apparatus embodiment
Please refer to the above method embodiment for the device technical details provided by the device embodiment.
Referring to fig. 4, the figure is a schematic structural diagram of an apparatus provided in the embodiment of the present application.
The device 40 provided by the embodiment of the present application includes: a processor 41 and a memory 42;
the memory 42 is used for storing computer programs;
the processor 41 is configured to execute any implementation of the data sampling method provided by the above method embodiments according to the computer program. That is, processor 41 is configured to perform the following steps:
acquiring data to be sampled at the current moment;
when the data to be sampled is determined to be target data, sampling the data to be sampled to obtain sampled data at the current moment; the target data comprises demand data of a current execution event or data meeting preset conditions or demand data of the current execution event meeting the preset conditions.
Optionally, the preset condition specifically includes: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
Optionally, the preset condition specifically includes:
and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
Optionally, the current execution event includes at least one of an abnormality detection event, an abnormality cause analysis event, an operating state analysis event of the associated device, and a function implementation event of the associated device.
Optionally, if the target data includes demand data of a current execution event or demand data of a current execution event that meets a preset condition, the method further includes:
acquiring a current execution event;
determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event;
and determining the target data according to the demand data of the current execution event.
The above is related to the apparatus 40 provided in the embodiments of the present application.
Based on the data sampling method provided by the method embodiment, the embodiment of the application also provides a computer readable storage medium.
Media embodiments
Media embodiments provide technical details of computer-readable storage media, please refer to method embodiments.
Embodiments of the present application provide a computer-readable storage medium for storing a computer program for executing any implementation of the data sampling method provided by the above method embodiments. That is, the computer program is for performing the steps of:
acquiring data to be sampled at the current moment;
when the data to be sampled is determined to be target data, sampling the data to be sampled to obtain sampled data at the current moment; the target data comprises demand data of a current execution event or data meeting preset conditions or demand data of the current execution event meeting the preset conditions.
Optionally, the preset condition specifically includes: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
Optionally, the preset condition specifically includes:
and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
Optionally, the current execution event includes at least one of an abnormality detection event, an abnormality cause analysis event, an operating state analysis event of the associated device, and a function implementation event of the associated device.
Optionally, if the target data includes demand data of a current execution event or demand data of a current execution event that meets a preset condition, the method further includes:
acquiring a current execution event;
determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event;
and determining the target data according to the demand data of the current execution event.
The above is related to the computer-readable storage medium provided in the embodiments of the present application.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

Claims (12)

1. A method of data sampling, comprising:
acquiring data to be sampled at the current moment;
when the data to be sampled is determined to be target data, sampling the data to be sampled to obtain sampled data at the current moment; the target data comprises demand data of a current execution event or data meeting preset conditions or demand data of the current execution event meeting the preset conditions.
2. The method according to claim 1, wherein the preset condition specifically includes: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
3. The method according to claim 1, wherein the preset condition specifically includes:
and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
4. The method of any one of claims 1 to 3, wherein the current execution event comprises at least one of an anomaly detection event, an anomaly cause analysis event, an operational state analysis event of an associated device, and a function implementation event of an associated device.
5. The method of claim 1, wherein if the target data comprises demand data of a currently executed event or demand data of a currently executed event satisfying a preset condition, the method further comprises:
acquiring a current execution event;
determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event;
and determining the target data according to the demand data of the current execution event.
6. A data sampling apparatus, comprising:
the data acquisition unit is used for acquiring data to be sampled at the current moment;
the data sampling unit is used for sampling the data to be sampled when the data to be sampled is determined to be target data, so as to obtain sampling data at the current moment; the target data comprises demand data of a current execution event or data meeting preset conditions or demand data of the current execution event meeting the preset conditions.
7. The apparatus according to claim 6, wherein the preset condition specifically includes: and the change of the data to be sampled relative to the historical sampling data meets the preset change.
8. The apparatus according to claim 6, wherein the preset condition specifically includes:
and the difference value between the data to be sampled and the sampled data sampled in the sampling process closest to the current moment reaches a preset threshold value.
9. The apparatus according to any one of claims 6 to 8, wherein the current execution event comprises at least one of an anomaly detection event, an anomaly cause analysis event, an operating state analysis event of an associated device, and a function implementation event of an associated device.
10. The apparatus of claim 6, wherein if the target data includes demand data of a currently executed event or demand data of a currently executed event that satisfies a preset condition, the apparatus further comprises:
the event acquisition unit is used for acquiring a current execution event;
the first determining unit is used for determining the demand data of the current execution event by utilizing the mapping relation between the event and the demand data according to the current execution event;
and the second determining unit is used for determining the target data according to the demand data of the current execution event.
11. An apparatus, comprising a processor and a memory:
the memory is used for storing a computer program;
the processor is configured to perform the method of any of claims 1-5 in accordance with the computer program.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program for performing the method of any of claims 1-5.
CN201910860003.5A 2019-09-11 2019-09-11 Data sampling method and device Pending CN110610557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910860003.5A CN110610557A (en) 2019-09-11 2019-09-11 Data sampling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910860003.5A CN110610557A (en) 2019-09-11 2019-09-11 Data sampling method and device

Publications (1)

Publication Number Publication Date
CN110610557A true CN110610557A (en) 2019-12-24

Family

ID=68892683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910860003.5A Pending CN110610557A (en) 2019-09-11 2019-09-11 Data sampling method and device

Country Status (1)

Country Link
CN (1) CN110610557A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371018A (en) * 2015-07-21 2017-02-01 上汽通用汽车有限公司 Cell-terminal-voltage-estimation-based fault diagnosis method and equipment for vehicle power battery
CN106598822A (en) * 2015-10-15 2017-04-26 华为技术有限公司 Abnormal data detection method and device applied to capacity estimation
CN108989408A (en) * 2018-07-03 2018-12-11 安徽江淮汽车集团股份有限公司 A kind of vehicle data transmission method and system
CN109146236A (en) * 2018-07-06 2019-01-04 东软集团股份有限公司 Indexes Abnormality detection method, device, readable storage medium storing program for executing and electronic equipment
CN109163919A (en) * 2018-09-05 2019-01-08 中国科学院上海高等研究院 A kind of mechanical movement fault monitoring system, method, readable storage medium storing program for executing and terminal
CN109766334A (en) * 2019-01-07 2019-05-17 国网湖南省电力有限公司 Processing method and system for electrical equipment online supervision abnormal data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371018A (en) * 2015-07-21 2017-02-01 上汽通用汽车有限公司 Cell-terminal-voltage-estimation-based fault diagnosis method and equipment for vehicle power battery
CN106598822A (en) * 2015-10-15 2017-04-26 华为技术有限公司 Abnormal data detection method and device applied to capacity estimation
CN108989408A (en) * 2018-07-03 2018-12-11 安徽江淮汽车集团股份有限公司 A kind of vehicle data transmission method and system
CN109146236A (en) * 2018-07-06 2019-01-04 东软集团股份有限公司 Indexes Abnormality detection method, device, readable storage medium storing program for executing and electronic equipment
CN109163919A (en) * 2018-09-05 2019-01-08 中国科学院上海高等研究院 A kind of mechanical movement fault monitoring system, method, readable storage medium storing program for executing and terminal
CN109766334A (en) * 2019-01-07 2019-05-17 国网湖南省电力有限公司 Processing method and system for electrical equipment online supervision abnormal data

Similar Documents

Publication Publication Date Title
CN114998695B (en) Method and system for improving image recognition speed
CN111881023B (en) Software aging prediction method and device based on multi-model comparison
US11151475B2 (en) Method and device for generating a machine learning system and virtual sensor device
CN110955591B (en) System performance evaluation method and device, computer equipment and storage medium
CN112486104A (en) Method and device for analyzing equipment abnormity based on real-time acquisition of sensing data
CN106648839B (en) Data processing method and device
CN111198906A (en) Data processing method, device and system and storage medium
CN111231758B (en) Battery capacity estimation method and device, electronic equipment and medium
CN111090593A (en) Method, device, electronic equipment and storage medium for determining crash attribution
CN110855529A (en) Network information security monitoring method, device, server and readable storage medium
US20210390802A1 (en) Method, Computer Program And Device For Processing Signals
CN110610557A (en) Data sampling method and device
CN113472860A (en) Service resource allocation method and server under big data and digital environment
CN112214394A (en) Memory leak detection method, device and equipment
CN111193631B (en) Information processing method, system, and computer-readable storage medium
CN115878980A (en) Steering engine state identification method, device, equipment and storage medium
CN116361631A (en) Method and equipment for detecting time sequence data period, detecting abnormality and scheduling resources
CN113872971B (en) New energy Internet of vehicles communication protocol upgrading method and device and cloud platform
CN113806070B (en) Data management method and device for edge computing and cloud computing
CN115169412A (en) Method and device for determining operation mode, controller and engineering vehicle
CN116148692A (en) Energy storage system control method and device, computer equipment and storage medium
CN114327557A (en) Vehicle OTA (over the air) upgrade time evaluation method and device
CN113946717A (en) Sub-map index feature obtaining method, device, equipment and storage medium
CN112733151A (en) Embedded equipment firmware analysis method, device, medium and electronic equipment
CN115512458B (en) Monitoring data analysis method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191224

RJ01 Rejection of invention patent application after publication