OTA analysis method and device based on configuration file issued by cloud server

By subcontracting the configuration files issued by the cloud server in the OTA process and verifying the analysis progress of field data, breakpoint transmission is realized, and the problems of OTA process interruption and repeated data analysis caused by vehicle shutdown are solved, and the efficiency of the OTA process is improved.

CN119815328APending Publication Date: 2025-04-11NEUSOFT RUICHI AUTOMOTIVE TECH (DALIAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411928329.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When the large configuration files issued by the cloud server are parsed and saved in the OTA process, the process takes a long time. If the user shuts down the vehicle during this period, the processing process will be interrupted, resulting in repeated analysis and storage of data, reducing the efficiency of the OTA process.

Method used

By verifying the parsing progress of each subcontracted data and each field in the configuration file, breakpoints are continuously transmitted to avoid repeated parsing of the same configuration file content. The specific method includes receiving the configuration file subcontract data of the cloud server response, verifying its integrity, finding and storing data verification codes to judge the analysis progress, and performing subcontracting and field data parsing operations if necessary.

Benefits of technology

It ensures the integrity of configuration file parsing without repeatedly parsing the same configuration file content, improves the efficiency of the OTA process, and avoids interruption problems caused by vehicle shutdown.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815328A_ABST
    Figure CN119815328A_ABST
Patent Text Reader

Abstract

The invention provides an OTA analysis method and device based on a configuration file issued by a cloud server, and relates to the technical field of configuration file processing by OTA, and the method comprises the steps: verifying the integrity of current subpackage data issued by the cloud server; if so, searching a data check code in a preset storage device; storing and analyzing the data check code corresponding to the current subpackage data which is not analyzed; searching a data check code of each piece of field data in a preset storage device, and storing and analyzing the data check code corresponding to the field data which is not analyzed; when each piece of field data is analyzed, taking the next subpackage data as new current subpackage data, and repeatedly executing the steps until each piece of subpackage data in the configuration file is issued; breakpoint resuming is achieved by checking the analysis progress of each subpackage and each field in the configuration file, so that the technical problem that OTA needs to repeatedly analyze and store the same configuration file is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of OTA processing of configuration files, and in particular to an OTA parsing method and device based on a configuration file issued by a cloud server. Background Art

[0002] With the development of the automotive industry, the functional requirements of the electronic control unit (ECU) in vehicles are increasing. In order to meet these requirements, vehicle manufacturers can remotely push new software, function updates or security patches through Over The Air (OTA) technology to achieve remote upgrades and maintenance of vehicles.

[0003] The OTA process can be simply summarized as: collect ECU information in the vehicle -> request the cloud server to send the [OTA configuration file] (hereinafter referred to as [configuration file]) -> download -> install -> activate. The [configuration file] contains key information such as the number, ID and version number of the target ECU to be upgraded. After receiving it, the OTA process will parse it and save it to the Embedded MultiMedia Card (EMMC) for use in subsequent processes.

[0004] Currently, when the cloud server sends a large amount of data for [Configuration File A] at a time, the OTA process parsing and saving process will be very time-consuming. If the user turns off the vehicle (IG-OFF) during this period, the processing flow will be interrupted. After the vehicle restarts (IG-ON), the data of [Configuration File A] in EMMC must be cleared first, and then [Configuration File B] must be requested from the cloud server again. If the content of the [Configuration File] sent twice is the same, it will lead to repeated parsing and saving of data, reducing the efficiency of the overall OTA process. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide an OTA parsing method and device based on the configuration file sent by the cloud server, and to realize breakpoint resumption by verifying the parsing progress of each subpacket and each field in the configuration file, so as to alleviate the technical problem that OTA must repeatedly parse and save the same configuration file.

[0006] In a first aspect, an embodiment provides an OTA parsing method based on a configuration file sent by a cloud server, including:

[0007] Receiving current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server;

[0008] If the current sub-package data is complete, searching for a data verification code of the current sub-package data in a preset storage device to determine whether the current sub-package data has been parsed;

[0009] If the current sub-packet data has not been parsed, the data verification code corresponding to the current sub-packet data is stored in the preset storage device, and a sub-packet data parsing operation is performed;

[0010] When the current sub-package data has been parsed, searching the preset storage device for a data check code of each field data in the current sub-package data to determine whether each field data in the current sub-package data has been parsed;

[0011] If there is unparsed field data in the current sub-package data, the data verification code corresponding to the unparsed field data is stored in the preset storage device, and the field data parsing operation is performed;

[0012] When each field data in the current sub-package data is parsed, the next sub-package data sent by the cloud server is used as the new current sub-package data, and the process returns to execute the steps of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server, until each sub-package data in the configuration file is sent.

[0013] In an optional implementation, the step of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server includes:

[0014] Send a configuration file request to the cloud server;

[0015] Receive current sub-package data of the configuration file sent by the cloud server, and a first data verification code corresponding to the current sub-package data;

[0016] Calculate a corresponding second data check code based on the current subpacket data;

[0017] The first data verification code and the second data verification code are compared to verify the integrity of the current sub-package data received from the cloud server.

[0018] In an optional embodiment, the method further comprises:

[0019] If the current sub-packaging data is incomplete, the step of sending a request for the configuration file to the cloud server is re-executed.

[0020] In an optional implementation manner, the step of searching a preset storage device for a data check code of the current sub-packet data to determine whether the current sub-packet data has been parsed includes:

[0021] Searching for a second data verification code corresponding to the current sub-packet data in a preset storage device;

[0022] If the second data verification code corresponding to the current sub-packet data is not found in the preset storage device, the current sub-packet data is determined as not having been parsed.

[0023] In an optional implementation manner, the step of searching the preset storage device for a data check code of each field data in the current sub-packet data to determine whether each field data in the current sub-packet data has been parsed includes:

[0024] Searching a preset storage device for a third data check code corresponding to each field of the current sub-packet data;

[0025] If the third data verification code corresponding to the field data in the current sub-package data is not found in the preset storage device, the field data corresponding to the third data verification code that is not found is determined to be each field data in the current sub-package data that has not been parsed.

[0026] In an optional embodiment, the method further comprises:

[0027] Determine the current vehicle status in real time;

[0028] When the current vehicle is in a startup state, the steps of receiving current sub-package data of the configuration file sent by the cloud server in response to the request and verifying the integrity of the current sub-package data received from the cloud server are performed;

[0029] When the current vehicle is in a shut-down state, a shutdown operation is performed.

[0030] In an optional embodiment, the method further comprises:

[0031] When each of the sub-package data and each of the field data in each of the sub-package data corresponding to the configuration file received from the cloud server are parsed, each data verification code stored in the preset storage device is cleared.

[0032] In a second aspect, an embodiment provides an OTA parsing device based on a configuration file issued by a cloud server, including:

[0033] A verification module receives the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifies the integrity of the current sub-package data received from the cloud server;

[0034] A first judgment module, if the current sub-package data is complete, searches for a data verification code of the current sub-package data in a preset storage device to determine whether the current sub-package data has been parsed;

[0035] A first parsing module, if the current sub-packet data has not been parsed, stores the data verification code corresponding to the current sub-packet data in the preset storage device, and performs a parsing operation on the sub-packet data;

[0036] A second judgment module, when the current sub-packet data has been parsed, searches the preset storage device for a data check code of each field data in the current sub-packet data to judge whether each field data in the current sub-packet data has been parsed;

[0037] A second parsing module, if there is unparsed field data in the current sub-packet data, stores the data verification code corresponding to the unparsed field data in the preset storage device, and performs a field data parsing operation;

[0038] The loop module, when each field data in the current sub-package data is parsed, uses the next sub-package data sent by the cloud server as the new current sub-package data, and returns to execute the steps of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server, until each sub-package data in the configuration file is sent.

[0039] In a third aspect, an embodiment provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method described in any of the aforementioned implementation methods are implemented.

[0040] In a fourth aspect, an embodiment provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the steps of the method described in any one of the aforementioned implementations.

[0041] An OTA parsing method and device based on a configuration file sent by a cloud server provided in an embodiment of the present invention verifies the integrity of each sub-package data of the configuration file sent by the cloud server; if the verification passes, it is determined whether each sub-package data has been parsed based on whether the data verification code corresponding to the sub-package data is stored in a preset storage device; if the sub-package data has not been parsed, the data verification code corresponding to the unparsed sub-package data is stored in a preset storage device, and the sub-package data is parsed; if all the sub-package data have been parsed, it is determined whether each field of each sub-package data has been parsed based on whether the data verification code corresponding to each field data in the sub-package data is stored in a preset storage device; if a certain field of a certain sub-package data has not been parsed, the data verification code corresponding to the field data of the unparsed sub-package data is stored in a preset storage device, and then the field data is parsed, thereby realizing the overall parsing of the configuration file; in this way, the integrity of the configuration file parsing can be guaranteed without repeatedly parsing the same configuration file content.

[0042] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0043] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A flow chart of an OTA parsing method based on a configuration file issued by a cloud server provided in an embodiment of the present invention;

[0046] Figure 2 A flow chart of another OTA parsing method based on a configuration file issued by a cloud server provided in an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of saving a verification code provided by an embodiment of the present invention;

[0048] Figure 4 A functional module diagram of an OTA parsing device based on a configuration file issued by a cloud server provided in an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] If the [configuration file] data volume sent by the cloud server is large, the process of OTA parsing the configuration file and saving it to the embedded multimedia card EMMC is significantly prolonged.

[0052] During this period, if the user performs the vehicle IG-OFF operation, the configuration file parsing process will be forced to interrupt. When the next IG-ON is on, the system will first delete the parsed configuration file stored in the EMMC, and then request the [configuration file] from the cloud server again. If the [configuration file] version / content is the same twice in a row, repeated parsing and saving of the same data in the same configuration file will inevitably occur, reducing the efficiency of OTA configuration file parsing processing, and thus affecting the overall efficiency of the subsequent OTA upgrade of the corresponding ECU process.

[0053] Based on this, an embodiment of the present invention provides an OTA parsing and device for a configuration file sent by a cloud server, which compares the corresponding verification code of each subpackage data and each field data in the configuration file with the parsed data verification code in a preset storage device, thereby realizing integrity verification and breakpoint resumption of the configuration file, thereby ensuring information security and effectively solving the problem of inefficiency in the OTA configuration file parsing process.

[0054] To facilitate understanding of this embodiment, we first introduce in detail an OTA parsing method based on a configuration file issued by a cloud server disclosed in an embodiment of the present invention. The method is applied to the OTA end and the over-the-air download interface. The OTA parsing application provided by the embodiment of the present invention involves the interaction between the cloud server and the OTA end. If the OTA end completes the parsing of the configuration file, the corresponding ECU can be subsequently upgraded and controlled via OTA based on the parsed configuration file.

[0055] Figure 1 A flow chart of an OTA parsing method based on a configuration file sent by a cloud server is provided in an embodiment of the present invention.

[0056] like Figure 1As shown, the method comprises the following steps:

[0057] Step S102, receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server.

[0058] Among them, the OTA end first sends a request to the cloud server, and the cloud server responds to the request and then sends the configuration file. It should be noted that the cloud server sets the size of each sub-packet data based on the size of the configuration file sent, such as 2048, 4096 bytes, and automatically sub-packets the configuration file into several sub-packets, so that the OTA end can then verify the integrity of each sub-packet data received from the cloud server to ensure data transmission reliability.

[0059] Step S104: if the current sub-package data is complete, then the data verification code of the current sub-package data is searched in the preset storage device to determine whether the current sub-package data has been parsed.

[0060] Here, after the first integrity verification of the current subpackage data is passed, it can be determined whether the data verification code of the current subpackage data is found in the preset storage device, thereby realizing the second parsing degree verification of the current subpackage data. The current subpackage data of different parsing degrees are processed accordingly to avoid repeated parsing operations on the same subpackage data, thereby reducing parsing efficiency.

[0061] Step S106: if the current sub-packet data has not been parsed, the data verification code corresponding to the current sub-packet data is stored in a preset storage device, and the sub-packet data parsing operation is performed.

[0062] Here, if the current sub-packet data has not been parsed, the data check corresponding to the current sub-packet data is stored, and then parsed and saved in the EMMC, and the current sub-packet data that has been parsed is set to a parsed state instead of having never been parsed.

[0063] Step S108, when the current sub-packet data has been parsed, the data verification code of each field data in the current sub-packet data is searched in the preset storage device to determine whether each field data in the current sub-packet data has been parsed.

[0064] Here, after the second parsing degree verification of the current subpackage data is completed, it can be determined whether the data verification code of each field data in the current subpackage data is found in the preset storage device, thereby realizing the third parsing degree verification of the field data in the current subpackage data, and the field data of different parsing degrees in the current subpackage data are processed accordingly to avoid repeated parsing operations on the same field data in the same subpackage data, thereby reducing parsing efficiency.

[0065] Step S110: if there is unparsed field data in the current sub-packet data, the data verification code corresponding to the unparsed field data is stored in a preset storage device, and the field data parsing operation is performed.

[0066] Here, if a field data in the current sub-packet data has not been parsed, the data check corresponding to the unparsed field data is stored, and then parsed and saved in the EMMC, and the field data that has been parsed at this time is set to a parsed state instead of having never been parsed.

[0067] Step S112, when each field data in the current sub-package data is parsed, the next sub-package data sent by the cloud server is used as the new current sub-package data, and the process returns to step S102 until each sub-package data in the configuration file is sent.

[0068] It can be understood that the configuration file corresponds to multiple sub-package data, and the sub-package data currently being parsed is the current sub-package data. If the integrity of the current sub-package data has been verified by the aforementioned embodiment steps S102-step S110, the current sub-package data has been parsed and each field data in the current sub-package data has been parsed, then the next sub-package data in the configuration file is parsed. At this time, the next sub-package data is the current sub-package data, and the aforementioned embodiment steps S102-step S110 are repeated; the loop is terminated after each sub-package data in the configuration file is parsed.

[0069] In a preferred embodiment of actual application, the integrity of each sub-package data of the configuration file sent by the cloud server is verified; if the verification is passed, it is determined whether each sub-package data has been parsed based on whether the data verification code corresponding to the sub-package data is stored in the preset storage device; if the sub-package data has not been parsed, the data verification code corresponding to the unparsed sub-package data is stored in the preset storage device, and the sub-package data is parsed; if all the sub-package data are parsed, it is determined whether each field of each sub-package data has been parsed based on whether the data verification code corresponding to each field data in the sub-package data is stored in the preset storage device; if a certain field of a certain sub-package data has not been parsed, the data verification code corresponding to the field data of the unparsed sub-package data is stored in the preset storage device, and the field data is parsed, thereby realizing the overall parsing of the configuration file; in this way, the integrity of the configuration file parsing can be guaranteed without repeatedly parsing the same configuration file content.

[0070] In actual applications, the OTA end is also triggered or interrupted to parse the configuration file according to the vehicle status; the method also includes:

[0071] Step 1.1), determine the current vehicle status in real time.

[0072] The vehicle's startup or shutdown status can be monitored in real time.

[0073] Step 1.2), when the current vehicle is in the starting state, execute step S102.

[0074] When parsing [Configuration File A], if the user performs the IG-OFF operation to shut down the entire vehicle, the current OTA parsing configuration file process will be forced to interrupt. When the user starts the vehicle (IG-ON) next time, the OTA end will request the cloud server to send [Configuration File B] again, and calculate the second data verification code An according to each sub-packet data n of configuration file B, which is stored in the cache RAM, that is, the second data verification code of each sub-packet data n can also be expressed as An (RAM). After the integrity check of the sub-packet data, since the verification code Bn (NVM) of the last [Configuration File A] has been saved in the preset storage device NVM, An (RAM) and Bn (NVM) can be compared to determine whether configuration files A and B are the same configuration file, and if they are the same configuration file, whether the sub-packet data n and each field data in the sub-packet data have been parsed, so as to locate the sub-packet data and field data that have not been parsed in the same configuration file, avoid repeated parsing of the same configuration file, and thus improve efficiency.

[0075] Step 1.3), when the current vehicle is in the off state, the shutdown operation is performed.

[0076] If the vehicle is turned off actively or passively by the user, the OTA terminal will skip the step of parsing the configuration file and shut down directly.

[0077] As an optional embodiment, in order to save the memory of the preset storage device and ensure the reliability of the configuration file parsing; the method provided by the embodiment of the present invention also includes the following steps when the execution of step S112 of the aforementioned embodiment ends, that is, when the OTA end can configure the complete parsing result of the configuration file:

[0078] Step 2.1) When each sub-package data corresponding to the configuration file received from the cloud server and each field data in each sub-package data are parsed, clear each data verification code stored in the preset storage device.

[0079] In some embodiments, step S102 may further verify the integrity of the current sub-package data through the following steps, specifically including:

[0080] Step 3.1), send a configuration file distribution request to the cloud server.

[0081] The OTA end first sends a request for sending the corresponding configuration file to the cloud server, so that the cloud server knows to send a specific configuration file in response to the sending request; wherein, the cloud server also sub-packages the configuration file by itself, and sends several sub-package data corresponding to the configuration file in sequence.

[0082] Step 3.2), receiving the current sub-package data of the configuration file sent by the cloud server, and the first data verification code corresponding to the current sub-package data.

[0083] The cloud server also calculates each subpackage data through a preset algorithm to generate a corresponding first data verification code. When each subpackage data is sent down, the cloud server also sends down the first data verification code Sn corresponding to each subpackage data so that the OTA end can verify the integrity of each subpackage data; the preset algorithm may include a CRC16-CCITT algorithm.

[0084] Step 3.3), calculate the corresponding second data check code based on the current subpacket data.

[0085] The OTA end calculates the second data check code An of each sub-packet data using a preset algorithm such as CRC16-CCITT.

[0086] Step 3.4), compare the first data check code with the second data check code to verify the integrity of the current sub-package data received from the cloud server.

[0087] The OTA end compares the first data check code and the second data check code to see if they are consistent, thereby implementing integrity verification of each sub-packet data.

[0088] If a sub-package data sent by the cloud server is tampered with, damaged or lost, the integrity check of the sub-package data may fail. In this case, the sub-package data can be quickly retransmitted; illustratively, the method also includes:

[0089] Step 4.1), if the current sub-package data is incomplete, re-execute the step of sending the configuration file to the cloud server.

[0090] Based on the above embodiments, the OTA end can calculate the second data check code An(RAM) for the received current sub-packet data under the preset algorithm to verify the integrity. When the data is verified to be complete, step S104 can also be implemented by the following steps, specifically including:

[0091] Step 5.1), searching the preset storage device for the second data verification code Bn(NVM) corresponding to the current sub-packet data.

[0092] At this time, there are actually the following three search situations: 1. The second data verification code Bn(NVM) corresponding to the current sub-packet data is not found in the preset storage device, and the current sub-packet data has not been parsed.

[0093] Step 5.2), if the second data verification code corresponding to the current sub-packet data is not found in the preset storage device, the current sub-packet data is determined to be unparsed.

[0094] 2. The second data verification code Bn (NVM) corresponding to the current sub-package data is found in the preset storage device. At this time, the current sub-package data has been parsed before; and the second data verification code Bn (NVM) in the preset storage device is consistent with the second data verification code An (RAM) calculated from the current sub-package data. It can be known that the current sub-package data corresponding to the configuration file that has been parsed is the same as the current sub-package data corresponding to the current configuration file.

[0095] As an optional embodiment, 3. The second data verification code Bn (NVM) corresponding to the current subpackage data is found in the preset storage device. At this time, the current subpackage data has been parsed before; and the second data verification code Bn (NVM) in the preset storage device is inconsistent with the second data verification code An (RAM) calculated from the current subpackage data. It can be seen that the current subpackage data corresponding to the configuration file that has been parsed and the current subpackage data corresponding to the current configuration file are not the same; at this time, even if the current subpackage data has been parsed before, the configuration file that has been parsed is inconsistent with the current configuration file. At this time, each data verification code stored in the preset storage device is cleared, and the configuration file data that has been parsed in the EMMC is cleared, and each subpackage data of the current configuration file is re-parsed to ensure the reliability of the configuration file parsing.

[0096] Exemplarily, if the second data verification code corresponding to the current subpacket data is found in the preset storage device, but the value X corresponding to the second data verification code found in the preset storage device and the value Y corresponding to the second data verification code currently calculated by the OTA end based on the current subpacket data are different, at this time, each data verification code stored in the preset storage device is cleared, and the configuration file data that has been parsed in the EMMC is cleared.

[0097] At this point, it can be understood that the current sub-package data has been parsed once before, because the second data verification code corresponding to the sub-package data can be found on the preset storage device; but since the specific data of the two sub-package data are different, it can be understood that the configuration files parsed twice are different, resulting in different values ​​corresponding to the second data verification code corresponding to the current sub-package data found on the preset storage device.

[0098] In some embodiments, the OTA end further calculates the m field data in the current subpacket data to obtain the corresponding third data check code An.m (RAM); illustratively, in step S108, judging whether each field data has been parsed based on the third data check code includes:

[0099] Step 6.1), searching the preset storage device for the third data verification code Bn.m(NVM) corresponding to each field data in the current sub-packet data.

[0100] Here, if in the aforementioned embodiment, the second data verification code An (RAM) is compared with Bn (NVM) for consistency, and it is determined that [configuration file A] and [configuration file B] are the same file, the calculated third data verification code An.m (RAM) is compared with Bn.m (NVM) found in the preset storage device to locate the specific field data sequence number m in the current sub-packet data for breakpoint resumption. Subsequently, the system will continue to determine whether the next field data is parsed until each field data in the current sub-packet data is traversed and terminated.

[0101] For details, please refer to Figure 3 , each subpacket data sent based on the request response can be understood as a subpacket response; the third data check code A1...n.1...m (RAM) calculated respectively for the 1st...mth field data in the subpacket data 1...n; the third data check code B1...n.1...m (NVM) corresponding to the 1st...mth field data in the subpacket data 1...n pre-parsed in the preset storage device; here, for the second field data of the subpacket data 2, if the OTA end stores the third data check code A2.2 (RAM) calculated and generated by it in the preset storage device, it is B2.2 (NVM); the specific values ​​of A2.2 (RAM) and B2.2 (NVM) are the same, because the different storage locations represent the third data check code of the same value through different characters.

[0102] It should be noted that, in each sub-package data generated by the cloud server for sub-package processing, each field data is pre-distinguished by specific characters; for example, the type of the field data is generally represented by quotation marks "number of campaigns", and the specific value of the field data of this type is represented by colon and comma; that is, the OTA end can automatically identify each field data according to the corresponding characters in each sub-package data sent by the cloud server, and then calculate the third data check code corresponding to each field data.

[0103] Step 6.2), if the third data verification code Bn.m(NVM) corresponding to the field data in the current sub-package data is not found in the preset storage device, the field data corresponding to the third data verification code that is not found is determined as each field data in the current sub-package data that has not been parsed.

[0104] If the third data verification code Bn.m(NVM) is not found in the preset storage device, it is proved that the current field data has not been parsed, and step S110 is executed for the field data that has not been parsed.

[0105] Figure 2 A flowchart of another OTA parsing method based on a configuration file sent by a cloud server is provided for an embodiment of the present invention.

[0106] After the user starts the vehicle (IG-ON), the OTA end requests the cloud server to send [Configuration File A];

[0107] After receiving the sub-packet response n, the OTA end performs integrity check calculation on each sub-packet data using CRC16-CCITT to obtain the check code An(RAM) of each sub-packet response n;

[0108] Compare the verification code Sn of each sub-packet response n sent by the cloud server with An(RAM) to verify the integrity of the sub-packet data.

[0109] If the verification is successful, continue with the following steps. Otherwise, re-execute the step of requesting the cloud server to send the [configuration file];

[0110] Determine whether there is a check code Bn(NVM) of the sub-packet data n saved in NVM;

[0111] If not, for the unparsed sub-packet response n, save its corresponding verification code An(RAM) to NVM to obtain Bn(NVM);

[0112] If yes, compare the verification codes An(RAM) and Bn(NVM) to see if they are the same; if not, clear the configuration file data saved in the EMMC and all the verification codes saved in the NVM; if they are the same, perform CRC16 calculation on the field data m in the sub-packet response n to obtain the field data verification code An.m(RAM);

[0113] Find the field data check code An.m (RAM) corresponding to Bn.m (NVM in NVM;

[0114] If the corresponding Bn.m(NVM) cannot be found in NVM, then An.m(RAM) is saved to NVM to obtain Bn.m(NVM); then the field data is saved to EMMC;

[0115] If the corresponding Bn.m(NVM) is found in NVM, determine whether there are any remaining fields in the sub-packet response n; if so, repeat the search operation in NVM for the check code corresponding to the next field data; if not, determine whether there is still the next sub-packet data; if so, execute the above steps again; if not, end the parsing and saving actions, clear all the check codes saved in NVM, and continue the OTA upgrade process for the corresponding ECU.

[0116] It should be noted that, if in the parsing process of the above configuration file, once it is detected that the user has shut down (IG-OFF) the vehicle, the parsing process will be jumped out and the shutdown operation will be performed.

[0117] The embodiment of the present invention can realize the integrity check and breakpoint resume function of the [configuration file] by comparing the verification code, which greatly improves the efficiency of the overall OTA process and the security of data transmission.

[0118] In some embodiments, Figure 4 As shown, the embodiment of the present invention further provides an OTA parsing device 200 based on a configuration file issued by a cloud server, comprising:

[0119] Verification module 201 receives the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifies the integrity of the current sub-package data received from the cloud server;

[0120] The first judgment module 202 searches for a data check code of the current sub-packet data in a preset storage device to judge whether the current sub-packet data has been parsed if the current sub-packet data is complete;

[0121] The first parsing module 203 stores the data verification code corresponding to the current sub-packet data in the preset storage device and performs a parsing operation on the sub-packet data if the current sub-packet data has not been parsed;

[0122] The second judgment module 204, when the current sub-packet data has been parsed, searches the preset storage device for a data check code of each field data in the current sub-packet data to judge whether each field data in the current sub-packet data has been parsed;

[0123] The second parsing module 205 stores the data verification code corresponding to the unparsed field data in the preset storage device and performs a field data parsing operation if there is unparsed field data in the current sub-packet data;

[0124] Loop module 206, when each field data in the current sub-package data is parsed, takes the next sub-package data sent by the cloud server as the new current sub-package data, and returns to execute the steps of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server, until each sub-package data in the configuration file is sent.

[0125] Furthermore, the verification module 201 is specifically used to send a request for sending a configuration file to the cloud server; receive the current sub-package data of the configuration file sent by the cloud server, and a first data verification code corresponding to the current sub-package data; calculate the corresponding second data verification code based on the current sub-package data; compare the first data verification code with the second data verification code to verify the integrity of the current sub-package data received from the cloud server.

[0126] In some embodiments, the device is also used to re-execute the step of sending a configuration file request to the cloud server in the verification module 201 if the current sub-packet data is incomplete.

[0127] In some embodiments, the first judgment module 202 is specifically used to search for the second data verification code corresponding to the current subpackage data in the preset storage device; if the second data verification code corresponding to the current subpackage data is not found in the preset storage device, the current subpackage data is determined to be unparsed.

[0128] In some embodiments, the second judgment module 204 is specifically used to search for a third data verification code corresponding to each field data in the current subpackage data in a preset storage device; if there is a third data verification code corresponding to the field data in the current subpackage data that has not been found in the preset storage device, the field data corresponding to the third data verification code that has not been found is determined to be each field data in the current subpackage data that has not been parsed.

[0129] Furthermore, the device is specifically used to determine the status of the current vehicle in real time; when the current vehicle is in a startup state, it executes the steps of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server; when the current vehicle is in a shutdown state, it executes a shutdown operation.

[0130] Furthermore, the apparatus is specifically configured to clear each data verification code stored in the preset storage device when each of the sub-package data and each of the field data in each of the sub-package data corresponding to the configuration file received from the cloud server are parsed.

[0131] Figure 5 Schematic diagram of the hardware architecture of the electronic device 300 provided in an embodiment of the present invention. Figure 5 As shown, the electronic device 300 includes: a machine-readable storage medium 301 and a processor 302, and may also include a non-volatile storage medium 303, a communication interface 304 and a bus 305; wherein the machine-readable storage medium 301, the processor 302, the non-volatile storage medium 303 and the communication interface 304 complete mutual communication through the bus 305. The processor 302 can execute the OTA parsing method based on the configuration file sent by the cloud server described in the above embodiment by reading and executing the machine-executable instructions for OTA parsing based on the configuration file sent by the cloud server in the machine-readable storage medium 301.

[0132] The machine-readable storage medium mentioned in this article can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0133] The non-volatile medium may be a non-volatile memory, a flash memory, a storage drive (such as a hard drive), any type of storage disk (such as a CD, DVD, etc.), or a similar non-volatile storage medium, or a combination thereof.

[0134] It can be understood that the specific operation methods of each functional module in this embodiment can refer to the detailed description of the corresponding steps in the above method embodiment, and will not be repeated here.

[0135] The computer-readable storage medium provided in the embodiment of the present invention stores a computer program. When the computer program code is executed, the OTA parsing method based on the configuration file issued by the cloud server described in any of the above embodiments can be implemented. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0137] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0138] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0139] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the aforementioned embodiments, those of ordinary skill in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed by the present invention, or can easily conceive of changes, or make equivalent replacements for some of the technical features therein. Such modifications, changes or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the protection scope of the present invention.

Claims

1. An OTA parsing method based on a configuration file issued by a cloud server, characterized in that: include: Receiving current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server; If the current sub-package data is complete, searching for a data verification code of the current sub-package data in a preset storage device to determine whether the current sub-package data has been parsed; If the current sub-packet data has not been parsed, the data verification code corresponding to the current sub-packet data is stored in the preset storage device, and a sub-packet data parsing operation is performed; When the current sub-package data has been parsed, searching the preset storage device for a data check code of each field data in the current sub-package data to determine whether each field data in the current sub-package data has been parsed; If there is unparsed field data in the current sub-package data, the data verification code corresponding to the unparsed field data is stored in the preset storage device, and the field data parsing operation is performed; When each field data in the current sub-package data is parsed, the next sub-package data sent by the cloud server is used as the new current sub-package data, and the process returns to execute the steps of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server, until each sub-package data in the configuration file is sent.

2. The method according to claim 1, characterized in that The step of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request and verifying the integrity of the current sub-package data received from the cloud server includes: Send a configuration file request to the cloud server; Receive current sub-package data of the configuration file sent by the cloud server, and a first data verification code corresponding to the current sub-package data; Calculate a corresponding second data check code based on the current subpacket data; The first data verification code and the second data verification code are compared to verify the integrity of the current sub-package data received from the cloud server.

3. The method according to claim 2, characterized in that The method further comprises: If the current sub-packaging data is incomplete, the step of sending a configuration file request to the cloud server is re-executed.

4. The method according to claim 2, characterized in that: The step of searching the preset storage device for the data verification code of the current sub-packet data to determine whether the current sub-packet data has been parsed includes: Searching for a second data verification code corresponding to the current sub-packet data in a preset storage device; If the second data verification code corresponding to the current sub-packet data is not found in the preset storage device, the current sub-packet data is determined as not having been parsed.

5. The method according to claim 1, characterized in that The step of searching the preset storage device for the data check code of each field data in the current sub-packet data to determine whether each field data in the current sub-packet data has been parsed includes: Searching a preset storage device for a third data check code corresponding to each field of the current sub-packet data; If the third data verification code corresponding to the field data in the current sub-package data is not found in the preset storage device, the field data corresponding to the third data verification code that is not found is determined to be each field data in the current sub-package data that has not been parsed.

6. The method according to claim 1, characterized in that The method further comprises: Determine the current vehicle status in real time; When the current vehicle is in a startup state, the steps of receiving current sub-package data of the configuration file sent by the cloud server in response to the request and verifying the integrity of the current sub-package data received from the cloud server are performed; When the current vehicle is in a shut-down state, a shutdown operation is performed.

7. The method according to claim 1, characterized in that The method further comprises: When each of the sub-package data and each of the field data in each of the sub-package data corresponding to the configuration file received from the cloud server are parsed, each data verification code stored in the preset storage device is cleared.

8. An OTA parsing device based on a configuration file issued by a cloud server, characterized in that: include: A verification module receives the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifies the integrity of the current sub-package data received from the cloud server; A first judgment module, if the current sub-package data is complete, searches for a data verification code of the current sub-package data in a preset storage device to determine whether the current sub-package data has been parsed; A first parsing module, if the current sub-packet data has not been parsed, stores the data verification code corresponding to the current sub-packet data in the preset storage device, and performs a parsing operation on the sub-packet data; A second judgment module, when the current sub-packet data has been parsed, searches the preset storage device for a data check code of each field data in the current sub-packet data to judge whether each field data in the current sub-packet data has been parsed; A second parsing module, if there is unparsed field data in the current sub-packet data, stores the data verification code corresponding to the unparsed field data in the preset storage device, and performs a field data parsing operation; The loop module, when each field data in the current sub-package data is parsed, uses the next sub-package data sent by the cloud server as the new current sub-package data, and returns to execute the steps of receiving the current sub-package data of the configuration file sent by the cloud server in response to the request, and verifying the integrity of the current sub-package data received from the cloud server, until each sub-package data in the configuration file is sent.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the steps of the method described in any one of claims 1 to 7.