Data acquisition method and device, cloud server, storage medium and product

By broadcasting synchronization messages and verification mechanisms to the vehicle's electronic control unit, the cloud server achieves efficient data acquisition, solves the time-consuming problem of serial acquisition, and improves user experience and data synchronization.

CN121842218APending Publication Date: 2026-04-10HEFEI GUOXUAN HIGH TECH POWER ENERGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, cloud servers acquire vehicle electronic control unit data in a serial manner, which results in long processing times and affects user experience.

Method used

The cloud server broadcasts synchronization messages to each electronic control unit in the vehicle, including the initial counter value and the collection period, so that each electronic control unit can collect data in parallel at a unified period and classify the data through verification results.

Benefits of technology

It shortened the data acquisition time, improved data acquisition efficiency and user experience, and ensured the accuracy, synchronization and stability of data collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121842218A_ABST
    Figure CN121842218A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data acquisition method and device, a cloud server, a storage medium and a product. The method comprises the steps that a cloud server broadcasts a synchronization message to each electronic control unit of a vehicle, and the synchronization message comprises an initial count value of a counter and an acquisition period; and for any electronic control unit, the cloud server receives a data packet sent by the electronic control unit, the data packet comprises the current collection data, the current counting data of the counter and the current verification data, and the current verification data is verified according to the current collection data and the current counting data to obtain a verification result. And if the current verification result of each electronic control unit indicates that verification is passed and the current counting data of each counter is the same, classifying the current collection data corresponding to each electronic control unit to a classification label by taking the current counting data as the classification label. According to the method, the data acquisition time is shortened, and the data acquisition efficiency and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a data acquisition method and device, a cloud server, a storage medium and a product. BACKGROUND

[0002] With the development of Internet of Vehicles technology, the number of electronic control units (ECU) carried on vehicles is increasing, and each electronic control unit needs to collect key data of the vehicle in real time. Precise and synchronous acquisition of these data by a cloud server is a key to ensuring stable operation of the vehicle and timely response, and is crucial to normal driving of the vehicle.

[0003] In related technologies, when the cloud server acquires data collected by each electronic control unit in a vehicle, it usually acquires the data collected by each electronic control unit in a serial manner by polling each electronic control unit in turn.

[0004] However, the above acquisition method takes a long time and has poor user experience. SUMMARY

[0005] The embodiments of the present application provide a data acquisition method and device, a cloud server, a storage medium and a product to achieve the technical effect of reducing the length of the acquisition process.

[0006] In a first aspect, the embodiments of the present application provide a data acquisition method applied to a cloud server, comprising:

[0007] broadcasting a synchronization message to each electronic control unit of a vehicle, the synchronization message including an initial counter value and a collection period, so that each electronic control unit collects data every collection period, and the counter corresponding to each electronic control unit starts from the initial counter value and increases by a preset value after each data collection;

[0008] For any electronic control unit, the following operations are performed to obtain a corresponding verification result, which includes:

[0009] receiving a data packet sent by the electronic control unit, the data packet including current collection data, current counter data and current verification data;

[0010] verifying the current verification data according to the current collection data and the current counter data to obtain a verification result;

[0011] If the current verification results of each electronic control unit indicate that the verification is passed, and the current counter data of each counter is the same, then the current counter data is used as a classification tag, and the current collection data corresponding to each electronic control unit is classified into the classification tag.

[0012] In a possible implementation, the current verification data is verified according to the current collection data and the current counting data, and a verification result is obtained, including:

[0013] The current collection data and the current counting data are spliced based on a preset order to obtain a spliced data block;

[0014] The spliced data block is calculated based on a preset encryption algorithm to determine target verification data;

[0015] If the target verification data is the same as the current verification data, the verification result indicates that the verification is passed;

[0016] If the target verification data is different from the current verification data, the verification result indicates that the verification is not passed.

[0017] In a possible implementation, the initial counting value is also used for each electronic control unit to replace the current counting data of the locally stored counter with the initial counting value before collecting data for the first time, so that each electronic control unit starts counting from the initial counting value.

[0018] In a possible implementation, the method further includes:

[0019] The fault message sent by any electronic control unit is received, and the fault message is used to indicate that the electronic control unit has a collection fault;

[0020] The suspension state message is generated according to the fault message;

[0021] The suspension state message is broadcast to each electronic control unit of the vehicle, so that each electronic control unit stops data collection according to the suspension state message.

[0022] In a possible implementation, the method further includes:

[0023] The synchronization request message sent by the electronic control unit is received, the synchronization request message is used to indicate that the collection fault of the electronic control unit has recovered, and the synchronization request message includes target counting data, and the target counting data is the counting data of the locally stored counter of the electronic control unit before the fault;

[0024] The initial counting value is updated according to the target counting data to perform a new round of synchronization message broadcasting.

[0025] In a possible implementation, the initial counting value is updated according to the target counting data, including:

[0026] The initial counting value of the counter is updated to the target counting data.

[0027] In a second aspect, an embodiment of the present application provides a data acquisition device, applied to a cloud server, comprising:

[0028] a broadcast module, configured to broadcast a synchronization message to each electronic control unit of the vehicle, the synchronization message comprising an initial counter value and a collection period, so that each electronic control unit collects data once every collection period, and a counter corresponding to each electronic control unit starts from the initial counter value and increases by a preset value after each data collection;

[0029] a processing module, configured to perform the following operations to obtain a corresponding verification result for any electronic control unit, the operations comprising:

[0030] receiving a data packet sent by the electronic control unit, the data packet comprising current collection data, current counter data and current verification data;

[0031] verifying the current verification data according to the current collection data and the current counter data to obtain a verification result;

[0032] an acquisition module, configured to, if the current verification results of all electronic control units indicate that the verification is passed and the current counter data of all counters are the same, classify the current collection data corresponding to each electronic control unit to the current counter data as a classification label.

[0033] In a third aspect, an embodiment of the present application provides a cloud server, comprising a memory and a processor.

[0034] The memory stores computer execution instructions.

[0035] The processor executes the computer execution instructions stored in the memory, so that the processor executes the first aspect and / or various possible implementation manners of the first aspect.

[0036] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, which is executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.

[0038] The data acquisition method and device, cloud server, storage medium and product provided by the embodiments of the present application, the cloud server broadcasts a synchronization message to each electronic control unit of the vehicle, wherein the synchronization message includes an initial counter value and an acquisition period. For any electronic control unit, the cloud server receives a data packet sent by the electronic control unit, the data packet including current acquisition data, current counter data and current verification data, and verifies the current verification data according to the current acquisition data and the current counter data to obtain a verification result. If the current verification results of the electronic control units all indicate that the verification is passed, and the current counter data of the counters are the same, the current acquisition data corresponding to each electronic control unit is classified into a classification tag with the current counter data as the classification tag. The method provided by the present application broadcasts the synchronization message including the initial counter value and the acquisition period to each electronic control unit of the vehicle through the cloud server, so that each electronic control unit acquires data at a unified period and synchronously updates the counter. The cloud server receives the data packet including the acquisition data, the counter data and the verification data and completes the verification, and when the verification of each electronic control unit is passed and the counter data of each counter is consistent, the acquisition data is classified and collected according to the counter data. The acquisition method of the related art is abandoned, so that the data acquisition time is shortened, and the data acquisition efficiency and user experience are improved. BRIEF DESCRIPTION OF DRAWINGS

[0039] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate an embodiment consistent with the present application and, together with the description, serve to explain the principles of the application.

[0040] Figure 1 An application scenario diagram provided by the present application;

[0041] Figure 2 A flowchart of a data acquisition method provided by the embodiments of the present application;

[0042] Figure 3 A data acquisition diagram provided by the embodiments of the present application;

[0043] Figure 4 A flowchart of a processing method for a fault of an electronic control unit provided by the embodiments of the present application;

[0044] Figure 5 A structural diagram of a data acquisition device provided by the embodiments of the present application;

[0045] Figure 6 A structural diagram of a cloud server provided by the embodiments of the present application.

[0046] The present application has been shown and described with reference to the preferred embodiments. Equivalent mechanisms of the application can be implemented or performed with other structures or methods. Therefore, the above described embodiments are merely descriptive and illustrative and not restrictive of the scope of the application as described in the appended claims. DETAILED DESCRIPTION

[0047] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description herein is intended for illustrating the conceptual aspects of the application by way of example and by reference to particular embodiments thereof. It is therefore contemplated that other embodiments, modifications, and equivalents will occur to those of ordinary skill in the art having the benefit of this description.

[0048] With the rapid development of Internet of Vehicles and electric vehicle technology, the application of new energy heavy trucks is becoming more and more popular, and the performance requirements of the power system continue to improve. The vehicle is limited by the voltage platform, hardware resources, etc., and a single vehicle-mounted power system is difficult to meet the energy demand of the vehicle, therefore, the use of multiple power systems in parallel combination has become the industry mainstream. These parallel power systems need to independently collect their own data through their corresponding electronic control units, where the data can be the temperature and voltage data of the battery cell, etc.

[0049] When acquiring the collected data of multiple power systems, the data collection rhythm of each electronic control unit corresponding to each power system needs to be synchronized, so that the cloud server can accurately acquire the data collected by each electronic control unit. The accurate acquisition of these data by the cloud server will directly affect the stability and timeliness of the vehicle running state, which is crucial to ensure the normal driving of the vehicle.

[0050] In the related art, taking three power systems in a vehicle as an example, it is assumed that the electronic control units corresponding to each power system of the vehicle are electronic control unit A, electronic control unit B and electronic control unit C.

[0051] The cloud server acquires the data collected by each control unit in a serial acquisition manner. Specifically, after the electronic control unit A collects the data of the power system thereof, the electronic control unit A sends the data to the electronic control unit B. After the electronic control unit B collects the data of the power system thereof, the electronic control unit B sends the data collected by the electronic control unit A to the electronic control unit C. After the electronic control unit C collects the data of the power system thereof, the electronic control unit C sends the data collected by the electronic control unit A and the data collected by the electronic control unit B to the cloud server. Alternatively, after the electronic control unit B collects the data of the power system thereof, the electronic control unit B directly sends the data to the electronic control unit C. After the electronic control unit A collects the data of the power system thereof, the electronic control unit A also directly sends the data to the electronic control unit C. Then, after the electronic control unit C collects the data of the power system thereof, the electronic control unit C sends the data collected by the electronic control unit A and the data collected by the electronic control unit B to the cloud server.

[0052] However, in the above manner, the electronic control unit at the later stage needs to wait for the data collected by the electronic control unit at the previous stage before forwarding the data, and the collection and transmission steps are executed in series, so that the total time consumption is the sum of the collection time of each electronic control unit and the forwarding time. As a result, the process of acquiring the data collected by each electronic control unit by the cloud server takes a long time, which affects the user experience.

[0053] Therefore, in view of the above problems in the related art, the present application provides a data acquisition method. Specifically, the cloud server broadcasts a synchronization message containing an initial counter value and a collection period to each electronic control unit of the vehicle, so that each electronic control unit collects data in parallel at the same collection period, and the counter of each electronic control unit starts from the initial counter value and increases by a preset value after each collection, so as to ensure that the same round of collection corresponds to the same counter value, and the timing of the collection actions of each electronic control unit is synchronized. After the cloud server receives the data packet sent by each electronic control unit and containing the current collection data, the corresponding counter data and the verification data, the cloud server first verifies the validity of the verification data by using the collection data and the counter data, and then, if the verification is passed, the cloud server confirms whether the counter data of each electronic control unit is the synchronous collection result at the same time, and if so, the cloud server classifies the data collected by each electronic control unit by using the same counter data as a classification tag. As a result, the time consumption problem of the prior art is solved, and the accurate synchronization of data collection is ensured.

[0054] In order to facilitate understanding of the method of the present application, an application scenario is exemplarily provided as follows, please refer to Figure 1 , Figure 1 An application scenario provided by the present application is shown in the application scenario diagram, which includes a vehicle 01 and a cloud server 02.

[0055] The cloud server 02 needs to remotely synchronize the data collected by the multiple electronic control units in the vehicle 01, and is particularly suitable for new energy heavy trucks and other vehicles equipped with multiple parallel power systems. Each electronic control unit of the vehicle 01 corresponds to collect key data such as battery temperature and voltage of the associated power system.

[0056] The cloud server 02 as the data acquisition and processing subject unifies the collection period and counter reference of each electronic control unit through the broadcast synchronization message, receives the data packet containing the collection data, count data and verification data independently sent by each electronic control unit, and after verification and count data synchronization confirmation, collects the data collected by each electronic control unit.

[0057] It can be understood that the types, quantities and functions of the vehicle 01 and the cloud server 02 in the present application are not limited, and the above examples are only used for illustration. The specific application situation can be determined.

[0058] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present application will be described below with reference to the drawings.

[0059] Please refer to Figure 2 , Figure 2 A flowchart of a data acquisition method provided by an embodiment of the present application is shown. The execution subject of the method can be a data acquisition device. The data acquisition device can be realized by a computer program, or by a medium storing the relevant computer program, such as a U disk and / or an optical disk, or by an entity device integrated or installed with the relevant computer program, such as a chip or an electronic device. The electronic device can be a cloud server, a server cluster, a smart terminal, etc. As shown in Figure 2 , the method can include:

[0060] S201, broadcast synchronization messages to each electronic control unit of the vehicle, the synchronization message including a counter initial count value and a collection period, so that each electronic control unit collects data every collection period, and the counter corresponding to each electronic control unit starts from the initial count value and increases by a preset value after each data collection.

[0061] In the present application, the execution subject is taken as an example of a cloud server. The cloud server can set the counter initial count value (also referred to as seed value) and the collection period, and generate the synchronization message according to the initial count value and the collection period. The cloud server can periodically send the corresponding synchronization message.

[0062] Optionally, if the cloud server acquires the data collected by each electronic control unit in the vehicle for the first time, the initial count value can be determined according to the preset count data.

[0063] Optionally, if the cloud server acquires the data collected by each electronic control unit in the vehicle for the first time, the initial count value can be determined according to the count data of each counter at the same time point when the cloud server acquires the synchronous data collected by each electronic control unit in the last round, wherein the count data of each counter at the same time point is the same.

[0064] The cloud server broadcasts the synchronization message to the electronic control units corresponding to each vehicle power system in the vehicle through a controller area network (CAN).

[0065] After the vehicle is powered on, each electronic control unit reads the count data of the counter stored when the last power-off, wherein the count data of each counter is stored in the corresponding non-volatile memory (NVM).

[0066] After each electronic control unit receives the synchronization message broadcast by the cloud server, before collecting data for the first time, the current count data of the locally stored counter is replaced with the initial count value in the synchronization message, so that each electronic control unit starts counting from the initial count value.

[0067] Each electronic control unit increases the count of the corresponding counter by a preset value, for example, by 1, after collecting data once. The collected data includes but is not limited to temperature and voltage data of the battery cells in the vehicle power system.

[0068] S202, for any electronic control unit: receiving the data packet sent by the electronic control unit, the data packet including current collected data, current count data of the counter, and current verification data. And according to the current collected data and the current count data, the current verification data is verified to obtain the verification result.

[0069] For any collection process of any electronic control unit, taking electronic control unit A as an example, after the electronic control unit A collects data, the count data of the counter is increased by 1 to obtain the current count data, and then the electronic control unit A determines the verification data according to the current collected data and the current count data.

[0070] In one possible implementation, the electronic control unit A splices the current collected data and the current count data based on a preset order to obtain a spliced data block, and then performs encryption calculation on the spliced data block according to a preset encryption algorithm to determine the verification data.

[0071] Optionally, the preset encryption algorithm can be a 128-bit Advanced Encryption Standard - Cipher - based Message Authentication Code (AES-128-CMAC) algorithm.

[0072] In the algorithm, the current collected data and the current counting data can be spliced into an initial data block in sequence, and the initial data block is filled to a 128-bit integer multiple length, and the filled data block is encrypted with a key to obtain an intermediate key, and the intermediate key is left shifted and XORed to generate sub-keys K1 and K2. The filled data block is split into 128-bit groups, and a full zero initial vector is used to start a chain encryption, each group is XORed with the previous encryption result, and then encrypted with a key, and finally the group is XORed with the corresponding sub-key, combined with the encryption result of the second last group, and then XORed, and then encrypted with a key to obtain the verification data V_mac.

[0073] The electronic control unit A further packs the collected data of this collection, the current counting data of the counter, and the verification data calculated this time into a data packet and sends the data packet to the cloud server.

[0074] Therefore, the cloud server can obtain the data packet sent by each electronic control unit in each collection.

[0075] After the cloud server receives the data packet sent by the current collection of any electronic control unit, the data packet includes the current collection data, the current counting data of the counter, and the current verification data. According to the current collection data and the current counting data in the data packet, the current verification data is verified to obtain a verification result.

[0076] In one possible implementation, the cloud server splices the current collection data and the current counting data based on a preset order to obtain a spliced data block, and performs encryption calculation on the spliced data block according to a preset encryption algorithm to determine the target verification data.

[0077] The specific process is similar to the process of determining the verification data by the electronic control unit, and details are not repeated.

[0078] If the target verification data is the same as the current verification data included in the data packet, the verification result indicates that the verification is passed. Otherwise, if the target verification data is different from the current verification data, the verification result indicates that the verification is not passed.

[0079] The cloud server repeats the above steps to obtain the verification results of each electronic control unit.

[0080] S203, if the current check results of each electronic control unit all indicate that the check passes, and the current counting data of each counter is the same, then taking the current counting data as a classification label, and classifying the current collection data corresponding to each electronic control unit to the classification label.

[0081] If the current check results of each electronic control unit all indicate that the check passes, it means that the collection data sent by each electronic unit is not abnormal. If the current counting data of each counter is the same, it means that each electronic control unit collects data at the same time, for example, at time T1.

[0082] The cloud server takes the current counting data as a classification label, and classifies the current collection data corresponding to each electronic control unit to the classification label, thereby obtaining the data collected by each electronic control unit at the same time, to keep synchronization.

[0083] In the related art, there is also another way to obtain data. When the cloud server obtains the data collected by each control unit, the cloud server as the master sends a collection instruction to each electronic control unit as the slave. After receiving the instruction from each electronic control unit, the collection is performed, and after the collection is completed, the cloud server sends a "collection complete" flag to the cloud server. The cloud server then aggregates the data.

[0084] However, in the above-mentioned manner, each electronic control unit and the cloud server need to undergo at least four interactions, i.e., the cloud server sends an instruction → the electronic control unit responds → the electronic control unit uploads the collection data → the cloud server confirms, thereby resulting in a large communication overhead. Moreover, the communication link is susceptible to electromagnetic interference, which may cause the loss of instructions or abnormal collection data. If the instructions are lost or the collection data is abnormal, repeated communication is required, further prolonging the time for the cloud server to obtain the collection data.

[0085] In the present application, the multi-round interaction mode between the cloud server and each electronic control unit in the above-mentioned related art is abandoned. By broadcasting a synchronization message once, all electronic control units can clearly collect the reference and the period, and collect data according to the rules autonomously. Subsequently, each electronic control unit only needs to upload a data packet containing collection data, counting data, and check data once, thereby reducing the number of interactions to reduce the communication overhead. The design of the check data can directly verify the integrity and authenticity of the data, reduce the repeated communication due to the loss of instructions or abnormal collection data caused by electromagnetic interference, and further shorten the time for the cloud server to obtain the collection data. The classification and collection mechanism can also ensure the synchronization of multi-unit data, thereby improving the data acquisition efficiency and reliability.

[0086] In the above embodiment of the present application, the cloud server broadcasts a synchronization message to each electronic control unit of the vehicle, wherein the synchronization message includes an initial counter value and a collection period. For any electronic control unit, the cloud server receives a data packet sent by the electronic control unit, the data packet including current collection data, current counter data and current verification data, and verifies the current verification data according to the current collection data and the current counter data to obtain a verification result. If the current verification results of each electronic control unit all indicate that the verification is passed, and the current counter data of each counter is the same, the current collection data corresponding to each electronic control unit is classified into a classification tag with the current counter data as the classification tag. In the method of the embodiment, the cloud server broadcasts the synchronization message including the initial counter value and the collection period to each electronic control unit of the vehicle, so that each electronic control unit collects data and updates the counter synchronously at a uniform period. The cloud server receives the data packet including the collection data, the counter data and the verification data and completes the verification, and when the verification of each electronic control unit is passed and the counter data of each counter is consistent, the collection data is classified and collected according to the counter data, thereby shortening the time consumption of data acquisition and improving the data acquisition efficiency and user experience.

[0087] Further, the data acquisition method in the above embodiment is illustrated by the following example. Please refer to Figure 3 , Figure 3 A data acquisition diagram provided by the embodiment of the present application is shown in the following figure, which assumes that the vehicle includes three electronic control units, namely electronic control unit A, electronic control unit B and electronic control unit C.

[0088] As shown in Figure 3 , the cloud server broadcasts a synchronization message, wherein the synchronization message includes an initial counter value and a collection period. After receiving the synchronization message, the electronic control unit A, the electronic control unit B and the electronic control unit C store the initial counter value in the non-volatile memory of each electronic control unit.

[0089] The electronic control unit A, the electronic control unit B and the electronic control unit C perform the following collection process:

[0090] Every interval of the above collection period, one data collection is completed, and the data is, for example, the temperature of the battery cell, the voltage, etc. After the collection is completed, the corresponding local counter starts from the above initial counter value and increases by 1. The collection data and the current counter data are calculated based on a preset encryption algorithm to determine the verification data, and then the collection data, the current counter data and the verification value are packaged into a data packet and sent to the cloud server.

[0091] After receiving the data packets sent by the electronic control unit A, the electronic control unit B and the electronic control unit C, the cloud server performs verification:

[0092] The cloud server calculates the collected data and the current counting data in the data packet based on a preset encryption algorithm to determine the target verification data according to the data packet sent by each electronic control unit. If the target verification data is consistent with the verification data in the corresponding data packet, it indicates that the corresponding collected data has not been tampered with or other abnormalities, and the verification is passed.

[0093] After the verification is passed, the counting data of the counter is used as a classification tag, and the collected data corresponding to the electronic control unit A, the electronic control unit B and the electronic control unit C is classified into the same tag, and finally the collected data set of each electronic control unit at the same time is obtained. As shown in Figure 3 As shown in FIG. 1, at T1, the collected data corresponding to the electronic control unit A, the electronic control unit B and the electronic control unit C at this moment is classified into the set with the tag T1. At T2, the collected data corresponding to the electronic control unit A, the electronic control unit B and the electronic control unit C at this moment is classified into the set with the tag T2, and the same is true for the subsequent time points.

[0094] In this embodiment, the period of completing single collection is reduced by (N-1)T compared with the serial collection mode, where N represents the number of electronic control units, and T represents the collection period of a single electronic control unit.

[0095] The specific implementation steps and technical effects of this embodiment are described above, and will not be repeated here to avoid redundancy.

[0096] In this application, the cloud server can also execute the following contents according to the running state of the electronic control unit, wherein the running state includes the fault state and the fault recovery state.

[0097] Please refer to Figure 4 , Figure 4 The flowchart of the processing method of the electronic control unit fault provided in this embodiment can include the following steps:

[0098] S401, receiving a fault message sent by any electronic control unit, the fault message being used to indicate that the electronic control unit has a collection fault.

[0099] When at least one electronic control unit identifies that a collection fault occurs in itself, such as failure to read sensor data, data verification failure, collection period timeout, etc., during the data collection process through the built-in fault detection mechanism, such as collection timeout, data anomaly threshold judgment, sensor communication interruption detection, etc., it will generate a fault message according to the preset format, and the fault message will contain the identification information of the fault electronic control unit, the fault type, the fault timestamp and other information.

[0100] Further, the fault message is sent to the cloud server through the CAN network, so that the cloud server can receive the fault message sent by any electronic control unit.

[0101] S402, generating a suspension state message according to the fault message.

[0102] The cloud server analyzes the received fault message, confirms the electronic control unit that has failed, the fault type and the influence range, and generates a suspension state message according to a unified communication protocol. The message can include suspension instruction identification, suspension trigger reason, suspension effective time and the like.

[0103] S403, broadcasting the suspension state message to each electronic control unit of the vehicle, so that each electronic control unit stops data collection according to the suspension state message.

[0104] The cloud server sends the suspension state message to each electronic control unit of the vehicle through the broadcast mechanism of the CAN network. Each electronic control unit listens to the CAN bus in real time, and after receiving the suspension state message, analyzes the suspension instruction in the message and immediately performs the collection stop operation.

[0105] When the electronic control unit that has failed recovers, a synchronization request message is sent to the cloud server through the CAN network, so that the cloud server receives the synchronization request message sent by the electronic control unit. The synchronization request message is used to indicate that the collection failure of the electronic control unit has recovered, and the target count data can be included in the synchronization request message. The target count data is the count data of the local storage counter of the electronic control unit before the failure.

[0106] Further, the initial count value is updated according to the target count data. Specifically, the initial count value of the counter is updated to the target count data to perform a new round of synchronization message broadcast.

[0107] The method of performing a new round of synchronization message broadcast and the subsequent data acquisition method of the cloud server is the same as the data acquisition method in the present application. To avoid redundancy, it will not be repeated.

[0108] In the above embodiment of the present application, when any electronic control unit reports a collection failure, the suspension state message is broadcasted to make each electronic control unit stop collecting synchronously, which reduces the data asynchronization and invalid data accumulation caused by the continued collection of part of the electronic control units, and reduces the abnormal data interference of the electronic control unit that has failed to the overall data reliability. After the failure is recovered, the initial count value in the synchronization message is updated based on the historical count data before the failure, and a new synchronization message is broadcasted, without resetting the count reference, so as to ensure the continuity of data collection, thereby improving the stability of the multi-electronic control unit collection system.

[0109] Please refer toFigure 5 , Figure 5 A structure diagram of a data acquisition device provided by an embodiment of the present application is applied to a cloud server, as shown in the figure, comprising: Figure 5

[0110] The broadcast module 501 is configured to broadcast a synchronization message to each electronic control unit of the vehicle, the synchronization message comprising an initial counter value and a collection period, so that each electronic control unit collects data once every collection period, and the counter corresponding to each electronic control unit starts from the initial counter value and increases by a preset value after each data collection.

[0111] The processing module 502 is configured to, for any electronic control unit:

[0112] receive a data packet sent by the electronic control unit, the data packet comprising current collection data, current counter data and current verification data.

[0113] verify the current verification data according to the current collection data and the current counter data to obtain a verification result.

[0114] The acquisition module 503 is configured to, if the verification results of all electronic control units indicate that the verification is passed and the current counter data of all counters are the same, classify the current collection data corresponding to each electronic control unit to a classification tag by taking the current counter data as the classification tag.

[0115] In a possible implementation, the processing module 502 is specifically configured to:

[0116] splice the current collection data and the current counter data according to a preset order to obtain a spliced data block.

[0117] perform encryption calculation on the spliced data block according to a preset encryption algorithm to determine target verification data.

[0118] If the target verification data is the same as the current verification data, the verification result indicates that the verification is passed.

[0119] If the target verification data is different from the current verification data, the verification result indicates that the verification is not passed.

[0120] In a possible implementation, the initial counter value is also used to replace the current counter data stored locally by each electronic control unit before the first data collection, so that each electronic control unit starts counting from the initial counter value.

[0121] In a possible implementation, the processing module 502 is further configured to:

[0122] ​Receive the fault message sent by any electronic control unit, and the fault message is used to indicate that the electronic control unit has a collection fault.

[0123] Generate the suspension state message according to the fault message.

[0124] Broadcast the suspension state message to each electronic control unit of the vehicle, so that each electronic control unit stops data collection according to the suspension state message.

[0125] In a possible implementation, the processing module 502 is further configured to:

[0126] Receive the synchronization request message sent by the electronic control unit, the synchronization request message is used to indicate that the collection fault of the electronic control unit has recovered, and the target count data is included in the synchronization request message, and the target count data is the count data of the local storage counter of the electronic control unit before the fault.

[0127] Update the initial count value according to the target count data, to perform a new round of synchronization message broadcast.

[0128] In a possible implementation, the processing module 502 is further configured to:

[0129] Update the initial count value of the counter to the target count data.

[0130] The data acquisition device provided in the embodiment can execute the data acquisition method provided in the method embodiment, and has similar implementation principles and technical effects, which will not be described here.

[0131] Figure 6 A structural diagram of a cloud server is provided in the embodiment. As shown in the figure, Figure 6 The cloud server provided in the embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 further includes a communication component 603. The processor 601, the memory 602, and the communication component 603 are connected through a bus 604.

[0132] In the specific implementation process, the at least one processor 601 executes the computer execution instructions stored in the memory 602, so that the at least one processor 601 executes the method described above.

[0133] The specific implementation process of the processor 601 can refer to the method embodiment described above, and has similar implementation principles and technical effects, which will not be described here.

[0134] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.

[0135] The memory can include random access memory (RAM), and can also include non-volatile memory (NVM), such as at least one disk memory.

[0136] The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0137] The present application also provides a computer program product, comprising a computer program, which is executed by a processor to implement the above method.

[0138] The present application also provides a computer readable storage medium, which stores computer execution instructions, and when a processor executes the computer execution instructions, the above method is implemented.

[0139] The above readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0140] An example readable storage medium is coupled to the processor such that the processor can read information from the readable storage medium and can write information to the readable storage medium. Of course, the readable storage medium can also be a part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.

[0141] The division of units is only a logical functional division, and in actual implementation, there can be another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0142] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0143] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0144] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0145] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a computer readable storage medium. The program executes to perform the steps of the above-mentioned method embodiments; and the foregoing storage medium includes various media capable of storing program codes, such as ROM, RAM, magnetic disk, or optical disk.

[0146] Finally, it should be noted that other embodiments of the present application will readily occur to those skilled in the art upon consideration of the specification and practice of the present application disclosed herein. The present application is intended to include all such variations, uses, or adaptations of the application in which the general principles of the application are used to best advantage and encompassed within its scope. The present application is not limited to the precise structures described and shown in the accompanying drawings and figures, and can be practiced with modification and alteration, and has different functions and configurations without departing from the scope of the present application. The scope of the present application is limited only by the claims appended hereto.

Claims

1. A method for acquiring data, characterized in that, Applications to cloud servers include: A synchronization message is broadcast to each electronic control unit of the vehicle. The synchronization message includes the initial count value of the counter and the collection period, so that each electronic control unit can collect data once every collection period. The counter corresponding to each electronic control unit starts from the initial count value and increases the count by a preset value after each data collection is completed. For any electronic control unit, perform the following operations to obtain the corresponding verification results. The following operations include: Receive data packets sent by the electronic control unit, the data packets including currently collected data, current counter count data, and current verification data; Based on the currently collected data and the currently counted data, the current verification data is verified to obtain the verification result; If the current verification results of each electronic control unit indicate that the verification has passed, and the current count data of each counter is the same, then the current count data is used as the classification label, and the current collected data corresponding to each electronic control unit is classified into the classification label.

2. The method according to claim 1, characterized in that, The step of verifying the current verification data based on the currently collected data and the current count data to obtain a verification result includes: Based on a preset order, the currently collected data and the currently counted data are spliced ​​together to obtain a spliced ​​data block; According to the preset encryption algorithm, the spliced ​​data block is encrypted to determine the target verification data; If the target verification data is the same as the current verification data, the verification result indicates that the verification passed; If the target verification data is different from the current verification data, the verification result indicates that the verification failed.

3. The method according to claim 1, characterized in that, The initial count value is also used to allow each electronic control unit to replace the current count data of the locally stored counter with the initial count value before collecting data for the first time, so that each electronic control unit starts counting from the initial count value.

4. The method according to claim 1, characterized in that, Also includes: Receive a fault message sent by any electronic control unit, the fault message being used to indicate that the electronic control unit has experienced a data acquisition failure; Generate a pause status message based on the fault message; The pause status message is broadcast to each electronic control unit of the vehicle, so that each electronic control unit can stop data acquisition according to the pause status message.

5. The method according to claim 4, characterized in that, Also includes: The system receives a synchronization request message sent by the electronic control unit. The synchronization request message is used to indicate that the acquisition fault that occurred in the electronic control unit has been recovered. The synchronization request message includes target count data, which is the count data of the counter stored locally by the electronic control unit before the fault. Based on the target count data, update the initial count value to conduct a new round of synchronization message broadcasting.

6. The method according to claim 5, characterized in that, The step of updating the initial count value based on the target count data includes: Update the initial count value of the counter to the target count data.

7. A data acquisition device, characterized in that, Applications to cloud servers include: The broadcast module is used to broadcast synchronization messages to each electronic control unit of the vehicle. The synchronization message includes an initial count value of the counter and a collection period, so that each electronic control unit can collect data once every collection period. The counter corresponding to each electronic control unit starts from the initial count value and increases the count by a preset value after each data collection is completed. The processing module is used to perform the following operations for any electronic control unit to obtain the corresponding verification result. The following operations include: Receive data packets sent by the electronic control unit, the data packets including currently collected data, current counter count data, and current verification data; Based on the currently collected data and the currently counted data, the current verification data is verified to obtain the verification result; The acquisition module is used to classify the current collected data of each electronic control unit into the classification label if the current verification results of each electronic control unit indicate that the verification has passed and the current count data of each counter is the same.

8. A cloud server, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.