Data loss rate detection method and device, terminal and storage medium
By calculating the data loss rate of the data acquisition equipment of the fuel cell system, filtering effective data points and setting early warning thresholds, the problem that the data acquisition equipment cannot detect data loss is solved, and the detection and timely warning of data acquisition capabilities are realized, and data loss is reduced.
Patent Information
- Application Number
- CN202410105027.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2025-07-25
AI Technical Summary
In existing fuel cell systems, data acquisition equipment cannot detect and deal with data loss and data abnormalities, affecting the efficiency of fault judgment.
By obtaining the number of first effective data points and acquisition time in the data acquisition device, calculate the acquisition interval, calculate the data loss amount and loss rate, set the preset time interval and percentage for early warning, filter the effective data points, and improve the calculation accuracy and early warning reliability.
Effectively detect the data acquisition capabilities of data acquisition equipment, promptly warn, reduce data losses, adapt to different driving environments and system strategies, and improve early warning reliability.
Smart Images

Figure CN120371571A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fuel cells, and particularly to a method for detecting data loss rate. The present invention also relates to a device for detecting data loss rate based on the above method, as well as a terminal and a storage medium capable of implementing the above method. Background Art
[0002] The smooth operation of a fuel cell system and a vehicle depends on the accurate transmission of data. The network topology diagrams of a fuel cell system, a vehicle, and a data acquisition device are as Figure 1 shown. One of the main functions of the controller of a fuel cell system is to collect signal data of various components of the system, such as valves, sensors, etc., and then control the normal operation of the entire fuel cell system through software strategies at the bottom layer and application layer of the controller. At the same time, the controller can also send and receive signals from the vehicle and the fuel cell stack through the CAN line, and respond to requests for voltage, current, and power of the vehicle according to the real-time situation of the fuel cell stack. When a fault occurs in the system, the cause of the fault can be judged by analyzing various signal data sent and received during the operation of the system, and the system problem can be solved.
[0003] It can be seen that the data acquisition device in the system plays a crucial role, and its data acquisition ability directly affects the judgment efficiency of system faults. However, the current data acquisition device in the system only plays the role of data acquisition and cannot detect and handle situations such as data loss and data anomalies. Therefore, how to detect the data acquisition ability of the data acquisition device has become an urgent problem to be solved. Summary of the Invention
[0004] In view of this, the present invention aims to propose a method for detecting data loss rate to detect the data loss rate of a data acquisition device and provide data support for judging whether the acquisition ability of the vehicle-side data acquisition device is sufficient.
[0005] To achieve the above object, the present invention is implemented by the following technical solutions:
[0006] A method for detecting data loss rate, which is applied to a vehicle-side information acquisition device and includes:
[0007] Obtaining the number of first valid data points in the acquisition device and the acquisition time of each first valid data point;
[0008] Calculating the acquisition intervals between each first valid data point based on the acquisition time of each first valid data point;
[0009] Calculating the first data loss amount based on the acquisition intervals between each first valid data point;
[0010] Calculate a first data loss rate based on the first data loss amount and the number of first valid data points.
[0011] Further, calculating the first data loss amount based on the acquisition intervals between the respective first valid data points includes:
[0012] When the acquisition interval between two adjacent first valid data points is greater than a preset time, calculate the number of missing points between the two adjacent first valid data points;
[0013] Add up the number of missing points between all adjacent first valid data points to obtain the first data loss amount.
[0014] Further, calculating the number of missing points between the two adjacent first valid data points includes:
[0015] Calculate the number of missing points between two adjacent first valid data points through α1 = t * Δt - 1; where α1 is the number of missing points between two adjacent first valid data points, t is the acquisition interval between the two adjacent first valid data points, and Δt is the acquisition frequency of the vehicle-end information acquisition device.
[0016] Calculating the first data loss rate based on the first data loss amount and the number of first valid data points includes:
[0017] Further, through calculate the first data loss rate; where σ is the first data loss rate, α is the first data loss amount, and β is the number of first valid data points.
[0018] Further, before obtaining the number of valid data points in the acquisition device and the acquisition time of each first valid data point, the data loss rate detection method further includes:
[0019] Obtain the number of data points in the acquisition device and the acquisition time of each data point;
[0020] Calculate the acquisition interval between each data point based on the acquisition time of each data point;
[0021] Screen the first valid data points based on the acquisition intervals between the respective data points and a first preset time interval.
[0022] Further, screening the first valid data points based on the acquisition intervals between the respective data points and the first preset time interval includes:
[0023] For the current data point, when the acquisition interval between the acquisition time of the current data point and the acquisition time of the previous data point is less than the first preset interval, mark the current data point as the first valid data point; where the current data point is any data point in the acquisition device except the first data point, and the current data point is any data point in the acquisition device except the first data point;
[0024] The first data point in the acquisition device is the first valid data point.
[0025] Further, after calculating the first data loss rate based on the first data loss amount and the number of first valid data points, the data loss rate detection method further includes:
[0026] When the first data loss rate is greater than or equal to the first preset percentage, prompt a warning message;
[0027] When the first data loss rate is less than the first preset percentage, calculate the second data loss rate corresponding to the second preset time interval, and when the second data loss rate is greater than or equal to the second preset percentage, prompt a warning message;
[0028] When the second data loss rate is less than the second preset percentage, calculate the third data loss rate corresponding to the third preset time interval, and when the third data loss rate is greater than or equal to the third preset percentage, prompt a warning message; where the first preset time interval is less than the second preset time interval, and the second preset time interval is less than the third preset time interval.
[0029] The present invention also provides a data loss rate detection device applied to a vehicle - end information acquisition device, including:
[0030] A first data acquisition module, configured to acquire the number of first valid data points in the acquisition device and the acquisition time of each first valid data point;
[0031] A first interval calculation module, configured to calculate the acquisition interval between each first valid data point based on the acquisition time of each first valid data point;
[0032] A loss amount calculation module, configured to calculate the first data loss amount based on the acquisition intervals between each first valid data point;
[0033] A loss rate calculation module, configured to calculate the data loss rate based on the first data loss amount and the number of first valid data points.
[0034] In addition, the present invention also provides a terminal device, comprising: a processor and a memory, wherein a computer program that can run on the processor is stored in the memory, and when the processor executes the computer program, the data loss rate detection method described above is implemented.
[0035] The present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the data loss rate detection method described above is implemented.
[0036] Compared with the prior art, the present invention has the following advantages:
[0037] For the data loss rate detection method of the present invention, the number of first valid data points in the acquisition device and the acquisition time of each first valid data point are obtained, and the acquisition intervals between each first valid data point are calculated. Based on the acquisition intervals, the data loss amount is calculated, and the first data loss rate is calculated, which can effectively detect the data acquisition ability of the data acquisition device, and further provide a detection basis and data support for the timely warning of the data acquisition device and the reduction of data loss.
[0038] In addition, when the acquisition interval between the acquisition time of this data point and the acquisition time of the previous data point is less than the first preset interval, this data point is recorded as the first valid data point, which can screen out invalid data points, and further improve the accuracy of calculating the first data loss rate.
[0039] In addition, three intervals of the first preset time interval, the second preset time interval, and the third preset time interval are sequentially set to screen valid data points, and the corresponding first preset percentage, the first preset percentage, and the third preset percentage are set. When the first data loss rate calculated at the first preset time interval meets the first preset percentage, it is further determined whether the second data loss rate calculated at the second preset time interval meets the second preset percentage. When the first data loss rate calculated at the second preset time interval meets the second preset percentage, it is further determined whether the third data loss rate calculated at the third preset time interval meets the third preset percentage. During the judgment process, when the data loss rate judgment in any interval does not meet the preset percentage, an alarm message is output; only when the data loss rate judgments in all three intervals meet the preset percentage, it is determined that the data acquisition ability of the acquisition device is normal.
[0040] The above method for calculating the data loss rate by dividing intervals can adapt to different driving environments of the vehicle and the operation strategies of the system, and setting an early warning when the data loss rate corresponding to any preset time interval is greater than the corresponding preset percentage can improve the reliability of the early warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which form a part of the present invention, are used to provide a further understanding of the present invention. The schematic embodiments and descriptions thereof are used to explain the present invention and do not unduly limit the present invention. In the drawings:
[0042] Figure 1 It is a schematic network topology diagram of a fuel cell system, a whole vehicle, and a data acquisition device provided by an embodiment of the present invention;
[0043] Figure 2 It is a first flow schematic diagram of a data loss rate detection method provided by an embodiment of the present invention;
[0044] Figure 3 It is a second flow schematic diagram of a data loss rate detection method provided by an embodiment of the present invention;
[0045] Figure 4 It is a third flow schematic diagram of a data loss rate detection method provided by an embodiment of the present invention;
[0046] Figure 5 It is a schematic structural diagram of a data loss rate detection device provided by an embodiment of the present invention;
[0047] Figure 6 It is a schematic structural diagram of a terminal device provided by an embodiment of the present invention.
[0048] Description of reference numerals:
[0049] 501, the first data acquisition module; 502, the first interval calculation module; 503, the loss amount calculation module; 504, the loss rate calculation module;
[0050] 600, the terminal device; 610, the processor; 620, the memory; 621, the computer program. Detailed implementation manners
[0051] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are set forth in order to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary details.
[0052] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0053] It should also be understood that the term "and / or" as used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0054] As used in the specification of this application and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrases "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" depending on the context.
[0055] In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0056] The reference to "one embodiment" or "some embodiments" etc. described in the specification of this application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0057] The present invention will be described in detail below with reference to the drawings and in conjunction with embodiments.
[0058] Embodiment 1
[0059] This embodiment relates to a data loss rate detection method, which is applied to vehicle-end information acquisition devices, and as Figure 2 shown, the data loss rate detection method includes:
[0060] Step S100, obtaining the number of first valid data points in the acquisition device and the acquisition time of each first valid data point.
[0061] In this step S100, the acquisition device can be selected according to the actual usage scenario. For example, a TBOX (data acquisition device) can be used to acquire various signals of a vehicle. During the use of this data acquisition device, taking 0:00 as the start node and ending at 23:59:59 every day, every 24 hours is used as a calculation cycle. After the data acquisition for each day is completed, the number of the first valid data points in the acquisition device and the acquisition time of each first valid data point are obtained to calculate the first data loss rate.
[0062] It should be noted that during the acquisition process, when the system shuts down and powers off, the data acquisition device will follow the system to shut down due to power failure; when the system powers on again, the data acquisition device will reconnect and continue to acquire data. Therefore, affected by the operating environment of the acquisition device and the system settings, the acquisition device will acquire invalid data. If the invalid data is also incorporated into the calculation of the data loss rate, it will affect the accuracy of the calculation. Therefore, in this embodiment, the number of the first valid data points in the acquisition device and the acquisition time of each first valid data point are obtained to reduce the interference of invalid data points on the subsequent calculation process and improve the accuracy of the calculation.
[0063] Step S200: Calculate the acquisition intervals between each of the first valid data points based on the acquisition times of the first valid data points.
[0064] In this step S200, after obtaining the acquisition times of each of the first valid data points in the acquisition device, the acquisition intervals between adjacent first valid data points can be calculated pairwise according to the acquisition times of the current first valid data point and the next first valid data point.
[0065] Step S300: Calculate the first data loss amount based on the acquisition intervals between each of the first valid data points.
[0066] In this step S300, when the acquisition interval between two adjacent first valid data points is greater than the acquisition frequency of the acquisition device, it can be considered that there are missing points between these two first valid data points. At this time, the first data loss amount can be calculated according to the acquisition interval between two adjacent first valid data points.
[0067] Step S400: Calculate the first data loss rate based on the first data loss amount and the number of the first valid data points.
[0068] In this step S400, after obtaining the first data loss amount, the first data loss rate can be calculated according to the first data loss amount and the number of the first valid data points, so as to determine whether the acquisition ability of the vehicle data acquisition device is sufficient and reduce data loss.
[0069] In a preferred embodiment, calculating the first data loss amount based on the acquisition intervals between the respective first valid data points includes: when the acquisition interval between two adjacent first valid data points is greater than a preset time, calculating the number of lost points between the two adjacent first valid data points; adding up the number of lost points between all adjacent first valid data points to obtain the first data loss amount.
[0070] In this embodiment, when the acquisition interval between two adjacent first valid data points is greater than the acquisition frequency of the acquisition device, it can be considered that there are lost points between the two first valid data points, and the number of lost points is the number of lost points. Adding up the number of lost points existing between all first valid data points can obtain the first data loss amount.
[0071] It should be noted that in actual operation, the acquisition frequency of the acquisition device can be set within a floating range. For example, it can be selected to float between -5% and +5%. For example, for an acquisition device with a rated acquisition frequency of once per 1 s, the actual acquisition frequency range can be set to once every 0.95 s to 1.05 s.
[0072] In a realizable manner, for example, the number of lost points between two adjacent first valid data points can be calculated by α1 = t * Δt - 1; where α1 is the number of lost points between two adjacent first valid data points, t is the acquisition interval between the two adjacent first valid data points, and Δt is the acquisition frequency of the vehicle-end information acquisition device. For example, the acquisition time of data point A is 15:15:15, the acquisition time of data point B is 15:15:19, and the acquisition frequency of the vehicle-end information acquisition device is once per 1 s, then there are 3 data points lost in the middle, and the data loss amount is 3.
[0073] In a preferred embodiment, calculating the first data loss rate based on the first data loss amount and the number of first valid data points includes: by calculating the first data loss rate; where σ is the first data loss rate, α is the first data loss amount, and β is the number of first valid data points.
[0074] It should be pointed out that in a preferred embodiment, in combination with Figure 3 as shown, before obtaining the number of valid data points and the acquisition time of each first valid data point in the above-mentioned acquisition device, the data loss rate detection method may further include:
[0075] Step S500, obtaining the number of data points in the acquisition device and the acquisition time of each data point.
[0076] Step S600, calculating the acquisition interval between each data point based on the acquisition time of each data point.
[0077] Step S700, based on the acquisition intervals between the respective data points and a first preset time interval, filter the first valid data points.
[0078] Among them, in step S700, generally, the acquisition intervals between the respective data points can be calculated according to the acquisition times of the respective data points in the acquisition device, and the valid data points can be filtered according to the acquisition intervals between the respective data points. For example, the valid data points can be filtered according to the data acquisition frequency of the data acquisition device, that is, the first preset time interval is set to the data acquisition frequency of the data acquisition device. It can be understood that assuming the specified data acquisition time interval of the data acquisition device is 1 second, but due to the uncertainty of the actual situation, this time can be relaxed to 0.95s - 1.1s. Then for the current data point, if the acquisition interval between the current data point and the previous data point is within the range of 0.95s - 1.1s, then the current data point is a valid data point. For example, in the data acquisition on a certain day, the acquired signal is X, and the data acquisition volume on that day is 33,914. The number of data with an acquisition interval within the range of 0.95s - 1.1s is 33,262, and the proportion of valid data points is 98.08%.
[0079] In a preferred implementation form, in the above step S700, based on the acquisition intervals between the respective data points and a first preset time interval, filtering the first valid data points specifically includes: for the current data point, when the acquisition interval between the acquisition time of this data point and the acquisition time of the previous data point is less than the first preset interval, mark this data point as the first valid data point; where the current data point is any data point in the acquisition device except the first data point.
[0080] It should be noted that in step S700, considering that the vehicle may enter an environment with poor communication quality and the system will not be powered on and off frequently in a short time, there will be a large deviation if only filtering the valid data points based on the specified data acquisition time interval of the data acquisition device. Therefore, the operating environment of the vehicle and the power-on frequency of the system can be comprehensively considered, and a time interval longer than the specified data acquisition time interval of the data acquisition device can be set for filtering the valid data points. For example, the preset interval can be set to 1 minute. When the acquisition interval between the acquisition time of this data point and the acquisition time of the previous data point is less than 1 minute, then this data point is marked as a valid data point.
[0081] It should be pointed out that in a preferred implementation form, after calculating the first data loss rate based on the first data loss amount and the number of the first valid data points, the data loss rate detection method may further include:
[0082] When the first data loss rate is greater than or equal to a first preset percentage, prompt a warning message;
[0083] When the first data loss rate is less than the first preset percentage, calculate the second data loss rate corresponding to the second preset time interval, and when the second data loss rate is greater than or equal to the second preset percentage, prompt a warning message;
[0084] When the second data loss rate is less than the second preset percentage, calculate the third data loss rate corresponding to the third preset time interval, and when the third data loss rate is greater than or equal to the third preset percentage, prompt a warning message; wherein, the first preset time interval is less than the second preset time interval, and the second preset time interval is less than the third preset time interval.
[0085] In this embodiment, after calculating the first data loss rate corresponding to the first preset time interval, the corresponding first alarm threshold, that is, the first preset percentage, can be set considering the actual application scenario. When the first data loss rate is greater than or equal to this alarm threshold, a warning message is prompted. At this time, it is necessary to check whether the data acquisition device of this vehicle is damaged, or test whether the data acquisition ability of the data acquisition device is sufficient. In addition, in this embodiment, the second data loss rate corresponding to the second preset time interval and the third data loss rate corresponding to the third preset time interval are further calculated step by step. Specifically, if the first data loss rate is less than the first preset percentage, at this time, further calculate the second data loss rate corresponding to the second preset time interval, and judge the relationship between this second data loss rate and the second preset percentage. When the second data loss rate is greater than or equal to the second preset percentage, prompt a warning message; if the second data loss rate is less than the second preset percentage, at this time, further calculate the third data loss rate corresponding to the third preset time interval, and judge the relationship between this third data loss rate and the third preset percentage. When the third data loss rate is greater than or equal to the third preset percentage, prompt a warning message.
[0086] It should be noted that the first preset time interval is less than the second preset time interval, and the second preset time interval is less than the third preset time interval. During the judgment process, the preset time interval increases. In addition, the methods for calculating the second data loss rate corresponding to the second preset time interval and the third data loss rate corresponding to the third preset time interval are the same as the method for calculating the first data loss rate corresponding to the first preset time interval in the above text, and will not be elaborated here.
[0087] It can be understood that in this embodiment, based on each preset time interval, its preset percentage is set, and it is sequentially judged step by step whether the data loss rate corresponding to each preset time interval is less than the preset percentage corresponding to it. If the data loss rate is greater than or equal to the preset percentage in any step of the judgment, an alarm is given, which can further improve the reliability of the warning.
[0088] In addition, in a preferred embodiment, the above-mentioned first preset time interval can be, for example, 1 min, and correspondingly, the above-mentioned first preset percentage can be 6%.
[0089] Alternatively, in a preferred embodiment, the above-mentioned second preset time interval can be, for example, 2 min, and correspondingly, the above-mentioned second preset percentage can be 8%.
[0090] Or rather, in a preferred embodiment, the above-mentioned third preset time interval can be, for example, 3 min, and correspondingly, the above-mentioned third preset percentage can be 10%.
[0091] Based on the above overall introduction, in a specific embodiment, combined with the actual operation of the data acquisition device on a certain day, the specific method for calculating its data loss rate is as follows:
[0092] (1) Obtain the number of data points in the acquisition device and the acquisition time of each data point. For the acquired signal X, based on the acquisition time of each data point, calculate the acquisition interval between each data point.
[0093] (2) Obtain the data points with an acquisition interval < 1 min between two consecutive data points. In the first step, the time intervals between all consecutive points have been calculated. Here, only the data points with an acquisition interval < 1 min need to be screened out as valid data points and the number is counted. For example, in the actual operating environment, the number of data points with an acquisition interval < 1 min is 33,900. Based on the acquisition time of each valid data point, calculate the acquisition interval between each valid data point. Based on the acquisition intervals between each valid data point, calculate the data loss amount. For example, for these 33,900 data points, when the acquisition interval between two consecutive valid data points is higher than 0.95 s to 1.1 s, it is regarded that there are missing points in the middle. Specifically, the data acquisition time of point A is 15:15:15, and the data acquisition time interval of point B is 15:15:19, then there are 3 missing points in the middle. Add up all the missing points to obtain the data loss amount of 1,996, and the data loss rate is
[0094] (3) Obtain the data points with an acquisition interval < 2 min between two consecutive data points. Based on the same principle as in step (2), calculate the data loss amount and the data loss rate. For example, the number of data points with an acquisition interval < 2 min is 33,912, the data loss amount is 2,953, and the data loss rate is 8.01%.
[0095] (4) Obtain the data points with an acquisition interval < 3 min between two consecutive data points. Based on the same principle as in step (2), calculate the data loss amount and the data loss rate. For example, the number of data points with an acquisition interval < 3 min is 33,936, the loss amount is 3,083, and the data loss rate is 9.08%.
[0096] (5) When the data loss rate of the calculated collection interval < 1 min is higher than 6%, it means that assuming a vehicle runs for 10 hours a day, 36 minutes of its data are all lost. At this time, a warning needs to be reported, and it is necessary to check whether the data collection device of this vehicle is damaged, or test whether the data collection ability of this device is sufficient.
[0097] (6) When the data loss rate of the calculated collection interval < 2 min is higher than 8%, it means that assuming a vehicle runs for 10 hours a day, 48 minutes of its data are all lost. At this time, a warning needs to be reported, and it is necessary to check whether the data collection device of this vehicle is damaged, or test whether the data collection ability of this device is sufficient.
[0098] (7) When the data loss rate of the calculated collection interval < 3 min is higher than 10%, it means that assuming a vehicle runs for 10 hours a day, 60 minutes of its data are all lost. At this time, a warning needs to be reported, and it is necessary to check whether the data collection device of this vehicle is damaged, or test whether the data collection ability of this device is sufficient.
[0099] For the convenience of understanding how the method step processes in the above embodiments are combined and executed, please refer to Figure 4 , Figure 4 The processes in it are all recorded above and will not be elaborated here. It should be understood that Figure 4 This is not a limitation on the implementation process of the embodiments of the present application, but only a flowchart of an implementation manner provided for the convenience of understanding.
[0100] For the data loss rate detection method described in the embodiments of the present application, the number of the first valid data points in the collection device and the collection time of each first valid data point are obtained, and the collection intervals between each first valid data point are calculated. Based on the collection intervals, the first data loss amount is calculated, and the first data loss rate is calculated, which can effectively detect the data collection ability of the data collection device, and further provide a detection basis and data support for the timely warning of the data collection device and the reduction of data loss.
[0101] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0102] Embodiment 2
[0103] This embodiment relates to a data loss rate detection device, and this device corresponds to the data loss rate detection method described in Embodiment 1. Among them, Figure 5 shows the structural block diagram of the data loss rate detection device of this embodiment, and for the convenience of description, Figure 5 only the parts related to the embodiment are shown in it.
[0104] Still referring to Figure 5 In terms of the overall structure, the data loss rate detection device in this embodiment includes a first data acquisition module 501, a first interval calculation module 502, a loss amount calculation module 503, and a loss rate calculation module 504.
[0105] Among them, the above-mentioned first data acquisition module 501 is used to acquire the number of first valid data points in the acquisition device and the acquisition time of each first valid data point. The above-mentioned first interval calculation module 502 is used to calculate the acquisition interval between each two first valid data points based on the acquisition time of each first valid data point. The above-mentioned loss amount calculation module 503 is used to calculate the first data loss amount based on the acquisition intervals between each two first valid data points. The above-mentioned loss rate calculation module 504 is used to calculate the first data loss rate based on the first data loss amount and the number of valid data points.
[0106] In addition, in a preferred implementation form, calculating the first data loss amount based on the acquisition intervals between each two first valid data points includes: when the acquisition interval between two adjacent first valid data points is greater than a preset time, calculating the number of lost points between the two adjacent first valid data points; adding up the number of lost points between all adjacent first valid data points to obtain the first data loss amount.
[0107] At this time, in a realizable manner, the number of lost points between two adjacent first valid data points can be calculated by α1 = t * Δt - 1; where α1 is the number of lost points between two adjacent first valid data points, t is the acquisition interval between the two adjacent first valid data points, and Δt is the acquisition frequency of the vehicle-end information acquisition device.
[0108] Meanwhile, in a preferred implementation form, calculating the first data loss rate based on the first data loss amount and the number of first valid data points includes: by calculating the first data loss rate; where σ is the first data loss rate, α is the first data loss amount, and β is the number of first valid data points.
[0109] In addition, in a preferred implementation form, the data loss rate detection device in this embodiment further includes a second data acquisition module, a second data acquisition module, and a screening module.
[0110] The above-mentioned second data acquisition module is used to acquire the number of data points in the acquisition device and the acquisition time of each data point. The above-mentioned second interval calculation module is used to calculate the acquisition interval between each two data points based on the acquisition time of each data point. The above-mentioned screening module is used to screen valid data points based on the acquisition intervals between each two data points and a first preset time interval.
[0111] In this embodiment, in a preferred implementation form, screening the first valid data points based on the acquisition intervals between the respective data points and the first preset time interval specifically includes: for the current data point, when the acquisition interval between the acquisition time of this data point and the acquisition time of the previous data point is less than the first preset interval, mark this data point as the first valid data point; where the current data point is any data point in the acquisition device except the first data point.
[0112] In a preferred implementation form, the data loss rate detection device of this embodiment further includes an early warning module, and this early warning module is used for:
[0113] When the first data loss rate is greater than or equal to the first preset percentage, prompt early warning information;
[0114] When the first data loss rate is less than the first preset percentage, calculate the second data loss rate corresponding to the second preset time interval, and when the second data loss rate is greater than or equal to the second preset percentage, prompt early warning information;
[0115] When the second data loss rate is less than the second preset percentage, calculate the third data loss rate corresponding to the third preset time interval, and when the third data loss rate is greater than or equal to the third preset percentage, prompt early warning information; where the first preset time interval is less than the second preset time interval, and the second preset time interval is less than the third preset time interval.
[0116] At this time, combined with the description in Embodiment 1, in a preferred implementation form, the above-mentioned first preset time interval can be 1 min, and the above-mentioned first preset percentage can be 6%.
[0117] Or, in a preferred implementation form, the above-mentioned second preset time interval can also be 2 min, and the above-mentioned second preset percentage can be 8%.
[0118] Or, in a preferred implementation form, the above-mentioned third preset time interval can be 3 min, and the above-mentioned third preset percentage can be 10%.
[0119] It should be noted that for the information interaction, execution process, etc. between the above-mentioned device / units, since it is based on the same concept as the method embodiment of the present application, its specific functions and the technical effects brought can be specifically referred to the method embodiment part, and will not be elaborated here.
[0120] It should be noted that those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment and will not be elaborated here.
[0121] Embodiment 3
[0122] This embodiment relates to a terminal device. Refer to Figure 6 , the terminal device 600 may include: at least one processor 610 and a memory 620. The memory 620 is used to store a computer program 621. The processor 610 is used to call and run the computer program 621 stored in the memory 620 to implement the steps in any method embodiment in Embodiment 1. Specifically, for example, it may be Figure 2 steps S100 to S400 in the embodiment shown, or when the processor 610 executes the computer program, it can implement the functions of each module / unit in the above device embodiments, for example Figure 5 the functions of each module shown.
[0123] Exemplarily, the computer program 621 can be divided into one or more modules / units. One or more modules / units are stored in the memory 620 and executed by the processor 610 to complete this application. The one or more modules / units can be a series of computer program segments capable of completing specific functions, and these program segments are used to describe the execution process of the computer program in the terminal device 600.
[0124] Those skilled in the art can understand that Figure 6 is only an example of the terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.
[0125] The processor 610 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc.
[0126] The memory 620 may be an internal storage unit of the terminal device, or may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. The memory 620 is used to store the computer program and other programs and data required by the terminal device. The memory 620 may also be used to temporarily store data that has been output or is to be output.
[0127] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
[0128] The data loss rate detection method provided in this embodiment may be applied to terminal devices such as computers, wearable devices, in-vehicle devices, tablet computers, laptop computers, and netbooks. The specific type of the terminal device is not limited in the embodiments of the present application.
[0129] Embodiment 4
[0130] This embodiment relates to a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the steps in each of the embodiments of the data loss rate detection method in the above-mentioned Embodiment 1 can be implemented.
[0131] At this time, this embodiment also provides a computer program product. When the computer program product runs on a mobile terminal, it enables the mobile terminal to execute the steps in the various embodiments of the above data loss rate detection method when executed.
[0132] Among them, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above embodiment methods of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the above various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc.
[0133] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0134] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such an implementation should not be considered to exceed the scope of this application.
[0135] In the embodiments provided in this application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in an electrical, mechanical or other form.
[0136] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for detecting data loss rate, characterized in that The data loss rate detection method is applied to the vehicle - end information acquisition device, and the data loss rate detection method includes: Obtain the number of first valid data points in the acquisition device and the acquisition time of each first valid data point; Based on the acquisition time of each first valid data point, calculate the acquisition interval between each two adjacent first valid data points; Based on the acquisition intervals between each two adjacent first valid data points, calculate the first data loss amount; Based on the first data loss amount and the number of first valid data points, calculate the first data loss rate.
2. The data loss rate detection method according to claim 1, wherein The calculating the first data loss amount based on the acquisition intervals between each two adjacent first valid data points includes: When the acquisition interval between two adjacent first valid data points is greater than the preset time, calculate the number of lost points between the two adjacent first valid data points; Sum up the number of lost points between all adjacent first valid data points to obtain the first data loss amount.
3. The data loss rate detection method according to claim 2, wherein The calculating the number of lost points between the two adjacent first valid data points includes: Calculate the number of lost points between two adjacent first valid data points through α1=t*Δt - 1; where α1 is the number of lost points between two adjacent first valid data points, t is the acquisition interval between the two adjacent first valid data points, and Δt is the acquisition frequency of the vehicle - end information acquisition device.
4. The data loss rate detection method according to claim 1, wherein The calculating the first data loss rate based on the first data loss amount and the number of first valid data points includes: By calculating the first data loss rate; where σ is the first data loss rate, α is the first data loss amount, and β is the number of the first valid data points.
5. The data loss rate detection method according to any one of claims 1 to 4, characterized in that, Before obtaining the number of valid data points in the acquisition device and the acquisition time of each first valid data point, it further includes: Obtain the number of data points in the acquisition device and the acquisition time of each data point; Based on the acquisition time of each data point, calculate the acquisition interval between each two data points; based on the acquisition intervals between each two data points and the first preset time interval, screen the first valid data points.
6. The data loss rate detection method according to claim 5, wherein The screening the first valid data points based on the acquisition intervals between each two data points and the first preset time interval includes: For the current data point, when the acquisition interval between the acquisition time of the current data point and the acquisition time of the previous data point is less than the first preset interval, mark the current data point as a first valid data point; where the current data point is any data point in the acquisition device except the first data point, and the current data point is any data point in the acquisition device except the first data point; The first data point in the acquisition device is a first valid data point.
7. The data loss rate detection method according to claim 5, characterized in that After calculating the first data loss rate based on the first data loss amount and the number of first valid data points, it further includes: When the first data loss rate is greater than or equal to the first preset percentage, prompt a warning message; When the first data loss rate is less than the first preset percentage, calculate the second data loss rate corresponding to the second preset time interval, and when the second data loss rate is greater than or equal to the second preset percentage, prompt a warning message; When the second data loss rate is less than the second preset percentage, calculate the third data loss rate corresponding to the third preset time interval, and when the third data loss rate is greater than or equal to the third preset percentage, prompt a warning message; wherein, the first preset time interval is less than the second preset time interval, and the second preset time interval is less than the third preset time interval.
8. A data loss rate detection device, characterized in that, The data loss rate detection device is applied to the vehicle-end information acquisition device, and the data loss rate detection device includes: A first data acquisition module (501) for acquiring the number of first valid data points in the acquisition device and the acquisition time of each first valid data point; A first interval calculation module (502) for calculating the acquisition interval between each first valid data point based on the acquisition time of each first valid data point; A loss amount calculation module (503) for calculating the first data loss amount based on the acquisition intervals between each first valid data point; A loss rate calculation module (504) for calculating the first data loss rate based on the first data loss amount and the number of first valid data points.
9. A terminal device (600), comprising: A processor (610) and a memory (620), wherein a computer program (621) that can run on the processor (610) is stored in the memory (620), and characterized in that when the processor (610) executes the computer program (621), it implements the data loss rate detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor (610), it implements the data loss rate detection method according to any one of claims 1 to 7.