Vehicle upgrade package test method and device, electronic equipment and storage medium
By verifying the completeness and legality of the vehicle upgrade package by asymmetric encryption, decryption and data replacement, the tampering and illegal access of the OTA upgrade package in transmission and storage is solved, and the efficiency and accuracy of vehicle upgrade testing is improved. enhances safety.
Patent Information
- Application Number
- CN202411203501.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, when using OTA to upgrade vehicles, the upgrade package is easily tampered during transmission, resulting in the failure of vehicle upgrades, and there is a risk of illegal access during storage, resulting in abnormal vehicle operation or security vulnerabilities, and lack of effective solutions. plan.
By obtaining the first upgrade package and key information determined based on asymmetric encryption, decryption operations are performed to obtain the second upgrade package, and its target data is replaced to verify the integrity of the signature and upgrade data, and using the replaced upgrade package Control vehicle upgrades and determine test results based on the upgrade results to achieve automated testing of the integrity and legality of vehicle upgrade packages.
It improves the testing efficiency and accuracy of the vehicle upgrade package, ensures the integrity and legality of the upgrade package, prevents tampering and illegal access, and enhances security.
Smart Images

Figure CN119071069A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a testing method, device, electronic equipment and storage medium for a vehicle upgrade package. Background Art
[0002] With the development of wireless communication technology, the application of Over-the-Air Technology (OTA) for vehicle upgrades has become more and more widespread. This technology allows users to download updates through the Internet and complete the system upgrade of the device without physical connection. However, there are the following problems with using OTA for vehicle upgrades: (1) The upgrade package can be tampered with during transmission, resulting in vehicle upgrade failure; (2) The vehicle upgrade package can be illegally accessed during storage, resulting in abnormal vehicle operation and even security vulnerabilities.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for testing a vehicle upgrade package, so as to at least solve the technical problem of low efficiency and accuracy in testing a vehicle upgrade package in the related art.
[0005] According to one embodiment of the present invention, a method for testing a vehicle upgrade package is provided, comprising: obtaining a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method; decrypting the first upgrade package using the key information to obtain a second upgrade package; replacing target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine signature data and upgrade data of the second upgrade package; controlling a target vehicle upgrade using the target upgrade package to obtain a vehicle upgrade result; and determining a target test result based on the vehicle upgrade result, wherein the target test result is used to characterize whether the first upgrade package has passed the test.
[0006] Optionally, obtaining the first upgrade package includes: sending an upgrade package test request to a target server; and receiving, via a gateway device, a first upgrade package corresponding to the upgrade package test request and fed back by the target server.
[0007] Optionally, using the key information to decrypt the first upgrade package to obtain the second upgrade package includes: pre-decrypting the first upgrade package using the key information to obtain a target decryption algorithm; and decrypting the first upgrade package again using the target decryption algorithm to obtain the second upgrade package.
[0008] Optionally, performing a replacement operation on target data of the second upgrade package to obtain a target upgrade package includes: performing a replacement operation on signature data to obtain a third upgrade package; performing a replacement operation on the upgrade data to obtain a fourth upgrade package; and determining the target upgrade package based on the third upgrade package and the fourth upgrade package.
[0009] Optionally, upload the target upgrade package to the target server.
[0010] Optionally, using the target upgrade package to control the target vehicle upgrade and obtaining the vehicle upgrade result includes: controlling the target vehicle to obtain the target upgrade package; in response to the target vehicle completing the upgrade based on the target upgrade package, obtaining an upgrade log; and determining the vehicle upgrade result based on the upgrade log.
[0011] Optionally, controlling the target vehicle to obtain the target upgrade package includes: in response to the target vehicle being in a preset state, controlling the target server to send the target upgrade package to the target vehicle via the gateway device.
[0012] Optionally, determining the target test result based on the vehicle upgrade result includes: in response to the vehicle upgrade result being a target vehicle upgrade failure, determining the target test result to be that the first upgrade package passed the test.
[0013] According to one embodiment of the present invention, there is also provided a testing device for a vehicle upgrade package, comprising: an acquisition module, used to acquire a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method; a decryption module, used to decrypt the first upgrade package using the key information to obtain a second upgrade package; a processing module, used to replace target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine signature data and upgrade data of the second upgrade package; the processing module is also used to control the upgrade of a target vehicle using the target upgrade package to obtain a vehicle upgrade result; a determination module, used to determine a target test result based on the vehicle upgrade result, wherein the target test result is used to characterize whether the first upgrade package has passed the test.
[0014] Optionally, the apparatus further comprises a sending module for sending an upgrade package test request to a target server; the acquiring module is further configured to receive a first upgrade package corresponding to the upgrade package test request fed back by the target server via a gateway device.
[0015] Optionally, the decryption module is further used to: pre-decrypt the first upgrade package using the key information to obtain a target decryption algorithm; and decrypt the first upgrade package again using the target decryption algorithm to obtain a second upgrade package.
[0016] Optionally, the processing module is further used to: perform a replacement operation on the signature data to obtain a third upgrade package; perform a replacement operation on the upgrade data to obtain a fourth upgrade package; and the determination module is further used to determine a target upgrade package based on the third upgrade package and the fourth upgrade package.
[0017] Optionally, the device further includes an uploading module for uploading the target upgrade package to a target server.
[0018] Optionally, the processing module is further used to control the target vehicle to obtain a target upgrade package; the acquisition module is further used to obtain an upgrade log in response to the target vehicle completing the upgrade based on the target upgrade package; the determination module is further used to determine the vehicle upgrade result based on the upgrade log.
[0019] Optionally, the processing module is further configured to control the target server to send a target upgrade package to the target vehicle via the gateway device in response to the target vehicle being in a preset state.
[0020] Optionally, the determination module is further configured to determine, in response to the vehicle upgrade result being that the target vehicle upgrade fails, that the target test result is that the first upgrade package passes the test.
[0021] According to one embodiment of the present invention, there is also provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned vehicle upgrade package testing method is executed when the program is running.
[0022] According to one embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute the above-mentioned vehicle upgrade package testing method.
[0023] According to one embodiment of the present invention, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned vehicle upgrade package testing method is implemented.
[0024] In an embodiment of the present invention, a first upgrade package and key information are obtained, and the key information is used to decrypt the first upgrade package to obtain a second upgrade package. Then, a replacement operation is performed on the target data of the second upgrade package to obtain a target upgrade package. The target upgrade package is then used to control the upgrade of a target vehicle to obtain a vehicle upgrade result. Finally, a target test result is determined based on the vehicle upgrade result, thereby achieving the purpose of completing the test of the integrity and legality of the vehicle upgrade package through an automated testing method, thereby realizing the technical effect of improving the testing efficiency and accuracy of the vehicle upgrade package, and further solving the technical problem of low testing efficiency and accuracy of the vehicle upgrade package in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 is a flow chart of a method for testing a vehicle upgrade package according to one embodiment of the present invention;
[0027] Figure 2 is a flow chart of another method for testing a vehicle upgrade package according to one embodiment of the present invention;
[0028] Figure 3 The present invention is a structural block diagram of a vehicle upgrade package testing device according to one embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] According to an embodiment of the present invention, a method embodiment of a vehicle upgrade package testing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] The method embodiment can be executed in an electronic device or a similar computing device including a memory and a processor. Taking running on a vehicle terminal as an example, the vehicle terminal may include one or more processors (the processor may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (Field Programmable Gate Array, FPGA), a neural network processor (Neural-network Processor Unit, NPU), a tensor processor (Tensor Processing Unit, TPU), an artificial intelligence (Artificial Intelligence, AI) type processor, etc.) and a memory for storing data. Optionally, the above-mentioned vehicle terminal may also include a transmission device, an input and output device, and a display device for communication functions. It can be understood by those of ordinary skill in the art that the above-mentioned structural description is only for illustration and does not limit the structure of the above-mentioned vehicle terminal. For example, the vehicle terminal may also include more or fewer components than the above-mentioned structural description, or have a configuration different from the above-mentioned structural description.
[0033] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the test method of the vehicle upgrade package in the embodiment of the present invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, that is, the test method of the vehicle upgrade package described above is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0035] The display device may be, for example, a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of a mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contacts and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0036] According to an embodiment of the present invention, a method embodiment of a vehicle upgrade package testing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] Figure 1 is a flow chart of a method for testing a vehicle upgrade package according to one embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0038] Step S101, obtaining a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method;
[0039] In step S101, the first upgrade package is used to represent the upgrade package stored in the OTA platform. In the OTA platform, the upgrade package is encrypted using an asymmetric encryption algorithm.
[0040] Specifically, the OTA platform generates a pair of asymmetric keys, and the private key is stored on the OTA platform. The first upgrade package is encrypted based on the private key. The public key is used for decryption and is distributed to all gateway devices. The first upgrade package and public key information are obtained from the gateway device.
[0041] Step S102, using the key information to decrypt the first upgrade package to obtain a second upgrade package;
[0042] Specifically, the first upgrade package is decrypted using the key information obtained from the gateway device to obtain the second upgrade package, wherein the decrypted upgrade package, ie, the second upgrade package, contains signature data and upgrade data.
[0043] Step S103, performing a replacement operation on the target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine the signature data and upgrade data of the second upgrade package;
[0044] Specifically, the signature data and the upgrade data in the second upgrade package are replaced to verify the integrity and legitimacy of the upgrade package. For example, a random number is used to replace part of the data in the signature data to generate new signature data. Similarly, a random number is used to replace part of the data in the upgrade data to generate new upgrade data.
[0045] Step S104, using the target upgrade package to control the target vehicle upgrade and obtain the vehicle upgrade result;
[0046] In step S104, the vehicle upgrade result is used to indicate whether the target vehicle is successfully upgraded or failed to be upgraded.
[0047] Specifically, the replaced upgrade package, ie, the target upgrade package, is used to perform an upgrade operation on the vehicle to obtain a vehicle upgrade result.
[0048] Step S105 , determining a target test result based on the vehicle upgrade result, wherein the target test result is used to indicate whether the first upgrade package passes the test.
[0049] In step S105, the target test result is used to indicate whether the first upgrade package in the OTA platform passes the integrity and legality test.
[0050] Specifically, after the target vehicle completes the vehicle upgrade based on the target upgrade package, it is determined whether the first upgrade package in the OTA platform passes the integrity and legality test according to the upgrade result of the target vehicle.
[0051] Based on the above steps S101 to S105, a method of obtaining a first upgrade package and key information is adopted, and the first upgrade package is decrypted using the key information to obtain a second upgrade package. The target data of the second upgrade package is then replaced to obtain a target upgrade package. The target upgrade package is then used to control the upgrade of a target vehicle to obtain a vehicle upgrade result. Finally, a target test result is determined based on the vehicle upgrade result, thereby achieving the purpose of completing the test of the integrity and legality of the vehicle upgrade package through an automated testing method, thereby realizing the technical effect of improving the testing efficiency and accuracy of the vehicle upgrade package, and further solving the technical problem of low testing efficiency and accuracy of the vehicle upgrade package in the related art.
[0052] Optionally, in step S101, obtaining a first upgrade package includes:
[0053] Step S1011, sending an upgrade package test request to the target server;
[0054] In step S1011, the target server is used to represent the OTA platform.
[0055] The upgrade package test request includes but is not limited to the version information of the upgrade package to be tested, the identifier information of the electronic control unit (ECU) to be upgraded, the identifier information of the target vehicle, etc.
[0056] Step S1012: receiving, via the gateway device, a first upgrade package corresponding to the upgrade package test request fed back by the target server.
[0057] Specifically, an upgrade package test request is sent to the OTA platform using an automated test tool. When the OTA platform receives the upgrade package test request, it sends the first upgrade package to the gateway device; and obtains the first upgrade package from the gateway device.
[0058] Based on the above steps S1011 to S1012, an upgrade package test request is sent to the target server; the first upgrade package corresponding to the upgrade package test request is received via the gateway device and the encrypted first upgrade package is decrypted by obtaining the key from the gateway device. Even if an attacker obtains the decryption key using internal permissions, he cannot bypass the security protection measures, thereby enhancing the ability to defend against internal attacks.
[0059] Optionally, in step S102, the first upgrade package is decrypted using the key information to obtain a second upgrade package including:
[0060] Step S1021, pre-decrypting the first upgrade package using the key information to obtain a target decryption algorithm;
[0061] Step S1022: Decrypt the first upgrade package again using the target decryption algorithm to obtain a second upgrade package.
[0062] Specifically, the first upgrade package is pre-decrypted using the key information obtained from the gateway device to obtain the encryption algorithm used when generating the first upgrade package, and the target decryption algorithm can be determined using the encryption algorithm.
[0063] Furthermore, the first upgrade package is decrypted again using a target decryption algorithm to obtain a second upgrade package, wherein the second upgrade package includes signature data and upgrade data.
[0064] Based on the above steps S1021 to S1022, the first upgrade package is pre-decrypted using the key information to obtain the target decryption algorithm; the first upgrade package is decrypted again using the target decryption algorithm to obtain the second upgrade package. The second upgrade package can be obtained quickly, thereby improving the efficiency of vehicle upgrade package testing.
[0065] Optionally, in step S103, a replacement operation is performed on target data of the second upgrade package to obtain a target upgrade package including:
[0066] Step S1031, performing a replacement operation on the signature data to obtain a third upgrade package;
[0067] Step S1032, performing a replacement operation on the upgrade data to obtain a fourth upgrade package;
[0068] Step S1033: determining a target upgrade package based on the third upgrade package and the fourth upgrade package.
[0069] Specifically, the signature data in the second upgrade package is replaced to obtain a third upgrade package, and the upgrade data in the second upgrade package is replaced to obtain a fourth upgrade package. The target upgrade package is the third upgrade package or the fourth upgrade package, or the replaced signature data and the replaced upgrade data are used as the target upgrade package. For example, a certain part of the characters in the signature data in the second upgrade package is tampered to obtain the third upgrade package, and a certain part of the characters in the upgrade data in the second upgrade package is tampered to obtain the fourth upgrade package. The tampered signature data and the tampered upgrade data are determined as the target upgrade package.
[0070] Based on the above steps S1031 to S1033, a replacement operation is performed on the signature data to obtain a third upgrade package; a replacement operation is performed on the upgrade data to obtain a fourth upgrade package; the target upgrade package is determined based on the third upgrade package and the fourth upgrade package, thereby achieving the purpose of completing the test of the integrity and legality of the vehicle upgrade package through automated testing, thereby achieving the technical effect of improving the efficiency and accuracy of vehicle upgrade package testing, and further solving the technical problem of low efficiency and accuracy in vehicle upgrade package testing in related technologies.
[0071] Optionally, the testing method of the vehicle upgrade package further includes:
[0072] Step S106, uploading the target upgrade package to the target server.
[0073] Specifically, the replaced signature data and the replaced upgrade data are determined as a target upgrade package, and the target upgrade package is uploaded to the OTA platform.
[0074] Based on the above step S106, the target upgrade package is uploaded to the target server, and then the upgrade package distribution task is triggered by the control gateway. In this way, even if the attacker uses internal permissions to obtain the decryption key, he cannot bypass the security protection measures, thereby enhancing the ability to prevent internal attacks.
[0075] Optionally, in step S104, the target vehicle is upgraded by using the target upgrade package, and the vehicle upgrade result obtained includes:
[0076] Step S1041, controlling the target vehicle to obtain a target upgrade package;
[0077] Step S1042, in response to the target vehicle completing the upgrade based on the target upgrade package, obtaining an upgrade log;
[0078] Step S1043, determining the vehicle upgrade result based on the upgrade log.
[0079] Specifically, the target vehicle is controlled to obtain the target upgrade package, and after the target vehicle obtains the target upgrade package, the vehicle is upgraded based on the target upgrade package. When the target vehicle completes the vehicle upgrade based on the target upgrade package, the vehicle upgrade log is read to check the vehicle upgrade result, that is, to check whether the target vehicle is successfully upgraded.
[0080] Based on the above steps S1041 to S1043, the target vehicle is controlled to obtain the target upgrade package; in response to the target vehicle completing the upgrade based on the target upgrade package, an upgrade log is obtained; the vehicle upgrade result is determined based on the upgrade log, and after waiting for the vehicle upgrade to be completed, the upgrade log is read to check whether the upgrade is successful, thereby verifying the integrity and legitimacy of the upgrade package, thereby improving the efficiency and accuracy of vehicle upgrade package testing.
[0081] Optionally, in step S1041, controlling the target vehicle to obtain the target upgrade package includes:
[0082] Step S10411, in response to the target vehicle being in a preset state, controlling the target server via the gateway device to send the target upgrade package to the target vehicle.
[0083] In step S10411, the above-mentioned preset state is used to characterize the vehicle state when the vehicle is being upgraded. For example, the vehicle needs to be in a powered-on state when upgrading, the vehicle is not in a charging state, and the battery voltage of the vehicle needs to be above 12V.
[0084] Specifically, when the target vehicle is in a preset state to meet the vehicle upgrade conditions, the gateway device is used to trigger the task of sending the upgrade package, so that the OTA platform sends the target upgrade package to the target vehicle.
[0085] Based on the above step S10411, in response to the target vehicle being in a preset state, the target server is controlled via the gateway device to send the target upgrade package to the target vehicle. The upgrade package sending task is triggered by controlling the gateway device. There is no need to rely on a trusted third-party organization. Therefore, while reducing the complexity and management cost of the test, the independence and reliability of the test are improved.
[0086] Optionally, in step S105, determining the target test result based on the vehicle upgrade result includes:
[0087] Step S1051, in response to the vehicle upgrade result being that the target vehicle upgrade fails, determining the target test result is that the first upgrade package passes the test.
[0088] Specifically, the target vehicle uses the tampered upgrade package to perform vehicle update. When the target vehicle completes the vehicle upgrade based on the target upgrade package, the vehicle upgrade log is read. If it is determined based on the vehicle upgrade log that the target vehicle upgrade fails, it means that the upgrade package that has not been replaced, that is, the first upgrade package, has passed the integrity and legality test. If it is determined based on the vehicle upgrade log that the target vehicle upgrade is successful, it means that the upgrade package that has not been replaced, that is, the first upgrade package, has not passed the integrity and legality test.
[0089] Based on the above step S1051, in response to the vehicle upgrade result being the target vehicle upgrade failure, determining the target test result is that the first upgrade package passed the test, the integrity and legitimacy of the OTA upgrade package can be effectively detected without relying on a trusted third-party organization.
[0090] Figure 2 FIG. 1 is a flow chart of another method for testing a vehicle upgrade package according to one embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0091] Step S201, sending an upgrade package test request to a target server;
[0092] Step S202, receiving, via the gateway device, a first upgrade package corresponding to the upgrade package test request fed back by the target server;
[0093] Step S203, pre-decrypting the first upgrade package using the key information to obtain a target decryption algorithm;
[0094] Step S204, decrypting the first upgrade package again using the target decryption algorithm to obtain a second upgrade package;
[0095] Step S205, performing a replacement operation on the signature data to obtain a third upgrade package;
[0096] Step S206, performing a replacement operation on the upgrade data to obtain a fourth upgrade package;
[0097] Step S207, determining a target upgrade package based on the third upgrade package and the fourth upgrade package;
[0098] Step S208, uploading the target upgrade package to the target server;
[0099] Step S209, controlling the target vehicle to obtain the target upgrade package;
[0100] Step S210, in response to the target vehicle completing the upgrade based on the target upgrade package, obtaining an upgrade log;
[0101] Step S211, determining the vehicle upgrade result based on the upgrade log;
[0102] Step S212: in response to the target vehicle being in a preset state, controlling the target server to send a target upgrade package to the target vehicle via the gateway device;
[0103] Step S213, in response to the vehicle upgrade result being that the target vehicle upgrade fails, determining the target test result to be that the first upgrade package passes the test.
[0104] Based on the above steps S201 to S213, a method of obtaining a first upgrade package and key information is adopted, and the first upgrade package is decrypted using the key information to obtain a second upgrade package. The target data of the second upgrade package is then replaced to obtain a target upgrade package. The target upgrade package is then used to control the upgrade of a target vehicle to obtain a vehicle upgrade result. Finally, a target test result is determined based on the vehicle upgrade result, thereby achieving the purpose of completing the test of the integrity and legality of the vehicle upgrade package through an automated testing method, thereby realizing the technical effect of improving the testing efficiency and accuracy of the vehicle upgrade package, and further solving the technical problem of low testing efficiency and accuracy of the vehicle upgrade package in the related art.
[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0106] In an embodiment of the present invention, a testing device for a vehicle upgrade package is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0107] Figure 3 1 is a structural block diagram of a vehicle upgrade package testing device according to one embodiment of the present invention. Figure 3 As shown, the device comprises:
[0108] The acquisition module 301 acquires a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method;
[0109] The decryption module 302 uses the key information to decrypt the first upgrade package to obtain a second upgrade package;
[0110] The processing module 303 performs a replacement operation on the target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine the signature data and upgrade data of the second upgrade package;
[0111] Processing module 303, using the target upgrade package to control the target vehicle upgrade and obtain the vehicle upgrade result;
[0112] The determination module 304 is configured to determine a target test result based on the vehicle upgrade result, wherein the target test result is used to indicate whether the first upgrade package passes the test.
[0113] Optionally, the apparatus further includes a sending module 305 for sending an upgrade package test request to a target server; the obtaining module 301 is further configured to receive a first upgrade package corresponding to the upgrade package test request fed back by the target server via a gateway device.
[0114] Optionally, the decryption module 302 is further used to: pre-decrypt the first upgrade package using the key information to obtain a target decryption algorithm; and decrypt the first upgrade package again using the target decryption algorithm to obtain a second upgrade package.
[0115] Optionally, the processing module 303 is further used to: perform a replacement operation on the signature data to obtain a third upgrade package; perform a replacement operation on the upgrade data to obtain a fourth upgrade package; and the determination module 304 is further used to determine a target upgrade package based on the third upgrade package and the fourth upgrade package.
[0116] Optionally, the device further includes an uploading module 305 for uploading the target upgrade package to a target server.
[0117] Optionally, the processing module 303 is also used to control the target vehicle to obtain the target upgrade package; the acquisition module 301 is also used to obtain the upgrade log in response to the target vehicle completing the upgrade based on the target upgrade package; the determination module 304 is also used to determine the vehicle upgrade result based on the upgrade log.
[0118] Optionally, the processing module 303 is further configured to control the target server to send a target upgrade package to the target vehicle via the gateway device in response to the target vehicle being in a preset state.
[0119] Optionally, the determination module 304 is further configured to determine, in response to the vehicle upgrade result being that the target vehicle upgrade fails, that the target test result is that the first upgrade package passes the test.
[0120] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0121] According to one embodiment of the present invention, there is also provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned vehicle upgrade package testing method is executed when the program is running.
[0122] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0123] Step S1, obtaining a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method;
[0124] Step S2, using the key information to decrypt the first upgrade package to obtain a second upgrade package;
[0125] Step S3, performing a replacement operation on the target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine the signature data and upgrade data of the second upgrade package;
[0126] Step S4, using the target upgrade package to control the target vehicle upgrade and obtain the vehicle upgrade result;
[0127] Step S5, determining a target test result based on the vehicle upgrade result, wherein the target test result is used to indicate whether the first upgrade package passes the test.
[0128] According to one embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute the above-mentioned vehicle upgrade package testing method.
[0129] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0130] Step S1, obtaining a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method;
[0131] Step S2, using the key information to decrypt the first upgrade package to obtain a second upgrade package;
[0132] Step S3, performing a replacement operation on the target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine the signature data and upgrade data of the second upgrade package;
[0133] Step S4, using the target upgrade package to control the target vehicle upgrade and obtain the vehicle upgrade result;
[0134] Step S5, determining a target test result based on the vehicle upgrade result, wherein the target test result is used to indicate whether the first upgrade package passes the test.
[0135] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0136] According to one embodiment of the present invention, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned vehicle upgrade package testing method is implemented.
[0137] Optionally, in this embodiment, the computer program product may be configured as a computer program for executing the following steps:
[0138] Step S1, obtaining a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method;
[0139] Step S2, using the key information to decrypt the first upgrade package to obtain a second upgrade package;
[0140] Step S3, performing a replacement operation on the target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine the signature data and upgrade data of the second upgrade package;
[0141] Step S4, using the target upgrade package to control the target vehicle upgrade and obtain the vehicle upgrade result;
[0142] Step S5, determining a target test result based on the vehicle upgrade result, wherein the target test result is used to indicate whether the first upgrade package passes the test.
[0143] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0144] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0145] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0148] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for 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: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0150] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for testing a vehicle upgrade package, characterized in that: include: Obtaining a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method; Decrypting the first upgrade package using the key information to obtain a second upgrade package; Performing a replacement operation on target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine signature data and upgrade data of the second upgrade package; Using the target upgrade package to control the target vehicle upgrade, and obtain a vehicle upgrade result; A target test result is determined based on the vehicle upgrade result, wherein the target test result is used to indicate whether the first upgrade package passes the test.
2. The vehicle upgrade package testing method according to claim 1, characterized in that: Obtaining the first upgrade package includes: Send an upgrade package test request to the target server; The first upgrade package corresponding to the upgrade package test request fed back by the target server is received via a gateway device.
3. The vehicle upgrade package testing method according to claim 1, characterized in that: The first upgrade package is decrypted using the key information to obtain a second upgrade package including: Pre-decrypting the first upgrade package using the key information to obtain a target decryption algorithm; The first upgrade package is decrypted again using the target decryption algorithm to obtain the second upgrade package.
4. The vehicle upgrade package testing method according to claim 1, characterized in that: Performing a replacement operation on the target data of the second upgrade package to obtain the target upgrade package includes: Performing a replacement operation on the signature data to obtain a third upgrade package; Performing a replacement operation on the upgrade data to obtain a fourth upgrade package; The target upgrade package is determined based on the third upgrade package and the fourth upgrade package.
5. The vehicle upgrade package testing method according to claim 2, characterized in that: Upload the target upgrade package to the target server.
6. The vehicle upgrade package testing method according to claim 5, characterized in that: Using the target upgrade package to control the target vehicle upgrade, obtaining the vehicle upgrade result includes: Controlling the target vehicle to obtain the target upgrade package; In response to the target vehicle completing the upgrade based on the target upgrade package, acquiring an upgrade log; The vehicle upgrade result is determined based on the upgrade log.
7. The vehicle upgrade package testing method according to claim 6, characterized in that: Controlling the target vehicle to obtain the target upgrade package includes: In response to the target vehicle being in the preset state, the target server is controlled via the gateway device to send the target upgrade package to the target vehicle.
8. The vehicle upgrade package testing method according to claim 1, characterized in that: Determining a target test result based on the vehicle upgrade result includes: In response to the vehicle upgrade result being that the target vehicle upgrade fails, the target test result is determined to be that the first upgrade package passes the test.
9. A vehicle upgrade package testing device, characterized in that: include: An acquisition module, configured to acquire a first upgrade package and key information, wherein the first upgrade package is determined based on an asymmetric encryption method; A decryption module, used to decrypt the first upgrade package using the key information to obtain a second upgrade package; a processing module, configured to perform a replacement operation on target data of the second upgrade package to obtain a target upgrade package, wherein the target data is used to determine signature data and upgrade data of the second upgrade package; The processing module is also used to control the target vehicle upgrade using the target upgrade package to obtain a vehicle upgrade result; A determination module is used to determine a target test result based on the vehicle upgrade result, wherein the target test result is used to indicate whether the first upgrade package passes the test.
10. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program, when running, executes the vehicle upgrade package testing method described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the vehicle upgrade package testing method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the vehicle upgrade package testing method according to any one of claims 1 to 8 when being executed by a processor.
