Software upgrading method and device, equipment, storage medium and computer program product
By performing version verification and encryption and decryption processing during the vehicle software upgrade, it is ensured that only data higher than the current version is upgraded, which solves the problem of reduced vehicle safety caused by the lack of security verification in the existing technology and improves the stability of the vehicle. safety and driving safety.
Patent Information
- Application Number
- CN202411060001.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-29
AI Technical Summary
In the prior art, the vehicle software is flashed without security verification, which results in reduced vehicle safety and possible software version downgrades, affecting driving safety.
This paper proposes a software upgrade method that receives software upgrade requests and performs version verification to ensure that only software data higher than the current version is upgraded to prevent software version downgrades. It uses encryption and decryption algorithms and database comparison to ensure the security and safety of the upgrade data. effectiveness.
It effectively prevents vehicle software version downgrade, improves vehicle safety and stability, ensures the reliability and effectiveness of software upgrades, and enhances vehicle driving safety.
Smart Images

Figure CN118860445A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software upgrade technology, and in particular to a software upgrade method, device, equipment, storage medium and computer program product. Background Art
[0002] The vehicle electronic control unit (ECU) programming function is a very important function of diagnostic software. Currently, there is no security verification for the software version of the ECU flashing. Basically, users start flashing whatever files they get, which often leads to not only failure to solve existing problems after the flashing is completed, but also the emergence of some new problems. However, when some ECUs are flashed from high-version software to low-version software, the vehicle may have some unexpected hidden dangers, which may even affect driving safety.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of this application is to provide a software upgrade method, device, equipment, storage medium and computer program product, aiming to solve the technical problem in the prior art that the vehicle software is flashed without security verification, thereby reducing the vehicle safety.
[0005] To achieve the above purpose, the present application proposes a software upgrade method, which is applied to a vehicle side and includes:
[0006] Receive software upgrade requests;
[0007] Based on the software upgrade request, perform version verification according to preset software upgrade data to obtain a version verification result;
[0008] The preset vehicle software is upgraded according to the software upgrade data and the version verification result to obtain a software upgrade result.
[0009] In one embodiment, the step of performing version verification based on the software upgrade request and according to preset software upgrade data to obtain a version verification result includes:
[0010] Parsing the software upgrade data according to the software upgrade request through the preset diagnostic software to obtain the encrypted version data, and sending the encrypted version data to the preset vehicle electronic control unit;
[0011] Based on a preset decryption algorithm, the encrypted version data is decrypted by the vehicle electronic control unit to obtain software upgrade version data;
[0012] A version check is performed according to the software upgrade version data to obtain the version check result.
[0013] In one embodiment, the step of performing version verification according to the software upgrade version data to obtain the version verification result includes:
[0014] Obtain the current software version data through the preset database;
[0015] The current software version data and the software upgrade version data are compared to determine whether the software version corresponding to the software upgrade data is higher than the current software version, and the version verification result is obtained.
[0016] In one embodiment, the step of upgrading the preset vehicle software according to the software upgrade data and the version verification result to obtain the software upgrade result includes:
[0017] When the version verification result shows that the software version corresponding to the software upgrade data is higher than the current software version, parsing the software upgrade data to obtain initial software upgrade data;
[0018] The software upgrade is performed according to the initial software upgrade data through the preset diagnostic software to obtain the software upgrade result.
[0019] In one embodiment, the step of performing software upgrade according to the initial software upgrade data by using the preset diagnostic software to obtain the software upgrade result includes:
[0020] Execute the software upgrade program in the initial software upgrade data to obtain the installation directory of the current software;
[0021] According to the software upgrade program, the software update script in the initial software upgrade data is installed to the installation directory of the current software, and the running script of the current software is deleted to obtain the software upgrade result.
[0022] In addition, to achieve the above purpose, the present application also proposes a software upgrade method, which is applied to a programming end and includes:
[0023] Obtain software upgrade version data and initial software upgrade data;
[0024] Encrypting the software upgrade version data based on a preset encryption algorithm to obtain encrypted version data;
[0025] Software upgrade data is generated according to the encrypted version data and the initial software upgrade data, and the software upgrade data is sent to the vehicle end.
[0026] In addition, to achieve the above purpose, the present application also proposes a software upgrade device, the software upgrade device comprising:
[0027] A request receiving module, used for receiving a software upgrade request;
[0028] A version verification module, used to perform version verification based on the software upgrade request and preset software upgrade data to obtain a version verification result;
[0029] The result obtaining module is used to upgrade the preset vehicle software according to the software upgrading data and the version verification result to obtain the software upgrading result.
[0030] In addition, to achieve the above objectives, the present application also proposes a software upgrade device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the software upgrade method described above.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the software upgrade method described above are implemented.
[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the software upgrade method described above are implemented.
[0033] The present application provides a software upgrade method, which verifies the software to be upgraded based on the software upgrade data and then upgrades it, thereby preventing the vehicle electronic control unit from downgrading the software version by flashing it, solving the problem in the prior art of flashing the vehicle software without performing a security check, thereby reducing the vehicle safety, maintaining the stability of the vehicle software and improving the safety of vehicle driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 A flowchart of the first embodiment of the software upgrade method of the present application is provided;
[0037] Figure 2A brief flowchart of the software upgrade method provided in Example 1 of the present application;
[0038] Figure 3 A flowchart of the second embodiment of the software upgrade method of the present application is provided;
[0039] Figure 4 This is a schematic diagram of the module structure of the software upgrade device according to an embodiment of the present application;
[0040] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the software upgrade method in the embodiment of the present application.
[0041] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0043] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0044] The main solutions of the embodiments of this application are:
[0045] Receive software upgrade requests;
[0046] Based on the software upgrade request, perform version verification according to preset software upgrade data to obtain a version verification result;
[0047] The preset vehicle software is upgraded according to the software upgrade data and the version verification result to obtain a software upgrade result.
[0048] In the prior art, there is no security check on the software version for ECU flashing. Basically, users can flash whatever files they get. This often results in not only failing to solve existing problems after the flashing is completed, but also causing new problems.
[0049] The present application provides a solution, which verifies the software to be upgraded based on the software upgrade data and then upgrades it, thereby preventing the vehicle electronic control unit from downgrading the software version by flashing it. It solves the problem in the prior art that the vehicle software is flashed without performing a security check, thereby reducing the vehicle safety. It maintains the stability of the vehicle software and improves the safety of vehicle driving.
[0050] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a software upgrade system, etc. The following takes the software upgrade system as an example to illustrate this embodiment and the following embodiments.
[0051] Based on this, the present application embodiment provides a software upgrade method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the software upgrade method of the present application.
[0052] In this embodiment, the vehicle end of the software upgrade system is used as the execution subject, and the software upgrade method includes steps S10 to S30:
[0053] Step S10, receiving a software upgrade request;
[0054] Step S20, based on the software upgrade request, performing version verification according to preset software upgrade data to obtain a version verification result;
[0055] It should be noted that a software upgrade request refers to a request from a central server or management system, indicating that the vehicle needs to update its software. The software upgrade data contains detailed information about the software update, such as version number, update content, update file, etc.
[0056] The vehicle end of the software upgrade system receives the software upgrade request, and parses the preset software upgrade data according to the software upgrade request to obtain the software upgrade version data, and then compares the software upgrade version data with the software version number of the current vehicle system to obtain a version verification result.
[0057] In addition, a hash function can be used to verify the software version. The process is as follows:
[0058] When using hash functions to verify software upgrade versions, the usual practice is to compare the hash values of two software versions to determine whether the newly downloaded software version is higher than the currently installed version. The following are the specific steps and explanations:
[0059] Release new software versions.
[0060] 1. Generate hash value:
[0061] Before releasing a new software version, the development team uses a hash function (such as SHA-256) to hash the new version of the software file to obtain a hash value of a fixed length.
[0062] 2. Publish the hash value:
[0063] Publish the hash value of the new software version to the official website or software download page. Make sure the hash value clearly corresponds to the new version of the software.
[0064] The user verifies the software version.
[0065] 1. Download and install the new version:
[0066] Users download new versions of software from official websites or other trustworthy channels and install them on their devices.
[0067] 2. Get the hash value of the new version:
[0068] The user uses the same hash function to hash the newly installed software file to obtain a hash value.
[0069] 3. Compare hash values:
[0070] The hash value of the new software version calculated by the user is compared with the previously published hash value.
[0071] If the hash value of the new software version is the same as the officially released hash value, it means that the software file downloaded by the user is consistent with the official release and has not been tampered with or damaged.
[0072] In a feasible implementation, step S20 may include steps S201 to S203:
[0073] Step S201, parsing the software upgrade data according to the software upgrade request through the preset diagnostic software, obtaining the encrypted version data, and sending the encrypted version data to the preset vehicle electronic control unit;
[0074] Step S202, based on a preset decryption algorithm, the encrypted version data is decrypted by the vehicle electronic control unit to obtain software upgrade version data;
[0075] Step S203: performing version verification according to the software upgrade version data to obtain the version verification result.
[0076] The vehicle end of the software upgrade system parses the software upgrade data through the preset diagnostic software according to the software upgrade request, obtains the encrypted version data, and sends the encrypted version data to the preset vehicle electronic control unit. Then, based on the preset decryption algorithm, the encrypted version data is decrypted by the vehicle electronic control unit to obtain the software upgrade version data. The decryption process converts the encrypted data into plaintext software upgrade version data, that is, the decrypted data contains the specific code, configuration or other relevant information required for the upgrade. Finally, the version verification is performed according to the software upgrade version data to obtain the version verification result.
[0077] It should be noted that vehicle diagnostic software is a software tool used to communicate with the vehicle's electronic control unit (ECU) and diagnose the vehicle's electronic systems and subsystems. These software are usually used for vehicle maintenance and troubleshooting to help technicians quickly locate and solve problems.
[0078] Key features include:
[0079] 1. Read and clear fault codes: The diagnostic software can read the fault codes stored in the vehicle ECU, which record the problem information of various systems of the vehicle. The technician can determine the problem of the vehicle by reading the fault code and clear the fault code after repair.
[0080] 2. Real-time data monitoring: The software can monitor and display the data of various sensors in real time, such as engine speed, vehicle speed, oil pressure, water temperature, etc. These data help technicians judge the current operating status and performance of the vehicle.
[0081] 3. Perform specific tests and adjustments: Some diagnostic software supports the execution of specific tests and adjustments, such as engine idle speed adjustment, brake system adjustment, etc. These operations can help adjust the parameters of various vehicle systems to optimize performance and fuel efficiency.
[0082] 4. Programming and Coding: Advanced diagnostic software may support programming and coding of the ECU, allowing software to be updated, new features to be added, or specific options to be configured.
[0083] 5. Data recording and analysis: Some software can also record historical data, allowing technicians to analyze the long-term performance and problems of the vehicle, helping with preventive maintenance and fault prediction.
[0084] Common vehicle diagnostic software includes OBD (On-Board Diagnostics) software, such as OBD-II software for general diagnosis, and dedicated diagnostic software for specific car brands, such as BMW ISTA, VAG-COM (Volkswagen Audi Group), etc. These software are usually compatible with specific brands and models of vehicles.
[0085] Overall, vehicle diagnostic software is an indispensable tool in modern vehicle maintenance. They provide an efficient and accurate means to diagnose and repair problems with the vehicle's electronic systems.
[0086] In addition, it should be noted that the vehicle electronic control unit (ECU) is one of the key components in modern cars, which is responsible for managing and controlling various electronic systems of the vehicle. Each modern car is usually equipped with multiple ECUs, each of which is responsible for controlling a specific system or subsystem, such as the engine control unit (ECU), brake system control unit, air conditioning control unit, airbag system control unit, etc.
[0087] ECUs obtain information from various sensors (such as oxygen sensors, vehicle speed sensors, oil pressure sensors, etc.) and control the operation of related systems according to preset algorithms. They communicate and coordinate with various components of the vehicle through electronic signals to ensure that the vehicle's safety, performance, fuel efficiency and emissions meet design standards.
[0088] In general, ECU plays a role similar to the brain in modern cars, coordinating and controlling the operation of various key systems of the vehicle, and is an important part of automotive electronics and intelligence.
[0089] In this implementation, a version check is performed based on preset software upgrade data to obtain a version check result. Based on the version check result, the system can effectively process and verify the required software upgrade data to ensure the security and effectiveness of the upgrade operation.
[0090] In another feasible implementation, step S203 may further include steps S2031 to S2032:
[0091] Step S2031, obtaining the current software version data through a preset database;
[0092] Step S2032, comparing the current software version data with the software upgrade version data, determining whether the software version corresponding to the software upgrade data is higher than the current software version, and obtaining the version verification result.
[0093] The vehicle end of the software upgrade system accesses a preset database or the vehicle's internal storage, and the vehicle's electronic control unit obtains the currently installed software version data, i.e., the current software version data. The current software version data includes information such as the currently running software version number or identifier, and then compares the current software version data with the software upgrade version data to determine whether the software version corresponding to the software upgrade data is higher than the current software version, and obtains the version verification result.
[0094] In this implementation, by comparing the current software version with the upgraded version, only the appropriate software upgrade that is higher than the current version is installed in the vehicle system. This not only ensures the safety and stability of the vehicle system, but also effectively manages and controls the release and application of software upgrades, ensuring that the vehicle always maintains the best performance and functional status during use.
[0095] Step S30: upgrading the preset vehicle software according to the software upgrade data and the version verification result to obtain a software upgrade result.
[0096] After version verification confirms that the software upgrade can be performed, the vehicle end of the software upgrade system loads the new version of the software or patch program into the vehicle's related systems according to the preset software upgrade data to perform the software upgrade and obtain the software upgrade result.
[0097] In a feasible implementation, step S30 may include steps S301 to S302:
[0098] Step S301, when the version verification result is that the software version corresponding to the software upgrade data is higher than the current software version, parsing the software upgrade data to obtain initial software upgrade data;
[0099] Step S302, performing software upgrade according to the initial software upgrade data through the preset diagnostic software to obtain the software upgrade result.
[0100] When the version verification result shows that the software version corresponding to the software upgrade data is higher than the current software version, the vehicle end of the software upgrade system parses the software upgrade data to obtain the initial software upgrade data. The parsing process may involve data verification and integrity check, data decryption, data formatting, etc. Then, the software is upgraded according to the initial software upgrade data through the preset diagnostic software to obtain the software upgrade result. The software upgrade operation may include but is not limited to downloading software upgrade data, updating software programs, and verifying upgrade integrity.
[0101] In this implementation, the preset vehicle software is upgraded based on the software upgrade data and version verification results, and the vehicle software upgrade can be safely managed and implemented. Through version verification, data parsing, and upgrade execution, the system ensures the reliability and effectiveness of the software upgrade while minimizing the risks during the upgrade process. These steps are designed to protect the vehicle system from potential security vulnerabilities or erroneous versions, while providing post-upgrade functional improvements and performance optimization to enhance the overall vehicle operation and usage experience.
[0102] In another feasible implementation, step S302 may further include steps S3021 to S3022:
[0103] Step S3021, executing the software upgrade program in the initial software upgrade data to obtain the installation directory of the current software;
[0104] Step S3022: According to the software upgrade program, the software update script in the initial software upgrade data is installed to the installation directory of the current software, and the running script of the current software is deleted to obtain the software upgrade result.
[0105] The vehicle end of the software upgrade system executes the software upgrade program in the initial software upgrade data. The software upgrade program may be an automated installation script or program used to apply the new software version or patch to the target system and obtain the installation directory of the current software. The installation directory is a key location required for software operation, including program files, configuration files, data storage, etc. Then, according to the software upgrade program, the software update script in the initial software upgrade data is installed to the installation directory of the current software, and the running script of the current software is deleted to ensure that before installing new functions or updates, the old execution script will not conflict with the new script or cause inconsistent operations, and finally obtain the software upgrade result.
[0106] In this implementation, the vehicle software is upgraded based on the initial software upgrade data, and the vehicle software upgrade process is accurately managed and executed through specific software update scripts and installation programs. This detailed operation process not only ensures the effectiveness and security of the software upgrade, but also minimizes errors and system instability that may occur during the upgrade process. Through clearly defined steps and processes, vehicle manufacturers can effectively maintain and improve the software performance and functions of the vehicle.
[0107] For example, refer to Figure 2 , Figure 2 A brief flowchart of the vehicle fault diagnosis method provided in Example 1 of the present application.
[0108] Before performing the ECU programming (flashing) function, the vehicle-side diagnostic software first reads the software version encryption information from the flashing file and then writes it into the ECU. The ECU decrypts the encrypted information and then determines whether the flashing conditions are met and gives a response. The diagnostic software determines whether to continue flashing based on the ECU response. The specific process is as follows:
[0109] a. When the ECU manufacturer provides a VBF programming file, the software version of this file is written into the VBF file header; in order to prevent human modification, the software version needs to be encrypted (for example: software version S11, encrypted into 256-byte ASCII code - "sw_version_key" is written into the VBF file header);
[0110] b. When flashing, the diagnostic software reads the VBF file and reads the encrypted 256-byte ASCII-"sw_version_key" from the file header;
[0111] c. The diagnostic software writes "sw_version_key" to the ECU controller through the 2E service
[0112] d. The ECU controller determines by itself whether programming is allowed for this software version (this can be reflected in a certain step of flashing, such as 1002 programming mode. If programming is not allowed, 1002 will respond negatively and the programming process will not continue).
[0113] This embodiment provides a software upgrade method, which is applied to the vehicle side. According to the software upgrade data, the software to be upgraded is verified and then upgraded, so as to prevent the vehicle electronic control unit from downgrading the software version by flashing. This solves the problem in the prior art that the vehicle software is flashed without security verification, thereby reducing the vehicle safety. It maintains the stability of the vehicle software and improves the safety of vehicle driving.
[0114] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 In this embodiment, the programming end of the software upgrade system is used as the execution subject, and the software upgrade method includes steps S40 to S60:
[0115] Step S40, obtaining software upgrade version data and initial software upgrade data;
[0116] Step S50, encrypting the software upgrade version data based on a preset encryption algorithm to obtain encrypted version data;
[0117] Step S60, generating software upgrade data according to the encrypted version data and the initial software upgrade data, and sending the software upgrade data to the vehicle end.
[0118] The programming end of the software upgrade system obtains the software upgrade version data and the initial software upgrade data, and then encrypts the software upgrade version data based on a preset encryption algorithm to obtain the encrypted version data. The encryption algorithm can select a common symmetric encryption algorithm such as AES (Advanced Encryption Standard), or an asymmetric encryption algorithm such as RSA (Rivest-Shamir-Adleman), and then generate the software upgrade data based on the encrypted version data and the initial software upgrade data, and send the software upgrade data to the vehicle end.
[0119] It should be noted that an encryption algorithm is a mathematical algorithm or program used to convert data (called plaintext) into a form that is difficult to understand or decipher (called ciphertext) to protect the security and privacy of the data. These algorithms usually rely on a key to perform encryption and decryption operations.
[0120] Common encryption algorithm types:
[0121] 1. Symmetric encryption algorithm:
[0122] Symmetric encryption uses the same key to encrypt and decrypt data. Common symmetric encryption algorithms are:
[0123] AES (Advanced Encryption Standard): One of the most commonly used symmetric encryption algorithms, supporting 128-bit, 192-bit, and 256-bit key lengths.
[0124] DES (Data Encryption Standard): An earlier symmetric encryption algorithm that has been replaced by AES.
[0125] 3DES (Triple DES): DES is encrypted three times to improve security.
[0126] 2. Asymmetric encryption algorithm (public key encryption):
[0127] Asymmetric encryption uses a pair of keys: a public key and a private key. The public key is used to encrypt data, and the private key is used to decrypt data.
[0128] Common asymmetric encryption algorithms are:
[0129] RSA: An encryption algorithm based on large prime number factorization, widely used in encrypted communications and digital signatures.
[0130] DSA (Digital Signature Algorithm): An asymmetric algorithm specifically used for digital signatures.
[0131] ECC (Elliptic Curve Cryptography): An encryption algorithm based on elliptic curve theory, which is particularly useful in resource-constrained environments.
[0132] 3. Hash function:
[0133] A hash function is different from an encryption algorithm in that it is a one-way function that converts input data of arbitrary length into an output of fixed length, called a hash value or digest.
[0134] Hash functions are irreversible, meaning that the original data cannot be restored from the hash value.
[0135] Common hash functions include: MD5, SHA-1, SHA-256, etc. Among them, SHA-256 is a relatively secure choice.
[0136] Applications of encryption algorithms:
[0137] Data protection: Protect the confidentiality of data during network transmission, such as the TLS / SSL encryption used in HTTPS transmission.
[0138] Authentication: Verify the source and integrity of data through digital signatures and certificates.
[0139] Data integrity: Verify whether the data has been tampered with during transmission or storage through a hash algorithm.
[0140] Digital currency: Encryption algorithms play a key role in blockchain and cryptocurrencies, such as the SHA-256 hash algorithm.
[0141] Generally speaking, encryption algorithms are the foundation of information security. By using appropriate encryption algorithms and secure key management, data can be effectively protected from unauthorized access and modification.
[0142] Exemplarily, if RSA is selected as the encryption algorithm, the encryption and decryption principles are as follows:
[0143] 1. Key generation:
[0144] Select two large prime numbers (p) and (q).
[0145] Calculate their product (n = p × q), which is called the RSA modulus.
[0146] Calculate the Euler's totient function (φ(n) = (p - 1)(q - 1)).
[0147] Select an integer (e) that satisfies (1 < e < φ(n)) and (e) is relatively prime to φ(n).
[0148] Calculate (d) such that (d × e ≡ 1 (mod φ(n))). (d) is called the private key exponent, and (e) is the public key exponent.
[0149] 2. Encryption process:
[0150] Convert the plaintext message (M) to an integer (m), where 0 ≤ m < n.
[0151] Using the public key (e, n), calculate the ciphertext (c = m^e mod n).
[0152] 3. Decryption process:
[0153] Using the private key ((d,n)), calculate the plaintext (m=c^d\mod n).
[0154] This embodiment provides a process time prediction method, which is applied to the programming end, and the programming end encrypts and integrates the software upgrade version data and the initial software upgrade data to obtain the software upgrade data, and transmits the software upgrade data to the vehicle end, so as to ensure the security, integrity and effectiveness of the software upgrade at the vehicle end. Encryption and secure transmission ensure that the upgrade data is not tampered with or leaked during the transmission process, and the process of generating the software upgrade data ensures that the upgrade operation can be carried out smoothly and applied to the target system.
[0155] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the software upgrade method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0156] This application also provides a software upgrade device, please refer to Figure 4 , the device is applied to the vehicle side, and the software upgrade device comprises:
[0157] A request receiving module, used for receiving a software upgrade request;
[0158] A version verification module, used to perform version verification based on the software upgrade request and preset software upgrade data to obtain a version verification result;
[0159] The result obtaining module is used to upgrade the preset vehicle software according to the software upgrading data and the version verification result to obtain the software upgrading result.
[0160] Optionally, the version verification module 20 is further used to:
[0161] Parsing the software upgrade data according to the software upgrade request through the preset diagnostic software to obtain the encrypted version data, and sending the encrypted version data to the preset vehicle electronic control unit;
[0162] Based on a preset decryption algorithm, the encrypted version data is decrypted by the vehicle electronic control unit to obtain software upgrade version data;
[0163] A version check is performed according to the software upgrade version data to obtain the version check result.
[0164] Optionally, the step of performing version verification according to the software upgrade version data to obtain the version verification result includes:
[0165] Obtain the current software version data through the preset database;
[0166] The current software version data and the software upgrade version data are compared to determine whether the software version corresponding to the software upgrade data is higher than the current software version, and the version verification result is obtained.
[0167] Optionally, the result obtaining module 30 is further used for:
[0168] When the version verification result shows that the software version corresponding to the software upgrade data is higher than the current software version, parsing the software upgrade data to obtain initial software upgrade data;
[0169] The software upgrade is performed according to the initial software upgrade data through the preset diagnostic software to obtain the software upgrade result.
[0170] Optionally, the step of performing software upgrade according to the initial software upgrade data by using preset diagnostic software to obtain the software upgrade result includes:
[0171] Execute the software upgrade program in the initial software upgrade data to obtain the installation directory of the current software;
[0172] According to the software upgrade program, the software update script in the initial software upgrade data is installed to the installation directory of the current software, and the running script of the current software is deleted to obtain the software upgrade result.
[0173] In addition, to achieve the above-mentioned purpose, the present application also provides a software upgrade device, which is applied to a programming end, and the software upgrade device includes:
[0174] An acquisition module, used to acquire software upgrade version data and initial software upgrade data;
[0175] An encryption module, used to encrypt the software upgrade version data based on a preset encryption algorithm to obtain encrypted version data;
[0176] The sending module is used to generate software upgrade data according to the encrypted version data and the initial software upgrade data, and send the software upgrade data to the vehicle end.
[0177] The software upgrade device provided by the present application adopts the software upgrade method in the above embodiment, which can solve the technical problem that the flashing of vehicle software in the prior art does not perform security verification, thereby reducing the safety of the vehicle. Compared with the prior art, the beneficial effects of the software upgrade device provided by the present application are the same as the beneficial effects of the software upgrade method provided by the above embodiment, and the other technical features in the software upgrade device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0178] The present application provides a software upgrade device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the software upgrade method in the above-mentioned embodiment one.
[0179] Reference below Figure 5 , which shows a schematic diagram of the structure of a software upgrade device suitable for implementing the embodiment of the present application. The software upgrade device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The software upgrade device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0180] like Figure 5 As shown, the software upgrade device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the software upgrade device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the software upgrade device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a software upgrade device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0181] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0182] The software upgrade device provided by the present application adopts the software upgrade method in the above embodiment, which can solve the technical problem that the flashing of vehicle software in the prior art does not perform security verification, thereby reducing the safety of the vehicle. Compared with the prior art, the beneficial effects of the software upgrade device provided by the present application are the same as the beneficial effects of the software upgrade method provided by the above embodiment, and the other technical features in the software upgrade device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0183] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0184] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0185] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the software upgrade method in the above-mentioned embodiment.
[0186] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0187] The computer-readable storage medium may be included in the software upgrade device; or may exist independently without being assembled into the software upgrade device.
[0188] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the software upgrade device, the software upgrade device:
[0189] Receive software upgrade requests;
[0190] Based on the software upgrade request, perform version verification according to preset software upgrade data to obtain a version verification result;
[0191] The preset vehicle software is upgraded according to the software upgrade data and the version verification result to obtain a software upgrade result.
[0192] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0193] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0194] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0195] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned software upgrade method, and can solve the technical problem in the prior art that the flashing of vehicle software does not perform security verification, thereby reducing vehicle safety. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the software upgrade method provided by the above-mentioned embodiment, and will not be repeated here.
[0196] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned software upgrade method when executed by a processor.
[0197] The computer program product provided by the present application can solve the technical problem in the prior art that the flashing of vehicle software does not perform security verification, thereby reducing vehicle safety. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the software upgrade method provided by the above embodiment, and will not be repeated here.
[0198] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A software upgrade method, characterized in that: The method is applied to a vehicle side, and the method comprises: Receive software upgrade requests; Based on the software upgrade request, perform version verification according to preset software upgrade data to obtain a version verification result; The preset vehicle software is upgraded according to the software upgrade data and the version verification result to obtain a software upgrade result.
2. The method according to claim 1, characterized in that The step of performing version verification based on the software upgrade request and obtaining a version verification result according to preset software upgrade data comprises: Parsing the software upgrade data according to the software upgrade request through the preset diagnostic software to obtain the encrypted version data, and sending the encrypted version data to the preset vehicle electronic control unit; Based on a preset decryption algorithm, the encrypted version data is decrypted by the vehicle electronic control unit to obtain software upgrade version data; A version check is performed according to the software upgrade version data to obtain the version check result.
3. The method according to claim 2, characterized in that The step of performing version verification according to the software upgrade version data to obtain the version verification result comprises: Obtain the current software version data through the preset database; The current software version data and the software upgrade version data are compared to determine whether the software version corresponding to the software upgrade data is higher than the current software version, and the version verification result is obtained.
4. The method according to claim 1, characterized in that The step of upgrading the preset vehicle software according to the software upgrade data and the version verification result and obtaining the software upgrade result comprises: When the version verification result shows that the software version corresponding to the software upgrade data is higher than the current software version, parsing the software upgrade data to obtain initial software upgrade data; The software upgrade is performed according to the initial software upgrade data through the preset diagnostic software to obtain the software upgrade result.
5. The method according to claim 4, characterized in that The step of performing software upgrade according to the initial software upgrade data by using the preset diagnostic software to obtain the software upgrade result comprises: Execute the software upgrade program in the initial software upgrade data to obtain the installation directory of the current software; According to the software upgrade program, the software update script in the initial software upgrade data is installed to the installation directory of the current software, and the running script of the current software is deleted to obtain the software upgrade result.
6. A software upgrade method, characterized in that: The method is applied to a programming end, and the method includes: Obtain software upgrade version data and initial software upgrade data; Encrypting the software upgrade version data based on a preset encryption algorithm to obtain encrypted version data; Software upgrade data is generated according to the encrypted version data and the initial software upgrade data, and the software upgrade data is sent to the vehicle end.
7. A software upgrade device, characterized in that: The device comprises: A request receiving module, used for receiving a software upgrade request; A version verification module, used to perform version verification based on the software upgrade request and preset software upgrade data to obtain a version verification result; The result obtaining module is used to upgrade the preset vehicle software according to the software upgrading data and the version verification result to obtain the software upgrading result.
8. A software upgrade device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the software upgrade method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the software upgrade method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the software upgrade method according to any one of claims 1 to 6 are implemented.
