Disclosure of Invention
The invention aims to provide an OTA upgrading method and device, which are used for solving the problems of complex software upgrading process and resource waste of an electronic control unit in an automobile in the prior art.
To achieve the above objective, an embodiment of the present invention provides an OTA upgrading method, which is applied to a test system, and includes:
Testing target software to be upgraded to obtain a test result;
Acquiring an upgrade package of the target software according to the test result;
determining the function type of the target software according to the upgrade package of the target software;
and determining a corresponding upgrading mode to carry out OTA upgrading on the target software according to the function type to which the target software belongs.
Optionally, the upgrade mode at least comprises one of a first upgrade mode, a second upgrade mode and a third upgrade mode, wherein,
The safety function corresponds to the first upgrading mode;
the basic function corresponds to the second upgrading mode;
the entertainment function corresponds to the third upgrade mode.
Optionally, the determining, according to the function type to which the target software belongs, the corresponding upgrade mode to perform OTA upgrade on the target software includes:
And under the condition that the upgrading mode is the first upgrading mode, controlling a target vehicle to carry out OTA upgrading on the target software according to an upgrading packet of the target software.
Optionally, the determining, according to the function type to which the target software belongs, the corresponding upgrade mode to perform OTA upgrade on the target software includes:
Transmitting an upgrade package of the target software to a target vehicle under the condition that the upgrade mode is the second upgrade mode;
if a first authorized upgrading request fed back by the target vehicle is obtained, determining that the target vehicle performs OTA upgrading on the target software according to the first authorized upgrading request;
The first authorization upgrading request is used for indicating instruction information for allowing the target software to carry out OTA upgrading.
Optionally, the determining, according to the function type to which the target software belongs, the corresponding upgrade mode to perform OTA upgrade on the target software includes:
If the upgrade mode is the third upgrade mode, sending an upgrade package of the target software to the target vehicle according to the acquired second authorized upgrade request of the target vehicle;
according to the upgrade package of the target software, determining that the target vehicle carries out OTA upgrade on the target software;
The second authorization upgrading request is used for indicating instruction information for allowing the target software to carry out OTA upgrading.
Optionally, the method further comprises:
OTA upgrading is carried out on the target software according to the research and development upgrading mode;
the research and development upgrading mode comprises the step of controlling a target vehicle to carry out OTA upgrading on the target software according to an upgrading package of the target software.
Optionally, after the determining the corresponding upgrading mode performs OTA upgrading on the target software, the method further includes:
after the corresponding upgrading mode is determined, N test cases to be executed are obtained;
And carrying out OTA upgrading on the target software according to the N test cases.
Optionally, after the determining the corresponding upgrading mode performs OTA upgrading on the target software, the method further includes:
and generating a test report with the corresponding relation between the time marks and the test cases according to the N test cases and the time marks after each test case is executed.
In order to achieve the above object, an embodiment of the present invention further provides an OTA upgrading device, including:
the first processing module is used for testing the target software to be upgraded and obtaining a test result;
the second processing module is used for acquiring an upgrade package of the target software according to the test result;
the third processing module is used for determining the function type of the target software according to the upgrade package of the target software;
And the fourth processing module is used for determining a corresponding upgrading mode to carry out OTA upgrading on the target software according to the function type to which the target software belongs.
To achieve the above object, an embodiment of the present invention further provides a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps in the OTA upgrading method as set forth in any one of the above.
The technical scheme of the invention has the following beneficial effects:
The method comprises the steps of testing target software to be upgraded, obtaining a test result, obtaining an upgrade package of the target software according to the test result, determining the function type of the target software according to the upgrade package of the target software, and determining a corresponding upgrade mode to upgrade the target software according to the function type of the target software. According to the function type of the target software, the corresponding upgrading mode is selected for upgrading, so that the equipment of testers can be reduced, the resources of a test car can be saved, the test period can be shortened, and the availability and reliability of the software can be improved.
Detailed Description
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the following detailed description will be given with reference to the accompanying drawings and specific embodiments.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
In addition, the terms "system" and "network" are often used interchangeably herein.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B may be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information.
As shown in fig. 1, an alternative embodiment of the present invention provides an OTA upgrading method, which is applied to a test system and includes:
step 100, testing target software to be upgraded to obtain a test result;
step 200, obtaining an upgrade package of the target software according to the test result;
In this embodiment, in steps 100 to 200, the target software to be upgraded may be automatically tested by the test system to obtain a test result, or the related technician may first perform a single-vehicle brushing test and verification on the OTA upgrade package, after the test and verification are completed, the related technician compresses the tested software and uploads the compressed software to the test system, and the test system issues the upgrade package of the target software to all vehicles meeting the upgrade conditions through the network, and then the backstage upgrade or the owner selects whether to update.
Step 300, determining the function type of the target software according to the upgrade package of the target software;
Step 400, determining a corresponding upgrading mode to perform OTA upgrading on the target software according to the function type to which the target software belongs.
It should be understood that the above-mentioned test system is a remotely controllable cloud platform or cloud server,
In this embodiment, the automatic remote OTA upgrading method provided by the invention selects a proper upgrading mode in steps 100 to 400 to carry out OTA upgrading, so that the equipment of testers can be reduced, the resources of a test car can be saved, the test period can be shortened, the software release period can be further accelerated, and the availability and reliability of software can be improved.
Optionally, the upgrade mode at least comprises one of a first upgrade mode, a second upgrade mode and a third upgrade mode, wherein,
The safety function corresponds to the first upgrading mode;
the basic function corresponds to the second upgrading mode;
the entertainment function corresponds to the third upgrade mode.
It should be noted that, the safety functions include but are not limited to a whole vehicle function, a battery function, a motor function, etc., the basic functions include but are not limited to an air conditioner function, a compressor function, etc., and the entertainment functions include but are not limited to a central control instrument, etc., and the invention further improves the diversity of upgrade modes by selecting different upgrade modes by the software related to different functions, and improves the efficiency of OTA upgrade according to the proper upgrade modes.
Optionally, the step 400 includes:
step 410, controlling the target vehicle to perform OTA upgrade on the target software according to the upgrade package of the target software when the upgrade mode is the first upgrade mode.
In the embodiment, the first upgrading mode is a silent upgrading mode, and the user does not need to carry out authorized downloading and upgrading, and can directly control remote brushing by using an automatic test program, so that the reliability of target software of a safety function class can be ensured, and the safety of an automobile is improved.
Optionally, the step 400 further includes:
step 421, sending an upgrade package of the target software to a target vehicle when the upgrade mode is the second upgrade mode;
step 422, if a first authorized upgrade request fed back by the target vehicle is obtained, determining that the target vehicle performs OTA upgrade on the target software according to the first authorized upgrade request;
The first authorization upgrading request is used for indicating instruction information for allowing the target software to carry out OTA upgrading.
In this embodiment, the second upgrade mode is a forced upgrade mode, in which the user is not required to authorize the download and is required to authorize the upgrade. The first authorization upgrading request fed back by the target vehicle is obtained, and the first authorization upgrading request CAN be understood as a prompt message that a Controller Area Network (CAN) receives a central control screen is started by adopting a manipulator to touch the central control task, the situation of the task is monitored by a camera, and an automatic test program checks the accumulated brushing result.
Optionally, the step 400 further includes:
step 431, sending an upgrade package of the target software to the target vehicle according to the obtained second authorized upgrade request of the target vehicle when the upgrade mode is the third upgrade mode;
step 432, determining that the target vehicle performs OTA upgrade on the target software according to the upgrade package of the target software;
The second authorization upgrading request is used for indicating instruction information for allowing the target software to carry out OTA upgrading.
In this embodiment, the third upgrade mode is a standard upgrade mode, which requires user authorization for upgrade and download. In step 431 and step 432, the test system issues a standard upgrade task, the central control screen pops up "whether to perform standard upgrade prompt", the CAN receives the prompt message of the central control screen to start the touch central control task by using the manipulator, the camera monitors the task performance, and the automated test program checks the accumulated brushing result.
Optionally, the method further comprises:
step 510, performing OTA upgrade on the target software according to the research and development upgrade mode;
In step 520, the developing and upgrading method includes controlling the target vehicle to perform OTA upgrading on the target software according to the upgrade package of the target software.
In the embodiment, the research and development upgrading mode does not need the user to carry out authorized downloading and upgrading, can directly control remote brushing by using an automatic test program, can randomly select vehicles for upgrading in the research and development stage, and ensures the authenticity of data in the research and development stage.
Optionally, after the step 400, the method further includes:
step 441, after determining the corresponding upgrade mode, acquiring N test cases to be executed;
in step 442, OTA upgrade is performed on the target software according to the N test cases.
In this embodiment, the test case is a remote OTA test case. Related technicians can edit remote OTA test cases online or offline, can access online after storing, and can also view and edit offline after downloading. The test system has the functions of test case editing, cloud storage and version management. And on the test system, a cloud access remote brushing platform can be performed, and an automatic execution use case is set to start. According to the invention, when N test cases are finished for OTA upgrading, the cooperative mechanical arm and the cloud platform can be continuously executed for 24 hours, and compared with the working time of 10 hours a day manually, the test time is shortened by 59 percent, and the invention is not limited by working places and working environments, so that the time and the labor cost are saved.
Optionally, after the step 400, the method further includes:
and generating a test report with the corresponding relation between the time marks and the test cases according to the N test cases and the time marks after each test case is executed.
In a specific real-time manner, the first upgrade manner and the research and development upgrade manner are continuously executed in the automatic test remote OTA software setting, and after the execution of one test case is finished, the executed test process and test result are packaged and named as "test case name+timestamp", and are stored in a selected folder. And executing the next brushing test case downwards in sequence until all the brushing test cases are executed or the execution of the cases is stopped manually.
The test case cannot be manually ended in the execution process, and after the execution of the brushing task for the time is finished by clicking the button for finishing the execution of the test case in the execution process of the test case, the next test case is not sequentially executed, and the execution process is stopped.
An automatic control device is placed in front of the central control display screen, the device comprises a cooperative mechanical arm and a camera, and the cooperative mechanical arm can be remotely controlled by an engineer to start working and closing. When the central control pops up the user authorized downloading interface, the CAN network receives the corresponding message, the automatic testing software controls the cooperative mechanical arm to execute different testing cases according to the setting of an engineer, the downloading is automatically clicked to be determined to start or cancel, the whole testing process is monitored and recorded by the camera, and the recording data of the testing process is packaged and stored according to the time stamp, so that after the testing problem occurs, the problem CAN be positioned and searched.
The second upgrading mode is continuously executed in the automatic test software setting without the need of user authorization for automatic downloading, and after the downloading is completed, the central control pops up a user authorization upgrading interface and the cooperative mechanical arm automatically clicks the 'start upgrading'.
And the third upgrading mode is that when the automatic test software is set to be continuously executed and the central control pops up the user authorized downloading interface, the cooperative mechanical arm automatically clicks the 'start downloading'. After the downloading is completed, when the central control pops up the user authorization upgrading interface, the cooperative mechanical arm automatically clicks the 'start upgrading'.
It should be noted that, in the above automated test scheme, the following improvements are also provided:
and a programmable power supply is added, so that automatic test of abnormal power failure in the upgrading process is realized. In the test process, the program-controlled power supply can be utilized to continuously and downwards execute the automatic test process from the breakpoint due to the abnormal power failure condition caused by the test case writing problem or the vehicle problem.
Ethernet data acquisition equipment is added to acquire Ethernet data for data analysis. CAN signals CAN be acquired using a preset tool for test problem localization and data analysis.
And a manipulator and a camera are added to realize the automation of the man-machine interaction part.
Remote OTA software control through automatic test is added, and cloud access automation is achieved.
In summary, the technical scheme of the invention can design by maximally utilizing the existing resources under the conditions of a test system and test resources, can continuously execute the cooperative mechanical arm and the cloud platform for 24 hours, shortens 59% of test time compared with the working time of 10 hours a day of manpower, can remotely control the cooperative mechanical arm in a background mode, is not limited by working places and working environments, saves time and labor cost, controls the central control task to be started or cancelled by the cooperative mechanical arm, saves labor cost, automatically tests to avoid misoperation occurring during the test of personnel, improves the reliability of software, and is convenient for problem positioning and reproduction by monitoring and recording the test process by a camera.
As shown in fig. 2, an optional embodiment of the present invention further provides an OTA upgrading device, including:
The first processing module 10 is used for testing the target software to be upgraded to obtain a test result;
The second processing module 20 is configured to obtain an upgrade package of the target software according to the test result;
A third processing module 30, configured to determine, according to the upgrade package of the target software, a function type to which the target software belongs;
and the fourth processing module 40 is configured to determine, according to the function type to which the target software belongs, a corresponding upgrade mode to perform OTA upgrade on the target software.
It should be noted that the upgrade mode at least includes one of a first upgrade mode, a second upgrade mode, and a third upgrade mode, wherein,
The safety function corresponds to the first upgrading mode;
the basic function corresponds to the second upgrading mode;
the entertainment function corresponds to the third upgrade mode.
Optionally, the fourth processing module 40 includes:
And the first processing unit is used for controlling the target vehicle to carry out OTA upgrade on the target software according to the upgrade package of the target software under the condition that the upgrade mode is the first upgrade mode.
Optionally, the fourth processing module 40 includes:
The second processing unit is used for sending the upgrade package of the target software to the target vehicle under the condition that the upgrade mode is the second upgrade mode;
the third processing unit is used for determining that the target vehicle carries out OTA upgrade on the target software according to the first authorized upgrade request if the first authorized upgrade request fed back by the target vehicle is acquired;
The first authorization upgrading request is used for indicating instruction information for allowing the target software to carry out OTA upgrading.
Optionally, the fourth processing module 40 includes:
The fourth processing unit is used for sending an upgrade package of the target software to the target vehicle according to the acquired second authorized upgrade request of the target vehicle under the condition that the upgrade mode is the third upgrade mode;
a fifth processing unit, configured to determine, according to the upgrade package of the target software, that the target vehicle performs OTA upgrade on the target software;
The second authorization upgrading request is used for indicating instruction information for allowing the target software to carry out OTA upgrading.
Optionally, the apparatus further includes:
the fifth processing module is used for carrying out OTA upgrading on the target software according to the research and development upgrading mode;
the research and development upgrading mode comprises the step of controlling a target vehicle to carry out OTA upgrading on the target software according to an upgrading package of the target software.
Optionally, the apparatus further includes:
the sixth processing module is used for acquiring N test cases to be executed after determining the corresponding upgrading mode;
and the seventh processing module is used for carrying out OTA upgrading on the target software according to the N test cases.
Optionally, the apparatus further includes:
And the eighth processing module is used for generating a test report with the corresponding relation between the time marks and the test cases according to the N test cases and the time marks after the execution of each test case.
The readable storage medium of the embodiment of the present invention stores a program or an instruction, which when executed by a processor, implements the steps in the OTA upgrading method described above, and can achieve the same technical effects, and is not described herein again for avoiding repetition.
The processor is a processor in the OTA upgrading method described in the foregoing embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk or an optical disk.
In an embodiment of the invention, the modules may be implemented in software for execution by various types of processors. An identified module of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions which may, for instance, be organized as an object, procedure, or function. Nevertheless, the executables of an identified module need not be physically located together, but may comprise disparate instructions stored in different bits which, when joined logically together, comprise the module and achieve the stated purpose for the module.
Indeed, a module of executable code may be a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, and across several memory devices. Likewise, operational data may be identified within modules and may be embodied in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including over different storage devices.
Where a module may be implemented in software, taking into account the level of existing hardware technology, a module may be implemented in software, and one skilled in the art may, without regard to cost, build corresponding hardware circuitry, including conventional Very Large Scale Integration (VLSI) circuits or gate arrays, and existing semiconductors such as logic chips, transistors, or other discrete components, to achieve the corresponding functions. A module may also be implemented in programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices or the like.
The exemplary embodiments described above are described with reference to the drawings, many different forms and embodiments are possible without departing from the spirit and teachings of the present invention, and therefore, the present invention should not be construed as limited to the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will convey the scope of the invention to those skilled in the art. In the drawings, the size of the elements and relative sizes may be exaggerated for clarity. The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Unless otherwise indicated, a range of values includes the upper and lower limits of the range and any subranges therebetween.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.