Data updating method, device, electronic device and storage medium
By receiving and comparing the version data of the electronic control unit and the host computer, the local string data is automatically updated, which solves the inefficiency and prone to errors caused by network restrictions or manual operations during the character display of the host computer, and achieves more stable and efficient data updates.
Patent Information
- Application Number
- CN202411847095.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the inefficiency and error-prone problems arising from network restrictions or manual operations during character display update.
By receiving the version data sent by the electronic control unit, comparing it with the local character string data. If the local character string data version is lower than the electronic control unit version, send a version update request to obtain the latest character string data and update the local data.
It reduces the demand for a stable Internet environment, improves the stability of data updates, and reduces the frequency and error rate of manual maintenance.
Smart Images

Figure CN119759923A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software technology, and in particular to a data updating method, device, electronic device and storage medium. Background Art
[0002] The ECU (Electronic Control Unit) is a key electronic component widely used in the manufacturing of various electronic devices and plays a vital role in our daily lives. Essentially, it is a highly integrated computer management center that receives and processes signals (data), collects, calculates, analyzes, and judges external inputs to formulate appropriate control strategies. The ECU then outputs control instructions to drive actuators, achieving precise control of the device or system. Furthermore, the ECU provides a stable power supply or reference voltage for sensors to ensure their proper operation. As a vital electronic component, the ECU is widely used in various fields, including the automotive industry, industrial automation, aerospace, and medical equipment. Acting as a microcomputer management center, it receives signals from various sensors, collects, processes, analyzes, and judges data. Based on pre-set algorithms and logic, it then issues corresponding control instructions to adjust the operation of actuators, achieving automatic control and optimized operation of the system. The ECU's functions encompass signal acquisition, data processing, and control instruction issuance, requiring complex hardware and software systems to implement. Its core is built based on microcomputer systems such as single-chip microcomputers. It has the characteristics of high integration, strong flexibility and high reliability, and plays a vital role in production and life in modern society.
[0003] The functionality of an ECU relies on the close coordination of hardware and software, with its core being a microcomputer system based on a single-chip microcomputer. Through the collaboration of multiple hardware modules and the support of complex software algorithms, the ECU enables efficient data processing and real-time control, playing a key role in vehicles, home appliances, industrial automation equipment, and other fields, ensuring the efficient and stable operation of modern intelligent devices.
[0004] A host computer is a specially designed computer software system primarily used for monitoring and controlling remote devices or systems. It establishes a stable communication link with the slave computer, collects and processes various data in real time, and provides operators with an intuitive, user-friendly visual interface and diverse control functions. The host computer not only provides comprehensive monitoring of remote devices but also features data collection, parameter configuration, fault diagnosis, and alarm processing, enabling comprehensive management and effective control of the entire system.
[0005] Through the host computer system, operators can monitor equipment operating status in real time, adjust parameter configurations, and quickly locate and diagnose problems when they occur, improving system response speed and management efficiency. Furthermore, the host computer can generate data logs and analysis reports to support decision-making and optimization. This comprehensive control and management capability has led to its widespread application in industrial automation, intelligent manufacturing, the Internet of Things, and other fields, making it a core tool for modern system management.
[0006] In a host computer system, the host computer is the core component, responsible for data acquisition, processing, display, and issuing control commands. Typically, it is a software system deployed on a computer and equipped with a graphical user interface (GUI) for easy operator interaction with the system. The host computer receives real-time data from the ECU, processes and analyzes it based on pre-set algorithms and logic, and then sends control commands to the ECU via a communication protocol, enabling precise control and comprehensive management of the equipment.
[0007] In the host computer system, the text characters displayed are usually stored in the computer's local string file. However, when the ECU version is higher than the host computer version, the characters may not be displayed correctly or at all. The current common solution is to remotely update the host computer's string file via the TCP / IP protocol, but this method has many drawbacks:
[0008] 1. Time-consuming and labor-intensive maintenance: String files require manual maintenance, and the update process is cumbersome, time-consuming, and labor-intensive.
[0009] 2. Error-prone: Manually maintained string files are subject to the risk of errors. A slight mistake may cause character display errors on the host computer, affecting the reliability of the system.
[0010] 3. Complex device adaptation: Different devices may require different string files, which means that each device needs a corresponding file, increasing management difficulty.
[0011] 4. Network environment limitations: In a poor network environment, the string file may fail to download and require repeated download attempts, affecting update efficiency.
[0012] 5. Update problems in restricted environments: In some strictly controlled environments, computers may be prohibited from connecting to the Internet, making it impossible to update string files through the network.
[0013] In order to solve the inefficiency and error-prone problems caused by network limitations or manual operation during the character display update process of the host computer, it is necessary to develop a new solution to reduce repetitive work and ensure the smooth update of string files in an environment without Internet. Summary of the Invention
[0014] The present invention provides a data updating method, device, electronic device and storage medium, which are used to solve the defects of low efficiency and easy error caused by network limitation or manual operation in the process of updating character display of a host computer in the prior art.
[0015] The present invention provides a data updating method, characterized by comprising:
[0016] receiving electronic control unit version data sent by the electronic control unit;
[0017] Scanning a local database, and if local character string data exists in the local database, comparing version data in the local character string data with the version data of the electronic control unit;
[0018] When the version data in the local character string data is lower than the version data in the electronic control unit version data, sending a version update request instruction to the electronic control unit to obtain the electronic control unit character string data of the electronic control unit;
[0019] The electronic control unit character string data sent by the electronic control unit is received, and local data is updated based on the electronic control unit character string data.
[0020] A data updating method provided by the present invention further includes:
[0021] The local database is scanned, and if the local character string data does not exist in the local database, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit character string data.
[0022] According to a data updating method provided by the present invention, receiving the electronic control unit character string data sent by the electronic control unit and performing local data updating based on the electronic control unit character string data, includes:
[0023] receiving electronic control unit character string data sent by the electronic control unit;
[0024] Verifying the electronic control unit character string data to determine whether the electronic control unit character string data contains complete information required for updating the local data;
[0025] When the electronic control unit string data contains the complete information, the electronic control unit string data is used as the target electronic control unit string data, and local data is updated based on the target electronic control unit string data.
[0026] A data updating method provided by the present invention further includes:
[0027] When the electronic control unit character string data does not include the complete information, the version update request instruction is sent to the electronic control unit to obtain the electronic control unit character string data.
[0028] According to a data updating method provided by the present invention, receiving the electronic control unit character string data sent by the electronic control unit and performing local data updating based on the electronic control unit character string data, includes:
[0029] receiving the electronic control unit character string data sent by the electronic control unit, and parsing the electronic control unit character string data to obtain version data and a character string;
[0030] The version data and the string data are stored in a local database to complete the local data update.
[0031] According to a data updating method provided by the present invention, before receiving the electronic control unit version data sent by the electronic control unit, the method further includes:
[0032] A handshake request instruction is broadcasted, where the handshake request instruction is used to instruct the electronic control unit to feedback a device information instruction, where the device information instruction includes version data of the electronic control unit.
[0033] The present invention also provides a data updating device, comprising:
[0034] A first receiving module, configured to receive electronic control unit version data sent by the electronic control unit;
[0035] a first processing module, configured to scan a local database, and if local character string data exists in the local database, compare version data in the local character string data with the version data of the electronic control unit;
[0036] a second processing module, configured to, when the version data in the local string data is lower than the version recorded in the electronic control unit version data, send a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit;
[0037] The second receiving module is configured to receive the electronic control unit character string data sent by the electronic control unit, and perform local data update based on the electronic control unit character string data.
[0038] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described data updating methods is implemented.
[0039] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned data updating methods when executed by a processor.
[0040] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned data updating methods.
[0041] The data update method, device, electronic device and storage medium of the present invention ensure the accuracy of the data by comparing the electronic control unit version data sent by the electronic control unit with the local string data. When the version of the local string data is lower than the version of the electronic control unit, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit string data of the electronic control unit, and then the local data is updated according to the electronic control unit string data, which reduces the demand for a stable Internet environment and can greatly improve the stability of data updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 This is one of the flow charts of the data updating method provided by the present invention;
[0044] Figure 2 This is the second flow chart of the data updating method provided by the present invention;
[0045] Figure 3 It is a structural diagram of the data updating method and device provided by the present invention;
[0046] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0047] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0048] The following combination Figures 1-4 The data updating method, device, electronic device and storage medium of the present invention are described.
[0049] The data updating method of the embodiment of the present invention is applied to a host computer. Figure 1 This is one of the flow charts of the data updating method provided by the present invention, such as Figure 1 As shown, the method mainly includes step 110, step 120, step 130 and step 140.
[0050] Step 110: Receive electronic control unit version data sent by the electronic control unit.
[0051] It is understandable that the host computer and the ECU will be in the same interconnected network environment. For example, the host computer and the electronic control unit can establish a communication connection through the CAN bus, serial communication or Ethernet. The CAN bus is widely used in automobiles and industrial control systems due to its high reliability and low cost.
[0052] In some embodiments, before receiving the electronic control unit version data sent by the electronic control unit, the host computer will first broadcast a handshake request instruction, and the handshake request instruction is used to instruct the electronic control unit to feedback a device information instruction, and the device information instruction includes the electronic control unit version data.
[0053] Specifically, the host computer can be equipped with a CAN interface adapter, such as a USB-CAN converter, through a CAN controller to connect to the CAN network bus. It will send a broadcast CAN data frame to request a connection. When the ECU receives the handshake request, it will send a response data frame to indicate that it is ready to handshake with the host computer.
[0054] In some embodiments, multiple ECUs may exist on a CAN network. In this environment, the host computer's handshake process is relatively complex. The host computer starts a timer during the broadcast of a data frame to ensure that all ECUs respond promptly. Each ECU will send a response data frame at a preset random interval, indicating its readiness to handshake with the host computer. This random waiting mechanism is designed to avoid message conflicts on the CAN bus and ensure that multiple ECUs can successfully handshake at the same time. Each ECU's response data frame contains its unique ID for identification and record keeping by the host computer. Once the host computer's timer expires, it counts the received ECU response data frames and saves their respective ID information. If two ECUs have the same ID, the host computer displays a window prompting the operator to change the ID. In this window, the operator can choose to automatically set the ECU ID or manually enter a new ID to ensure that each ECU is unique within the network.
[0055] After confirming and setting the new ID, the host computer sends a CAN data frame with the newly set ID to the ECU whose ID needs to be changed. Upon receiving this request, the ECU updates and saves its CAN transmit ID. This series of operations concludes the handshake process between the host computer and multiple ECUs, ensuring stable and reliable communication. This process design ensures efficient information exchange in a complex multi-ECU environment and lays a solid foundation for subsequent control and management.
[0056] Step 120 : Scan the local database. If local character string data exists in the local database, compare the version data in the local character string data with the version data of the electronic control unit.
[0057] It is understandable that after receiving the electronic control unit version data sent by the electronic control unit, the local database may be scanned by, but not limited to, index scanning to find out whether there is local string data related to the received ECU.
[0058] If the corresponding local string data is found in the local database during the scanning process, the host computer will extract the version data in the data and compare it with the ECU version data just received. This step helps to determine whether the current ECU version is consistent with the version in the local database.
[0059] Step 130 : When the version recorded in the local string data is lower than the version recorded in the electronic control unit version data, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit string data of the electronic control unit.
[0060] It can be understood that by comparing the version data in the local string data scanned by the upper computer with the ECU version data just received, there will be the following situations: the version number of the newly received ECU is higher than the old version number in the local database, the version number of the newly received ECU is consistent with the version number in the local database, and the version number of the newly received ECU is higher than the old version number in the local database.
[0061] When the version number of the newly received ECU is higher than the old version number in the local database (that is, the version recorded in the local string data is lower than the version recorded in the electronic control unit version data), the host computer sends a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit.
[0062] If the version number of the newly received ECU is consistent with the version number in the local database, or the version number of the newly received ECU is higher than the previous version number in the local database, the string file in the local database is considered to have been updated. This mechanism effectively reduces unnecessary file update operations and improves system efficiency.
[0063] Step 140: Receive the electronic control unit character string data sent by the electronic control unit, and perform local data update based on the electronic control unit character string data.
[0064] As you can understand, after entering the string data update process, the host computer sends a version update request to the ECU, requesting a string file update. This request is intended to obtain the latest string file. Upon receiving the request, the ECU begins sending string files to the host computer incrementally. This data transfer continues until all string data has been sent. The host computer then updates its local data based on the ECU's string data.
[0065] The data update method of the present invention ensures the accuracy of the data by comparing the electronic control unit version data sent by the electronic control unit with the local string data. When the version of the local string data is lower than the version of the electronic control unit, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit string data of the electronic control unit, and then the local data is updated according to the electronic control unit string data, which reduces the demand for a stable Internet environment and can greatly improve the stability of data updates.
[0066] In some embodiments, the method further includes: scanning a local database, and when the local database does not contain the local string data, sending a version update request instruction to the electronic control unit to obtain the electronic control unit string data.
[0067] It is understood that if the corresponding local string data is not found in the local database during the scan, it means that the host computer does not have the version data or other necessary data of the ECU. The host computer then sends a version update request command to the ECU. The purpose of this command is to request the ECU to send its latest electronic control unit string data so that the latest version data and other relevant data can be obtained.
[0068] In some embodiments, receiving the electronic control unit character string data sent by the electronic control unit and performing local data update based on the electronic control unit character string data includes:
[0069] receiving electronic control unit character string data sent by the electronic control unit;
[0070] Verifying the electronic control unit character string data to determine whether the electronic control unit character string data contains complete information required for updating the local data;
[0071] When the electronic control unit character string data includes the complete information, the electronic control unit character string data is used as target electronic control unit character string data, and local data is updated based on the target electronic control unit character string data.
[0072] It is understood that the host computer first receives the electronic control unit string data from the ECU, which contains device information, software information, version data, etc. After receiving it, the host computer will perform an integrity check on this data to ensure that it contains all necessary information.
[0073] This process can use several methods:
[0074] 1. When the ECU sends data, it calculates the checksum of the string and appends it to the end of the string. After receiving the data, the host computer can use the same algorithm to calculate the checksum of the received data and compare it with the appended checksum. If the two match, the data is considered complete.
[0075] 2. Generate a hash value for the ECU string data using a cryptographic hash algorithm and send it along with the data. After receiving the data, the host computer recalculates the hash value of the received string and compares it with the received hash value to determine if the data has changed during transmission.
[0076] 3. Specify the specific format of string data. For example, the length of the string, the definition of each field (such as version number, function description, etc.), etc. The host computer can determine whether the information is complete by verifying whether these fields exist in the expected format and whether the number matches.
[0077] After verification, the host computer determines whether the received ECU string data contains the complete information required for local data update. If the data verification passes, meaning the ECU string data contains the required complete information, the host computer treats the data as the target ECU string data and updates the local database based on this information.
[0078] In some embodiments, receiving the electronic control unit character string data sent by the electronic control unit and performing local data update based on the electronic control unit character string data includes:
[0079] receiving the electronic control unit character string data sent by the electronic control unit, and parsing the electronic control unit character string data to obtain version data and a character string;
[0080] The version data and the string data are stored in a local database to complete the local data update.
[0081] It is understood that after the integrity check of the received ECU string data succeeds, the host computer parses the received string data to extract the version data and string content. After parsing is complete, the host computer stores the updated string and version data in a local database for subsequent access and use. If the integrity check fails, the host computer re-issues a request to the ECU to receive the latest string data and repeats the integrity check.
[0082] The data update method provided by this invention saves string files in the ECU, eliminating the need for dedicated personnel for long-term maintenance. Developers only need to add or delete string files during software development, avoiding tedious and repetitive work.
[0083] In order to more clearly illustrate the technical solutions of the present invention, the above embodiments are described below with examples. Figure 2 This is the second flow chart of the data update method provided by the present invention. After the host computer and ECU shake hands, a communication connection is established, and then the local data and ECU data are compared, and the data update step is performed to ensure that the host computer can correctly display and manage device information in an offline or restricted environment, thereby improving the stability and reliability of the system. Figure 2 As shown, specifically including:
[0084] First, the host computer broadcasts a handshake request command, which instructs the electronic control unit to feedback a device information command, including the electronic control unit version data. When the ECU receives the handshake request, it responds with a handshake message, completing the handshake process.
[0085] Next, the local database is scanned. If local string data exists in the local database, the version data in the local string data is compared with the version data of the electronic control unit. If the version data in the local string data is lower than the version data in the electronic control unit, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit string data of the electronic control unit. If the local string data does not exist in the local database, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit string data.
[0086] Next, after entering the string data update process, the host computer sends a version update request to the ECU, requesting the latest string file. Upon receiving the request, the ECU begins sending the string files to the host computer. The host computer first receives the electronic control unit string data from the ECU, which includes device information, software information, and version data. After receiving this data, the host computer performs an integrity check.
[0087] Finally, if the integrity check of the received ECU string data succeeds, the host computer parses the string data to extract the version data and string content. After parsing, the host computer stores the updated string and version data in a local database for subsequent access and use. If the integrity check fails, the host computer re-issues a request to the ECU to receive the latest string data and repeats the integrity check.
[0088] The data update method of the present invention ensures the accuracy of the data by comparing the electronic control unit version data sent by the electronic control unit with the local string data. When the version of the local string data is lower than the version of the electronic control unit, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit string data of the electronic control unit, and then the local data is updated according to the electronic control unit string data, which reduces the demand for a stable Internet environment and can greatly improve the stability of data updates.
[0089] Based on the same inventive concept, the present invention further provides a data updating device according to the aforementioned embodiments, which is used to implement data updating in the aforementioned embodiments. Therefore, the descriptions and definitions of the data updating methods in the aforementioned embodiments can be used to understand the various execution modules in the present invention. For details, please refer to the aforementioned method embodiments and will not be repeated here.
[0090] like Figure 3As shown, the data updating device according to the embodiment of the present invention mainly includes a first receiving module 310 , a first processing module 320 , a second processing module 330 and a second receiving module 340 .
[0091] The first receiving module 310 is configured to receive electronic control unit version data sent by the electronic control unit;
[0092] A first processing module 320 is configured to scan a local database and, if local string data exists in the local database, compare version data in the local string data with the version data of the electronic control unit;
[0093] A second processing module 330 is configured to send a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit when the version data recorded in the local string data is lower than the version recorded in the electronic control unit version data;
[0094] The second receiving module 340 is configured to receive the electronic control unit character string data sent by the electronic control unit, and perform local data update based on the electronic control unit character string data.
[0095] According to the data updating device provided by the embodiment of the present invention, the accuracy of the data is ensured by comparing the electronic control unit version data sent by the received electronic control unit with the local string data. When the version of the local string data is lower than the version of the electronic control unit, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit string data of the electronic control unit, and then the local data is updated according to the electronic control unit string data, which reduces the demand for a stable Internet environment and can greatly improve the stability of data updates.
[0096] In some embodiments, a third processing module 350 is further included. The third processing module 350 is used to scan the local database and, if the local database does not contain the local string data, send a version update request instruction to the electronic control unit to obtain the electronic control unit string data.
[0097] In some embodiments, the second receiving module 340 is further configured to receive electronic control unit character string data sent by the electronic control unit;
[0098] Verifying the electronic control unit character string data to determine whether the electronic control unit character string data contains complete information required for updating the local data;
[0099] When the electronic control unit character string data includes the complete information, the electronic control unit character string data is used as target electronic control unit character string data, and local data is updated based on the target electronic control unit character string data.
[0100] In some embodiments, the second receiving module 340 is further configured to send the version update request instruction to the electronic control unit to obtain the electronic control unit character string data when the electronic control unit character string data does not include the complete information.
[0101] In some embodiments, the second receiving module 340 is further configured to receive the electronic control unit character string data sent by the electronic control unit, and parse the electronic control unit character string data to obtain version data and character strings;
[0102] The version data and the string data are stored in a local database to complete the local data update.
[0103] In some embodiments, an instruction sending module 360 is further included. The instruction sending module 360 is used to broadcast a handshake request instruction. The handshake request instruction is used to instruct the electronic control unit to feedback a device information instruction. The device information instruction includes electronic control unit version data.
[0104] Figure 4 An example of a physical structure diagram of an electronic device is shown below. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the data update method provided by the above methods, which includes: receiving electronic control unit version data sent by an electronic control unit; scanning a local database, and if local string data exists in the local database, comparing the version data in the local string data with the electronic control unit version data; if the version data recorded in the local string data is lower than the version recorded in the electronic control unit version data, sending a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit; receiving the electronic control unit string data sent by the electronic control unit, and updating local data based on the electronic control unit string data.
[0105] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0106] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data update method provided by the above methods, which includes: receiving electronic control unit version data sent by an electronic control unit; scanning a local database, and when local string data exists in the local database, comparing the version data in the local string data with the electronic control unit version data; when the version recorded in the local string data is lower than the version recorded in the electronic control unit version data, sending a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit; receiving the electronic control unit string data sent by the electronic control unit, and updating local data based on the electronic control unit string data.
[0107] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data update method provided by the above-mentioned methods, the method comprising: receiving electronic control unit version data sent by an electronic control unit; scanning a local database, and when local string data exists in the local database, comparing the version data in the local string data with the electronic control unit version data; when the version recorded in the local string data is lower than the version recorded in the electronic control unit version data, sending a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit; receiving the electronic control unit string data sent by the electronic control unit, and updating local data based on the electronic control unit string data.
[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0109] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A data updating method, characterized in that: include: receiving electronic control unit version data sent by the electronic control unit; Scanning a local database, and if local character string data exists in the local database, comparing version data in the local character string data with the version data of the electronic control unit; When the version recorded in the version data in the local string data is lower than the version recorded in the electronic control unit version data, sending a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit; The electronic control unit character string data sent by the electronic control unit is received, and local data is updated based on the electronic control unit character string data.
2. The data updating method according to claim 1, characterized in that: Also includes: The local database is scanned, and when the local character string data does not exist in the local database, a version update request instruction is sent to the electronic control unit to obtain the electronic control unit character string data.
3. The data updating method according to claim 1, characterized in that: The receiving the electronic control unit character string data sent by the electronic control unit and performing local data update based on the electronic control unit character string data includes: receiving electronic control unit character string data sent by the electronic control unit; Verifying the electronic control unit string data to determine whether the electronic control unit string data contains complete information required for updating the local data; When the electronic control unit string data includes the complete information, the electronic control unit string data is used as the target electronic control unit string data, and local data is updated based on the target electronic control unit string data.
4. The data updating method according to claim 3, characterized in that: Also includes: When the electronic control unit character string data does not include the complete information, the version update request instruction is sent to the electronic control unit to obtain the electronic control unit character string data.
5. The data updating method according to claim 1, characterized in that: The receiving the electronic control unit character string data sent by the electronic control unit and performing local data update based on the electronic control unit character string data includes: receiving the electronic control unit character string data sent by the electronic control unit, and parsing version data and character strings from the electronic control unit character string data; The version data and the string data are stored in a local database to complete the local data update.
6. The data updating method according to claim 1, characterized in that: Before receiving the electronic control unit version data sent by the electronic control unit, the method further includes: A handshake request instruction is broadcasted, where the handshake request instruction is used to instruct the electronic control unit to feedback a device information instruction, where the device information instruction includes version data of the electronic control unit.
7. A data updating device, characterized in that: include: A first receiving module, used for receiving electronic control unit version data sent by the electronic control unit; A first processing module is used to scan a local database, and if there is local string data in the local database, compare the version data in the local string data with the version data of the electronic control unit; A second processing module is used to send a version update request instruction to the electronic control unit to obtain the electronic control unit string data of the electronic control unit when the version recorded in the version data in the local string data is lower than the version recorded in the electronic control unit version data; The second receiving module is used to receive the electronic control unit character string data sent by the electronic control unit, and perform local data update based on the electronic control unit character string data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data updating method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data updating method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data updating method according to any one of claims 1 to 6 is implemented.