CN118708500B - Software detection method and device, equipment, and storage medium - Google Patents
Software detection method and device, equipment, and storage medium Download PDFInfo
- Publication number
- CN118708500B CN118708500B CN202411210417.0A CN202411210417A CN118708500B CN 118708500 B CN118708500 B CN 118708500B CN 202411210417 A CN202411210417 A CN 202411210417A CN 118708500 B CN118708500 B CN 118708500B
- Authority
- CN
- China
- Prior art keywords
- software package
- detection result
- software
- detection
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3604—Analysis of software for verifying properties of programs
- G06F11/3612—Analysis of software for verifying properties of programs by runtime analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a method, a device, equipment and a storage medium for detecting software, wherein the method comprises the steps of determining a second software package under the condition that a first software package in an activation area is updated, starting the second software package, detecting starting parameters of the second software package, determining a detection result, and if the detection result represents abnormal operation, switching from the activation area to an inactivation area and operating a third software package in the inactivation area, wherein the starting parameters comprise at least one of the progress of initialization, the transmission state of a message and the starting time, the first software package and the third software package belong to the same software package, and the starting time represents the starting time of a controller.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for detecting software, a device, and a storage medium.
Background
In the current market, a part of vehicles are provided with chips supporting an AB exchange partition (AB Swap), because the redundancy mechanism ensures that the whole vehicle section always has two sets of programs, when the new version Application program (APP) is updated, the problem that the new version is incompatible with the current whole vehicle section or affects another function and the like can occur, and the old version program is required to be returned.
The prior art method for solving the problem is that the new version APP is unloaded and the previous version APP program is rewritten, but the method not only consumes long time, but also can cause that the program is wrongly written and the program is not normally returned to the previous version.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for detecting software, which can solve the problem that updated software is incompatible and shorten the time for processing the problem.
The embodiment of the application provides a software detection method, which comprises the following steps:
determining a second software package under the condition that the first software package of the activation area is updated;
Starting a second software package, detecting starting parameters of the second software package, and determining a detection result;
If the detection result indicates that the operation is abnormal, switching from the active area to the inactive area, and operating a third software package of the inactive area, wherein the starting parameters comprise at least one of the initializing progress, the transmission state of a message and the starting time, the first software package and the third software package belong to the same software package, and the starting time indicates the starting time of the controller.
It can be understood that under the condition that the first software package in the activation area is updated, the second software package is determined, the second software package is started, the starting parameters of the second software package are detected, the detection result is determined, the second software package can be detected automatically, whether the second software package is abnormal or not is not acquired through the upper controller, the time for acquiring whether the second software package is abnormal or not can be saved, wherein the starting parameters comprise at least one of the progress of initialization, the transmission state of a message and the starting time, and the starting time characterizes the starting time of the controller. When the second software package is detected to be abnormal, the second software package is actively switched to the inactive area from the active area where the second software package is located through switching processing, a third software package in the inactive area is operated, and the second software package in the active area is automatically switched to the third software package in the inactive area in the whole process of recovering the third software package operation in the inactive area from the second software package, so that the accurate rollback to the third software package is realized, and meanwhile, the time for solving the software fault can be reduced, wherein the first software package and the third software package belong to the same software package.
In the above scheme, starting the second software package, detecting the starting parameter of the second software package, and determining the detection result includes:
And starting the second software package, detecting at least one starting parameter of the initializing progress of the second software package, the transmission state of the message and the starting time, and determining a detection result of the second software package, wherein the starting time represents the starting time of the controller.
It can be understood that at least one starting parameter of the initialization progress of the second software package, the transmission state of the message and the starting time is detected, and the detection result is determined, so that the second software package can be self-detected, whether the second software package is abnormal or not is not acquired through the upper controller, and the time for acquiring whether the second software package is abnormal or not can be saved.
In the above scheme, detecting at least one starting parameter of the progress of initialization of the second software package, the transmission state of the message and the starting time, and determining a detection result of the second software package includes:
detecting the initialization progress of the second software package, and determining a first detection result of the second software package;
Detecting the transmission state of the message of the second software package, and determining a second detection result of the second software package;
detecting the starting time of the second software package, and determining a third detection result of the second software package;
And determining a detection result of the second software package based on at least one of the first detection result, the second detection result and the third detection result.
It can be understood that the progress of the initialization of the second software package, the transmission state of the message and the start time are respectively detected, and the first detection result, the second detection result and the third detection result of the second software package are determined. And determining the detection result of the second software package based on at least one of the first detection result, the second detection result and the third detection result, so that the second software package can be self-detected, whether the second software package is abnormal or not is not required to be acquired through the upper controller, and the time for acquiring whether the second software package is abnormal or not can be saved.
In the above scheme, detecting the initialization progress of the second software package, and determining the first detection result of the second software package includes:
Detecting the progress of the initialization of the second software package through a first flag bit, wherein the first flag bit represents whether the initialization of the second software package is completed or not;
If the value of the first flag bit is a first value, determining that the first detection result is normal, wherein the first value represents that the initialization of the second software package is completed;
if the value of the first flag bit is a second value, determining that the first detection result is abnormal, wherein the second value represents that the initialization of the second software package is not completed.
It can be understood that the first flag bit is used for detecting the initialization progress of the second software package, if the value of the first flag bit is the first value, the first detection result is determined to be normal, and if the value of the first flag bit is the second value, the first detection result is determined to be abnormal, so that the subsequent determination of the detection result of the second software package according to the first detection result is facilitated, the self detection of the second software package is further realized, and the time for acquiring whether the second software package has an abnormal condition is saved.
In the above scheme, detecting the transmission state of the message of the second software package, and determining the second detection result of the second software package includes:
Detecting the transmission state of the message of the second software package through a second flag bit, wherein the second flag bit represents whether the controller successfully sends out the first frame message or not;
If the value of the second flag bit is a third value, determining that the second detection result is normal, wherein the third value represents that the controller successfully sends out the first frame message;
If the value of the second flag bit is a fourth value, determining that the second detection result is abnormal, wherein the fourth value represents that the controller does not send the first frame message.
It can be understood that the second flag bit is used for detecting the transmission state of the message of the second software package, if the value of the second flag bit is the third value, the second detection result is determined to be normal, and if the value of the second flag bit is the fourth value, the second detection result is determined to be abnormal, so that the subsequent determination of the detection result of the second software package according to the second detection result is facilitated, the self-detection of the second software package is further realized, and the time for acquiring whether the second software package has an abnormal condition or not is saved.
In the above scheme, detecting the start time of the second software package, and determining the third detection result of the second software package includes:
detecting the starting time of the second software package through a time threshold, wherein the time threshold is based on the starting time of controllers of vehicles preset by vehicles of different vehicle enterprises, and the vehicles of the different vehicle enterprises correspond to different time thresholds;
If the starting time is smaller than the time threshold, determining that the third detection result is normal;
And if the starting time is equal to or greater than the time threshold, determining that the third detection result is abnormal.
It can be understood that the starting time of the second software package is detected through the time threshold, if the starting time is smaller than the time threshold, the third detection result is determined to be normal, and if the starting time is equal to or larger than the time threshold, the third detection result is determined to be abnormal, so that the subsequent determination of the detection result of the second software package according to the third detection result is facilitated, the self detection of the second software package is further realized, and the time for acquiring whether the second software package has an abnormal condition is saved.
In the above solution, determining the detection result of the second software package based on at least one of the first detection result, the second detection result and the third detection result includes:
if the first detection result, the second detection result and the third detection result are all normal, determining that the detection result of the second software package is normal;
If at least one of the first detection result, the second detection result and the third detection result is abnormal, determining that the detection result of the second software package is abnormal.
It can be understood that according to one, two or three of the first, second and third detection results, the detection result of the second software package is determined, so as to further realize self-detection of the second software package and save the time for obtaining whether the second software package has an abnormal condition.
In the above scheme, if the detection result indicates that the operation is abnormal, the third software package for switching from the active area to the inactive area and operating the inactive area includes:
If the detection result is abnormal, continuing to perform functional detection on the second software package until the maximum detection times are reached, and obtaining a plurality of detection results;
if the detection results are abnormal, switching from the active area to the inactive area, and running a third software package of the inactive area.
It can be understood that if the detection result is abnormal, the function detection is continuously performed on the second software package until the maximum detection times are reached, so as to obtain multiple detection results, prevent false detection of the second software package, ensure the accuracy of detection of the second software package, and if the detection results are abnormal, switch from the active area to the inactive area, operate the third software package of the inactive area, fail from the second software package, and automatically switch from the second software package of the active area to the third software package of the inactive area in the process of recovering the operation of the third software package of the inactive area, thereby realizing accurate rollback to the third software package, and simultaneously, also reducing the time for solving the software failure.
In the above scheme, the second software package is started, the starting parameters of the second software package are detected, and before the detection result is determined, the method further comprises:
When the second software package of the activation area is started for the first time, a detection switch is started;
Under the condition that the detection switch is started, initializing starting parameters corresponding to a chip starting stage, a guiding software running stage and a second software package running stage, and determining an initializing result;
closing the detection switch under the condition that the initialization result is determined and the second software package is started;
and detecting the starting parameter of the second software package under the condition that the detection switch is closed.
It can be appreciated that the initialization of the start-up parameters is accomplished by activating the detection switch, facilitating the subsequent detection of the second software package.
The embodiment of the application provides a software detection device, which comprises an updating unit, a detection unit and a cutting unit, wherein,
An updating unit, configured to determine a second software package when the first software package in the active area completes updating;
The detection unit is used for starting the second software package, detecting starting parameters of the second software package and determining detection results;
The area switching unit is used for switching from the active area to the inactive area and running a third software package of the inactive area if the detection result represents abnormal operation;
The starting parameters comprise at least one of the progress of initialization, the transmission state of a message and the starting time, wherein the first software package and the third software package belong to the same software package, and the starting time characterizes the starting time of the controller.
The embodiment of the application provides a software detection device, which comprises a processor and a memory, wherein,
A memory for storing a computer program;
And the processor is used for calling and running the computer program from the memory to execute the software detection method.
The embodiment of the application provides a computer readable storage medium, which stores executable instructions for realizing the software detection method when being executed by a processor.
The embodiment of the application provides a method, a device, equipment and a storage medium for detecting software, wherein the method comprises the steps of determining a second software package under the condition that a first software package in an activation area is updated, starting the second software package, detecting starting parameters of the second software package, determining a detection result, switching from the activation area to an inactivation area and operating a third software package in the inactivation area if the detection result represents abnormal operation, wherein the starting parameters comprise at least one of the progress of initialization, the transmission state of a message and the starting time, the first software package and the third software package belong to the same software package, and the starting time represents the starting time of a controller. By adopting the scheme, under the condition that the first software package in the activation area is updated, the second software package is determined, the second software package is started, the starting parameters of the second software package are detected, the self-detection of the second software package can be realized by the determined detection result, the time for acquiring whether the second software package is abnormal or not can be saved without acquiring whether the second software package is abnormal or not through the upper controller, wherein the starting parameters comprise at least one of the initialization progress, the transmission state of a message and the starting time, and the starting time characterizes the starting time of the controller. When the second software package is detected to be abnormal, the second software package is actively switched to the inactive area from the active area where the second software package is located through switching processing, a third software package in the inactive area is operated, and the second software package in the active area is automatically switched to the third software package in the inactive area in the whole process of recovering the third software package operation in the inactive area from the second software package, so that the accurate rollback to the third software package is realized, and meanwhile, the time for solving the software fault can be reduced, wherein the first software package and the third software package belong to the same software package.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
FIG. 1 is a schematic diagram of an alternative flow chart of a software detection method according to an embodiment of the present application;
FIG. 2 is a second flowchart of an alternative software detection method according to an embodiment of the present application;
FIG. 3 is a schematic diagram III of an alternative method for detecting software according to an embodiment of the present application;
FIG. 4 is a schematic diagram showing an alternative flow chart of a software detection method according to an embodiment of the present application;
FIG. 5A is a schematic diagram of an alternative cutting area of a software detection method according to an embodiment of the present application;
FIG. 5B is a schematic diagram of an alternative cutting area of a software detection method according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating an alternative second software package start-up method for detecting software according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a software detection device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a software detection device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more apparent, the specific technical solutions of the present application will be described in further detail below with reference to the accompanying drawings in the embodiments of the present application. The following examples are illustrative of the application and are not intended to limit the scope of the application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
In the following description reference is made to "some embodiments," "this embodiment," "an embodiment of the application," and examples, etc., which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with one another without conflict.
If a similar description of "first/second" appears in the application document, the following description is added, in which the terms "first/second/third" are merely distinguishing between similar objects and not representing a particular ordering of the objects, it being understood that the "first/second/third" may, where allowed, interchange a particular order or precedence order such that embodiments of the application described herein may be implemented in an order other than that illustrated or described herein.
Fig. 1 is a schematic flow chart of an alternative method for detecting software according to an embodiment of the present application, as shown in fig. 1, the method for detecting software includes the following steps:
s101, determining a second software package under the condition that the first software package of the activation area is updated.
In some embodiments of the present application, the method for detecting software provided in the embodiments of the present application may be applicable to detection of a plurality of different types of software packages, for example, a software package of a mobile phone application, a software package installed in a computer, a software package installed on a vehicle terminal, and the like. The embodiment of the present application is not particularly limited in this regard.
In some embodiments of the present application, the second software package is issued to the vehicle terminal through the cloud, and the vehicle terminal detects whether the second software package can normally operate. The second software package is typically a functional upgrade involving the vehicle, including body, chassis, intelligent drive, etc.
In some embodiments of the present application, for upgrading the first software package to the second software package, no sense is required during the upgrade, i.e. the system can still download the program during running, and the standby time is zero. There is always one backup program available for rollback for upgrade exception handling requirements. Therefore, many chip factories provide a mechanism beneficial to upgrading from the hardware, for example, a TC3xx a\b SWAP mechanism, a ST SPC58NH92 HARDWARE FLASH A/B context swapping mechanism, a NXP S32K3 ab_swap mechanism, and the like, under the mechanism, flash needs to support RWW (Read While Write) attribute, the space of Flash is divided into two banks (also called parties) according to the design of the chip factories, the two physical banks can be alternately allocated with a unified logical address by the hardware, when the system is running, only one Bank (a Bank) can run codes (called active Bank), and the other Bank (B Bank) is called inactive Bank, when the a Bank runs, new codes can be written onto the B Bank, after the code updating on the B Bank is completed, the B Bank is the active zone, the a Bank is the inactive zone, and when the next system is powered on again, the B Bank is automatically switched to the latest B Bank, thereby realizing zero standby time.
It should be noted that active Bank, i.e., active region, and inactive Bank, i.e., inactive region.
In the following embodiments, a description will be given of an example in which the first software package and the second software package are software packages of the vehicle terminal.
In some embodiments of the present application, the execution subject of the detection method of software is a detection device of software, and the detection device of software may be a vehicle terminal.
In some embodiments of the present application, the vehicle terminal updates the first software package of the activation zone and determines the second software package.
S102, starting the second software package, detecting starting parameters of the second software package, and determining a detection result.
In some embodiments of the present application, the start-up parameters include the progress of initialization, the transmission status of the message, and the start-up time.
In some embodiments of the present application, a second software package is started, at least one starting parameter of the progress of initialization of the second software package, the transmission state of the message and the starting time is detected, and a detection result of the second software package is determined.
In some embodiments of the present application, the progress of the initialization may be represented by a first flag bit, and the transmission status of the message may be represented by a second flag bit. The start time characterizes a start time of a controller of the vehicle.
For example, the first flag bit may be flag a, where flag a indicates an initialization completion phase, and the second flag bit may be flag b, where flag b indicates whether the Can controller successfully issues the first frame message.
In some embodiments of the present application, the vehicle terminal may start the second software package, detect at least one start parameter of the initialization progress, the transmission state and the start time of the second software package, and obtain a detection result of the at least one start parameter, so as to determine the detection result of the second software package according to the detection result of the at least one start parameter.
S103, if the detection result represents that the operation is abnormal, switching from the active area to the inactive area, and operating a third software package of the inactive area.
In some embodiments of the present application, the first software package in the active area and the third software package in the inactive area belong to the same version of software package, i.e., the first software package and the third software package belong to the same software package.
In some embodiments of the present application, if the vehicle terminal detects that the detection result of the second software package has abnormal operation, the vehicle terminal switches from the active area to the inactive area, and operates the third software package in the inactive area.
In some embodiments of the present application, if the detection result is abnormal, the function detection is continued on the second software package until the maximum detection times are reached, so as to obtain a plurality of detection results, and if the detection results are abnormal, the third software package in the non-active area is operated after switching from the active area to the non-active area.
It can be understood that under the condition that the first software package in the activation area is updated, the second software package is determined, the second software package is started, the starting parameters of the second software package are detected, the self-detection of the second software package can be realized by the determined detection result, whether the second software package is abnormal or not is not acquired through the upper controller, the time for acquiring whether the second software package is abnormal or not can be saved, wherein the starting parameters comprise at least one of the initialization progress, the transmission state of a message and the starting time, and the starting time characterizes the starting time of the controller. When the second software package is detected to be abnormal, the second software package is actively switched to the inactive area from the active area where the second software package is located through switching processing, a third software package in the inactive area is operated, and the second software package in the active area is automatically switched to the third software package in the inactive area in the whole process of recovering the third software package operation in the inactive area from the second software package, so that the accurate rollback to the third software package is realized, and meanwhile, the time for solving the software fault can be reduced, wherein the first software package and the third software package belong to the same software package.
In some embodiments of the present application, fig. 2 is a second alternative flowchart of a software detection method provided in the embodiment of the present application, and S102 may be implemented by S201, as follows:
S201, starting a second software package, detecting at least one starting parameter of the initializing progress of the second software package, the transmission state of a message and the starting time, and determining a detection result of the second software package, wherein the starting time represents the starting time of the controller.
In some embodiments of the present application, the vehicle terminal starts the second software package, detects at least one start parameter of the initialization progress of the second software package, the transmission state of the message, and the start time, and obtains at least one detection result of the initialization progress detection result, the transmission state detection result of the message, and the start time detection result, and determines the detection result of the second software package according to the at least one detection result.
In some embodiments of the present application, the vehicle terminal detects the progress of initialization of the second software package, determines a first detection result of the second software package, detects a transmission state of a message of the second software package, determines a second detection result of the second software package, detects a start time of the second software package, determines a third detection result of the second software package, and determines a detection result of the second software package based on at least one of the first detection result, the second detection result, and the third detection result.
It can be understood that at least one starting parameter of the initialization progress of the second software package, the transmission state of the message and the starting time is detected, and the detection result is determined, so that the second software package can be self-detected, whether the second software package is abnormal or not is not acquired through the upper controller, and the time for acquiring whether the second software package is abnormal or not can be saved.
In some embodiments of the present application, fig. 3 is a schematic diagram three of an alternative flow chart of a software detection method provided in the embodiment of the present application, S201 may be implemented by S301, S302, S303, and S304, as follows:
S301, detecting the initialization progress of the second software package, and determining a first detection result of the second software package.
In some embodiments of the present application, the vehicle terminal detects, through the first flag bit, the progress of initialization of the second software package, and determines a first detection result of the second software package.
In some embodiments of the present application, a vehicle terminal detects a progress of initialization of a second software package through a first flag bit, wherein the first flag bit indicates whether the initialization of the second software package is completed, if the value of the first flag bit is a first value, it is determined that a first detection result is normal, wherein the first value indicates that the initialization of the second software package is completed, if the value of the first flag bit is a second value, it is determined that the first detection result is abnormal, and wherein the second value indicates that the initialization of the second software package is not completed.
Illustratively, the first value of the first flag bit may be 1 and the second value of the first flag bit may be 0.
In some embodiments of the present application, the vehicle terminal detects the progress of the initialization of the second software package through the first flag bit, if the value of the first flag bit is 1, the first detection result is determined to be normal, and if the value of the first flag bit is 0, the first detection result is determined to be abnormal.
It can be understood that the first flag bit is used for detecting the initialization progress of the second software package, if the value of the first flag bit is the first value, the first detection result is determined to be normal, and if the value of the first flag bit is the second value, the first detection result is determined to be abnormal, so that the subsequent determination of the detection result of the second software package according to the first detection result is facilitated, the self detection of the second software package is further realized, and the time for acquiring whether the second software package has an abnormal condition is saved.
S302, detecting the transmission state of the message of the second software package, and determining a second detection result of the second software package.
In some embodiments of the present application, the vehicle terminal detects, through the second flag bit, a transmission status of the message of the second software package, and determines a second detection result of the second software package.
In some embodiments of the present application, the vehicle terminal detects a transmission state of a message of the second software package through a second flag bit, where the second flag bit characterizes whether the controller successfully transmits the first frame message, if the value of the second flag bit is a third value, it is determined that the second detection result is normal, where the third value characterizes the controller successfully transmits the first frame message, if the value of the second flag bit is a fourth value, it is determined that the second detection result is abnormal, where the fourth value characterizes the controller not transmitting the first frame message.
Illustratively, the third value of the second flag bit may be 1 and the fourth value of the second flag bit may be 0.
In some embodiments of the present application, the vehicle terminal detects the transmission status of the message of the second software package through the second flag bit, if the value of the second flag bit is 1, it is determined that the second detection result is normal, and if the value of the second flag bit is 0, it is determined that the second detection result is abnormal.
It can be understood that the second flag bit is used for detecting the transmission state of the message of the second software package, if the value of the second flag bit is the third value, the second detection result is determined to be normal, and if the value of the second flag bit is the fourth value, the second detection result is determined to be abnormal, so that the subsequent determination of the detection result of the second software package according to the second detection result is facilitated, the self-detection of the second software package is further realized, and the time for acquiring whether the second software package has an abnormal condition or not is saved.
S303, detecting the starting time of the second software package, and determining a third detection result of the second software package.
In some embodiments of the present application, the vehicle terminal detects the start time of the second software package through the time threshold, and determines a second detection result of the second software package.
In some embodiments of the present application, the vehicle terminal detects the start time of the second software package by using a time threshold, where the time threshold is based on start times of controllers of vehicles set in advance by vehicles of different vehicle enterprises, the vehicles of the different vehicle enterprises correspond to different time thresholds, if the start time is less than the time threshold, it is determined that the third detection result is normal, and if the start time is equal to or greater than the time threshold, it is determined that the third detection result is abnormal.
For example, the time threshold may be 30 seconds, the start time is 20 seconds, the vehicle terminal passes the time threshold for 30 seconds, and detects the start time of the second software package, and since the start time 20 seconds is less than the time threshold for 30 seconds, it is determined that the third detection result of the second software package is normal.
It can be understood that the starting time of the second software package is detected through the time threshold, if the starting time is smaller than the time threshold, the third detection result is determined to be normal, and if the starting time is equal to or larger than the time threshold, the third detection result is determined to be abnormal, so that the subsequent determination of the detection result of the second software package according to the third detection result is facilitated, the self detection of the second software package is further realized, and the time for acquiring whether the second software package has an abnormal condition is saved.
S304, determining a detection result of the second software package based on at least one of the first detection result, the second detection result and the third detection result.
In some embodiments of the present application, the vehicle terminal may determine the detection result of the second software package according to at least one of the first detection result, the second detection result, and the third detection result.
It can be understood that the progress of the initialization of the second software package, the transmission state of the message and the start time are respectively detected, and the first detection result, the second detection result and the third detection result of the second software package are determined. And determining the detection result of the second software package based on at least one of the first detection result, the second detection result and the third detection result, so that the second software package can be self-detected, whether the second software package is abnormal or not is not required to be acquired through the upper controller, and the time for acquiring whether the second software package is abnormal or not can be saved.
In some embodiments of the present application, determining the detection result of the second software package according to one of the three detection results includes determining that the detection result of the second software package is normal if the first detection result, or the second detection result, or the third detection result is normal, and determining that the detection result of the second software package is abnormal if the first detection result, or the second detection result, or the third detection result is abnormal.
For example, if the first detection result is normal, the vehicle terminal determines that the detection result of the second software package is normal, and if the first detection result is abnormal, the vehicle terminal determines that the detection result of the second software package is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the second detection result is normal, and determines that the detection result of the second software package is abnormal if the second detection result is abnormal.
For example, if the third detection result is normal, the vehicle terminal determines that the detection result of the second software package is normal, and if the third detection result is abnormal, the vehicle terminal determines that the detection result of the second software package is abnormal.
In some embodiments of the present application, determining the detection result of the second software package according to two detection results of the three detection results includes determining that the detection result of the second software package is normal if any two detection results of the first detection result and the second detection result are normal, and determining that the detection result of the second software package is abnormal if any two detection results of the first detection result and the second detection result are abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal and the second detection result is abnormal if the first detection result is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal and the second detection result is abnormal if the first detection result is normal and the vehicle terminal determines that the detection result of the second software package is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal and the second detection result is normal if the first detection result is abnormal and the vehicle terminal determines that the detection result of the second software package is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal and the third detection result is abnormal if the first detection result is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal and the third detection result is abnormal if the first detection result is normal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal and the third detection result is normal if the first detection result is abnormal and the vehicle terminal determines that the detection result of the second software package is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the second detection result is normal and the third detection result is abnormal if the second detection result is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the second detection result is normal and determines that the detection result of the second software package is abnormal if the second detection result is normal and the third detection result is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the second detection result is normal and the third detection result is abnormal if the second detection result is abnormal.
In some embodiments of the present application, determining the detection result of the second software package according to the three detection results includes determining that the detection result of the second software package is normal if the first detection result and the second detection result are both normal, and determining that the detection result of the second software package is abnormal if at least one of the first detection result, the second detection result and the third detection result is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal, the second detection result is normal, and the third detection result is abnormal if the first detection result is normal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal, the second detection result is normal, and the third detection result is abnormal if the first detection result is normal, and the vehicle terminal determines that the detection result of the second software package is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal, the second detection result is normal, and the third detection result is normal if the first detection result is abnormal, and the vehicle terminal determines that the detection result of the second software package is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal, the second detection result is normal, and the third detection result is normal if the first detection result is abnormal, and the vehicle terminal determines that the detection result of the second software package is abnormal if the second detection result is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal, the second detection result is normal, and the third detection result is abnormal if the first detection result is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal, the second detection result is normal, and the third detection result is abnormal if the first detection result is normal, and the vehicle terminal determines that the detection result of the second software package is abnormal.
The vehicle terminal determines that the detection result of the second software package is normal if the first detection result is normal, the second detection result is normal, and the third detection result is abnormal if the first detection result is abnormal, and the vehicle terminal determines that the detection result of the second software package is abnormal.
It can be understood that according to one, two or three of the first, second and third detection results, the detection result of the second software package is determined, so as to further realize self-detection of the second software package and save the time for obtaining whether the second software package has an abnormal condition.
In some embodiments of the present application, fig. 4 is a schematic flowchart of an alternative method for detecting software provided in the embodiment of the present application, and S103 may be implemented by S1031 and S1032, as follows:
and S1031, if the detection result is abnormal, continuing to perform function detection on the second software package until the maximum detection times are reached, and obtaining a plurality of detection results.
In some embodiments of the present application, the vehicle terminal detects the second software package, and if the detection result is abnormal, the vehicle terminal continues to perform functional detection on the second software package until the maximum detection times are reached, so as to obtain a multiple detection result.
The maximum detection times are set in advance.
S1032, if the detection results are abnormal, switching from the active area to the inactive area, and running the third software package of the inactive area.
In some embodiments of the present application, the second software package of the vehicle terminal performs the function detection until the maximum detection times are reached, and after the multiple detection results are obtained, if the multiple detection results are abnormal, the third software package of the non-active area is operated after the multiple detection results are switched from the active area to the non-active area.
It can be understood that if the detection result is abnormal, the function detection is continuously performed on the second software package until the maximum detection times are reached, so as to obtain multiple detection results, prevent false detection of the second software package, ensure the accuracy of detection of the second software package, and if the detection results are abnormal, switch from the active area to the inactive area, operate the third software package of the inactive area, fail from the second software package, and automatically switch from the second software package of the active area to the third software package of the inactive area in the process of recovering the operation of the third software package of the inactive area, thereby realizing accurate rollback to the third software package, and simultaneously, also reducing the time for solving the software failure.
In some embodiments of the present application, S104, S105, S106, and S107 are also performed before S102, as follows:
S104, when the second software package of the activation area is started for the first time, the detection switch is started.
In some embodiments of the application, the vehicle terminal activates the detection switch when the second software package of the active area is first activated.
The start detection switch may set the start flag, i.e., the value of the start flag is set to 1. The second software package is started only when the second software package is started for the first time, and the value of the start flag bit is set to be 1, and then the second software package is detected.
S105, under the condition that the detection switch is started, initializing starting parameters corresponding to a chip starting stage, a boot software running stage and a second software package running stage, and determining an initialization result.
In some embodiments of the present application, when the detection switch is activated, the vehicle terminal initializes the activation parameters in the chip activation phase, the boot software operation phase, and the second software package operation phase, and determines an initialization result.
In some embodiments of the present application, when the value of the start flag bit is set to 1, the vehicle terminal initializes the first flag bit, the second flag bit, and the start time, and determines an initialization result.
S106, closing the detection switch under the condition that the initialization result is determined and the second software package is started.
In some embodiments of the present application, the vehicle terminal turns off the detection switch in the case where the initialization result is determined and the second software package is started.
It should be noted that, the start detection switch may reset the start flag bit, that is, the value of the start flag bit is set to 0.
And S107, detecting the starting parameter of the second software package under the condition that the detection switch is closed.
In some embodiments of the application, the vehicle terminal detects the start-up parameter of the second software package with the detection switch being closed.
It can be appreciated that the initialization of the start-up parameters is accomplished by activating the detection switch, facilitating the subsequent detection of the second software package.
In some embodiments of the present application, fig. 5A is a schematic diagram of an alternative cut area of a software detection method provided in the embodiments of the present application, as shown in fig. 5A, a nonvolatile memory (for example Nor Flsah) includes an Active area and an inactive area, when the Active area (Active Region) is updated to a new version of software B (i.e. a second software package), that is, the Active area is SoftWare New, but there may be problems that the new version is incompatible with the current whole vehicle section or the new version of software functions abnormally (i.e. new version of software B Fun Error), and the old version of program (i.e. a third software package) is to be returned to the inactive area (InActive Region), that is, the inactive area is SoftWare Old. The conventional method is that the real vehicle is found to write the software of the previous version, and then the program of the previous version A (namely the first software package) is rewritten, manual intervention is needed in the whole process, and the old software package is selected for writing, so that the switching from the active area to the inactive area cannot be realized. Fig. 5B is a schematic diagram two of an alternative cut-out Region of a software detection method provided by the embodiment of the present application, as shown in fig. 5B, the Active Region (Active Region) is SoftWare New, that is, the inactive Region (InActive Region) is SoftWare Old, when a new software package is flushed into a controller, the software automatically detects whether an operation abnormality occurs in the controller (that is, the software package automatically detects the software package), if an abnormality mechanism is triggered (that is, a new version of software B Fun Error), the Active recovery Region software (a, that is, the third software package) is actively operated, that is, the Active recovery Region software (a, that is, the Active recovery Region) is switched from the Active Region to the inactive Region. In the related art, when the software package is passively rolled back and the updated software in the controller (the lower controller) is abnormal, the upper controller can instruct the rolling back of the controller with the abnormal software upgrading through the original version indicated by the cloud end of the vehicle enterprise, that is, the upper controller needs to instruct to realize the rolling back of the software of the lower controller. Therefore, the active detection and active rollback mode adopted by the embodiment of the application saves the rollback executing time when the second software package is obtained and has abnormal conditions.
In some embodiments of the present application, fig. 6 is an optional second software package starting schematic diagram of a software detection method provided by the embodiments of the present application, as shown in fig. 6, from a chip starting and starting (Boot) operation stage to an Appl (i.e., second software package) operation stage, in the process of sending a first frame message, flag a=1 is set to indicate that the initialization stage is completed, flag b=1 indicates that a Can controller successfully sends the first frame message (i.e., normally sends the Can message), time C is a starting time, and a starting time requirement of the controller is set according to a vehicle time inconsistency requirement of each different enterprise, and is overtime, that is, the software is not in compliance with the specification;
1. After a new binding software package is brushed, a Bootloader program mark is executed for the first time, a WRITE ONCE FLAG mark (namely a start mark bit) is introduced, namely, a first unconditional start Appl mark is set, when the WRITE ONCE FLAG mark is closed after the first start, the subsequent start Boot needs to judge the three ABC variables.
2. A normal Appl start will satisfy the following three conditions:
2.1, flag a is successfully set up (i.e., flag a=1), and the software initialization phase (i.e., INIT initialization phase) passes;
2.2, flag B is successfully set up (i.e. Flag b=1), and the message Can be normally sent out (i.e. Can message is normally sent out);
2.3 TimerC is less than the canonical requirement;
3. If the Bootloader program is started, the current region running software is detected to be invalid, the maximum number of times of attempts is carried out, the number of times can be set by itself, and if the number of times of attempts is up to the maximum number, the Bootloader software automatically executes the region cutting action.
It can be understood that under the condition that the first software package in the activation area is updated, the second software package is determined, the second software package is started, the starting parameters of the second software package are detected, the self-detection of the second software package can be realized by the determined detection result, whether the second software package is abnormal or not is not acquired through the upper controller, the time for acquiring whether the second software package is abnormal or not can be saved, wherein the starting parameters comprise at least one of the initialization progress, the transmission state of a message and the starting time, and the starting time characterizes the starting time of the controller. When the second software package is detected to be abnormal, the second software package is actively switched to the inactive area from the active area where the second software package is located through switching processing, a third software package in the inactive area is operated, and the second software package in the active area is automatically switched to the third software package in the inactive area in the whole process of recovering the third software package operation in the inactive area from the second software package, so that the accurate rollback to the third software package is realized, and meanwhile, the time for solving the software fault can be reduced, wherein the first software package and the third software package belong to the same software package.
The embodiment of the application also provides a software detection device, fig. 7 is a schematic structural diagram of the software detection device provided by the embodiment of the application, and as shown in fig. 7, the software detection device 7 comprises an updating unit 701, a detection unit 702 and a cutting unit 703, wherein,
An updating unit 701, configured to determine a second software package when the first software package in the active area is updated;
The detection unit 702 is configured to start the second software package, detect a start parameter of the second software package, and determine a detection result;
a section switching unit 703, configured to switch from the active section to the inactive section and run a third software package of the inactive section if the detection result indicates that the operation is abnormal;
The starting parameters comprise at least one of the progress of initialization, the transmission state of a message and the starting time, wherein the first software package and the third software package belong to the same software package, and the starting time characterizes the starting time of the controller.
In some embodiments of the present application, the detecting unit 702 is further configured to start the second software package, detect at least one start parameter of the progress of initialization of the second software package, the transmission state of the message, and the start time, and determine a detection result of the second software package, where the start time characterizes the start time of the controller.
In some embodiments of the application, the detection means 7 of the software further comprise a determination unit 704, wherein,
The detection unit 702 is further configured to detect a progress of the initialization of the second software package, determine a first detection result of the second software package, detect a transmission status of a message of the second software package, determine a second detection result of the second software package, detect a start time of the second software package, and determine a third detection result of the second software package;
a determining unit 704, configured to determine a detection result of the second software package based on at least one of the first detection result, the second detection result, and the third detection result.
In some embodiments of the present application, the detecting unit 702 is further configured to detect, by using a first flag bit, a progress of initialization of the second software package, where the first flag bit indicates whether the initialization of the second software package is completed;
the determining unit 704 is further configured to determine that the first detection result is normal if the value of the first flag bit is a first value, wherein the first value indicates that the initialization of the second software package is completed, and determine that the first detection result is abnormal if the value of the first flag bit is a second value, wherein the second value indicates that the initialization of the second software package is not completed.
In some embodiments of the present application, the detecting unit 702 is further configured to detect a transmission status of a packet of the second software package through a second flag, where the second flag characterizes whether the controller successfully sends the first frame packet;
The determining unit 704 is further configured to determine that the second detection result is normal if the value of the second flag bit is a third value, where the third value indicates that the controller successfully sends the first frame message, and determine that the second detection result is abnormal if the value of the second flag bit is a fourth value, where the fourth value indicates that the controller does not send the first frame message.
In some embodiments of the present application, the detecting unit 702 is further configured to detect a start time of the second software package through a time threshold, where the time threshold is based on start times of controllers of vehicles set in advance by vehicles of different vehicle enterprises, and the vehicles of the different vehicle enterprises correspond to different time thresholds;
The determining unit 704 is further configured to determine that the third detection result is normal if the start time is less than the time threshold, and determine that the third detection result is abnormal if the start time is equal to or greater than the time threshold.
In some embodiments of the present application, the determining unit 704 is further configured to determine that the detection result of the second software package is normal if the first detection result and the second detection result are both normal, and determine that the detection result of the second software package is abnormal if at least one of the first detection result, the second detection result and the third detection result is abnormal.
In some embodiments of the present application, the detecting unit 702 is further configured to, if the detection result is abnormal, continue to perform functional detection on the second software package until the maximum detection number is reached, so as to obtain a multiple detection result;
The area switching unit 703 is further configured to switch from the active area to the inactive area and run a third software package of the inactive area if the detection results of the plurality of times are abnormal.
In some embodiments of the application, the detection means 7 of the software further comprise a start-up unit 705 and a shut-down unit 706, wherein,
A starting unit 705, configured to start the detection switch when the second software package in the active area is started for the first time;
The determining unit 704 is further configured to initialize the start parameters corresponding to the chip start stage, the boot software operation stage, and the second software package operation stage when the detection switch is started, and determine an initialization result;
A closing unit 706, configured to close the detection switch when the initialization result is determined and the second software package is started;
The detecting unit 702 is further configured to detect a start parameter of the second software package when the detection switch is turned off.
Based on the software detection method of the foregoing embodiment, the embodiment of the present application further provides a software detection device, as shown in fig. 8, fig. 8 is a schematic structural diagram of the software detection device provided in the embodiment of the present application, where the software detection device 8 includes a processor 801 and a memory 802. A memory 802 for storing a computer program, and a processor 801 for calling and running the computer program from the memory to execute the detection method of the software of the above embodiment.
In an embodiment of the present application, the Processor 801 may be at least one of an Application SPECIFIC INTEGRATED Circuit (ASIC), a digital signal Processor (DIGITAL SIGNAL Processor, DSP), a digital signal processing device (DIGITAL SIGNAL Processing Device, DSPD), a programmable logic device (ProgRAMmable Logic Device, PLD), a field programmable gate array (Field ProgRAMmable GATE ARRAY, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronics for implementing the above-described processor functions may be other for different devices, and embodiments of the present application are not particularly limited.
An embodiment of the present application provides a computer-readable storage medium storing a computer program for implementing the method for detecting software according to any one of the embodiments above when executed by a processor.
For example, the program instructions corresponding to the method for detecting software in this embodiment may be stored on a storage medium such as an optical disc, a hard disc, or a usb disk, and when the program instructions corresponding to the method for detecting software in the storage medium are read or executed by an electronic device, the method for detecting software in any of the embodiments may be implemented.
The integrated units, if implemented in the form of software functional modules, may be stored in a computer-readable storage medium, if not sold or used as separate products, and based on this understanding, the technical solution of the present embodiment may be embodied essentially or partly in the form of a software product, or all or part of the technical solution may be embodied in a storage medium, which includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or processor (processor) to perform all or part of the steps of the method of the present embodiment.
It will be appreciated by those of ordinary skill in the art that implementing all or part of the steps of the above method embodiments may be implemented by hardware associated with program instructions, where the above program may be stored in a computer readable storage medium, where the program when executed performs the steps comprising the above method embodiments, where the above storage medium includes various media that may store program code, such as a removable storage device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
The modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, may be located in one place or distributed on a plurality of network units, and may select some or all of the modules according to actual needs to achieve the purpose of the embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may be separately used as a unit, or two or more modules may be integrated in one unit, where the integrated modules may be implemented in hardware or in a form of hardware plus a software functional unit. 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 disclosure. 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.
It should be understood that, in various embodiments of the present application, the sequence number of each step/process described above does not mean that the execution sequence of each step/process should be determined by its functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure. The foregoing embodiment numbers of the present disclosure are merely for description and do not represent advantages or disadvantages of the embodiments.
It should be noted that, in the application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be additional divisions of actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The methods disclosed in the method embodiments provided by the embodiments of the present application can be arbitrarily combined to obtain a new method embodiment without collision.
The features disclosed in the several product embodiments provided by the embodiments of the present application may be arbitrarily combined without collision to obtain a new product embodiment.
The features disclosed in the several method or apparatus embodiments provided in the embodiments of the present application may be arbitrarily combined without any conflict to obtain new method embodiments or apparatus embodiments.
The foregoing is merely illustrative of the embodiments of the present application, and the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the scope of the embodiments of the present application.
Claims (11)
1. A method for detecting software, comprising:
Determining a second software package of the activation area under the condition that the first software package of the activation area is updated;
starting a second software package of the activation area, detecting starting parameters of the second software package of the activation area, and determining a detection result;
If the detection result represents abnormal operation, switching from the active area to the inactive area, and operating a third software package of the inactive area;
The starting parameters comprise at least one of the progress of initialization, the transmission state of a message and the starting time, wherein the first software package and the third software package belong to the same software package, and the starting time characterizes the starting time of the controller;
Starting the second software package of the activation area, detecting starting parameters of the second software package of the activation area, and determining a detection result, wherein the method comprises the following steps:
And starting the second software package, detecting at least one starting parameter of the initialization progress of the second software package, the transmission state of the message and the starting time, and determining the detection result of the second software package.
2. The method for detecting software according to claim 1, wherein detecting at least one start parameter of the progress of initialization of the second software package, the transmission status of the message, and the start time, and determining the detection result of the second software package includes:
detecting the initialization progress of the second software package, and determining a first detection result of the second software package;
Detecting the transmission state of the message of the second software package, and determining a second detection result of the second software package;
detecting the starting time of the second software package, and determining a third detection result of the second software package;
determining a detection result of the second software package based on at least one of the first detection result, the second detection result and the third detection result.
3. The method for detecting software according to claim 2, wherein detecting the progress of the initialization of the second software package, determining the first detection result of the second software package, includes:
detecting the progress of the initialization of the second software package through a first flag bit, wherein the first flag bit represents whether the initialization of the second software package is completed or not;
If the value of the first flag bit is a first value, determining that the first detection result is normal, wherein the first value represents that the initialization of the second software package is completed;
and if the value of the first flag bit is a second value, determining that the first detection result is abnormal, wherein the second value represents that the initialization of the second software package is not completed.
4. The method for detecting software according to claim 2, wherein detecting the transmission status of the packet of the second software package, determining the second detection result of the second software package includes:
detecting the transmission state of the message of the second software package through a second flag bit, wherein the second flag bit represents whether the controller successfully sends out the first frame message or not;
if the value of the second flag bit is a third value, determining that the second detection result is normal, wherein the third value represents that the controller successfully sends out a first frame message;
And if the value of the second flag bit is a fourth value, determining that the second detection result is abnormal, wherein the fourth value represents that the controller does not send out the first frame message.
5. The method for detecting software according to claim 2, wherein detecting the start-up time of the second software package, determining a third detection result of the second software package, includes:
Detecting the starting time of the second software package through a time threshold, wherein the time threshold is the starting time of a controller of a vehicle which is set in advance based on vehicles of different train enterprises, and the vehicles of the different train enterprises correspond to different time thresholds;
if the starting time is smaller than the time threshold, determining that the third detection result is normal;
and if the starting time is equal to or greater than the time threshold, determining that the third detection result is abnormal.
6. The method according to claim 2, wherein the determining the detection result of the second software package based on at least one of the first detection result, the second detection result, and the third detection result includes:
If the first detection result, the second detection result and the third detection result are all normal, determining that the detection result of the second software package is normal;
And if at least one of the first detection result, the second detection result and the third detection result is abnormal, determining that the detection result of the second software package is abnormal.
7. The method according to any one of claims 1 to 6, wherein if the detection result indicates an abnormal operation, switching from the active area to an inactive area, and operating a third software package of the inactive area includes:
If the detection result is abnormal, continuing to perform functional detection on the second software package until the maximum detection times are reached, and obtaining a plurality of detection results;
and if the detection results of the plurality of times are abnormal, switching from the active area to the inactive area, and running the third software package of the inactive area.
8. The method for detecting software according to any one of claims 1 to 6, wherein the starting the second software package, detecting a starting parameter of the second software package, and before determining a detection result, the method further comprises:
When the second software package of the activation area is started for the first time, a detection switch is started;
Initializing the starting parameters corresponding to a chip starting stage, a guiding software running stage and the second software package running stage under the condition that the detection switch is started, and determining an initialization result;
closing the detection switch under the condition that the initialization result is determined and the second software package is started;
and detecting the starting parameter of the second software package under the condition that the detection switch is closed.
9. A software detection device is characterized by comprising an updating unit, a detection unit and a cutting unit, wherein,
An updating unit, configured to determine a second software package of the active area if the first software package of the active area is updated;
the detection unit is used for starting the second software package of the activation area, detecting starting parameters of the second software package of the activation area and determining detection results;
The area switching unit is used for switching from the active area to the inactive area and running a third software package of the inactive area if the detection result represents abnormal operation;
The starting parameters comprise at least one of the progress of initialization, the transmission state of a message and the starting time, wherein the first software package and the third software package belong to the same software package, and the starting time characterizes the starting time of the controller;
the detection unit is further configured to start the second software package, detect at least one start parameter of an initialization progress of the second software package, a transmission state of a message, and a start time, and determine a detection result of the second software package.
10. A software detection device is characterized by comprising a processor and a memory, wherein,
The memory is used for storing a computer program;
The processor is configured to call and run the computer program from the memory to execute the software detection method according to any one of claims 1 to 8.
11. A computer readable storage medium storing executable instructions for causing a processor to perform the method of detecting software according to any one of claims 1 to 8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411210417.0A CN118708500B (en) | 2024-08-30 | 2024-08-30 | Software detection method and device, equipment, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411210417.0A CN118708500B (en) | 2024-08-30 | 2024-08-30 | Software detection method and device, equipment, and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN118708500A CN118708500A (en) | 2024-09-27 |
| CN118708500B true CN118708500B (en) | 2025-05-16 |
Family
ID=92816982
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411210417.0A Active CN118708500B (en) | 2024-08-30 | 2024-08-30 | Software detection method and device, equipment, and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118708500B (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114895947A (en) * | 2022-06-14 | 2022-08-12 | 中国第一汽车股份有限公司 | Software upgrading method, device, equipment and storage medium of vehicle-mounted controller |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8468542B2 (en) * | 2010-03-04 | 2013-06-18 | Microsoft Corporation | Virtual environment for server applications, such as web applications |
| JP7653507B2 (en) * | 2020-07-31 | 2025-03-28 | 中興通訊股▲ふん▼有限公司 | Data transmission during inactivity |
| CN114911508A (en) * | 2021-02-09 | 2022-08-16 | 上海海拉电子有限公司 | An update processing method and system for an application program of a vehicle ECU |
| CN115857988B (en) * | 2022-12-01 | 2025-08-05 | 何发虎 | Remote upgrade method of train onboard software based on server redundancy backup strategy |
| CN118012466A (en) * | 2024-03-12 | 2024-05-10 | 厦门紫光展锐科技有限公司 | System upgrade method and device based on USB disk, readable storage medium, and terminal |
-
2024
- 2024-08-30 CN CN202411210417.0A patent/CN118708500B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114895947A (en) * | 2022-06-14 | 2022-08-12 | 中国第一汽车股份有限公司 | Software upgrading method, device, equipment and storage medium of vehicle-mounted controller |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118708500A (en) | 2024-09-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100501679C (en) | Electric device | |
| CN105912356B (en) | An online upgrade method of optical module firmware program supporting version rollback | |
| CN109542744B (en) | Method, device, storage medium and terminal for detecting abnormal starting problem of terminal | |
| CN110825563B (en) | System recovery method and device and electronic equipment | |
| CN103902399A (en) | Software system repair processing method and software system repair processing device | |
| CN106775674B (en) | Equipment based on universal boot loader and starting method thereof | |
| CN113867807A (en) | Method, device, equipment and storage medium for shortening power-on time of server | |
| CN113641537A (en) | A server startup system, method and medium | |
| CN118708500B (en) | Software detection method and device, equipment, and storage medium | |
| CN112433739A (en) | Firmware upgrading method | |
| CN113190256B (en) | Upgrading method, device and equipment | |
| CN114281391A (en) | An electronic device and a system software upgrade method, device and medium thereof | |
| CN113626262A (en) | BMC recovery method, system, equipment and medium | |
| CN117785238A (en) | Firmware upgrade method, device, electronic equipment and computer-readable storage medium | |
| JP2002049509A (en) | Data processing system | |
| CN118113319A (en) | Device operation control method and device, storage medium and electronic device | |
| CN115291966A (en) | System starting method, device, equipment and storage medium of equipment | |
| JP4635993B2 (en) | Startup diagnostic method, startup diagnostic method and program | |
| CN113590388A (en) | UBOOT-based SPL rollback method and device, storage medium and terminal | |
| CN119987881A (en) | Chip startup method, device, equipment and medium | |
| CN120429026B (en) | Management controller, management controller starting method, device and storage medium | |
| KR20120030573A (en) | A method, apparatus and computer program for loading files during a boot-up process | |
| CN113986261A (en) | A data flashing method, related apparatus, device and readable storage medium | |
| JP5002900B2 (en) | Control device, its program, and program download method | |
| CN121166439A (en) | Starting method, device, equipment, medium and program product of BMC firmware |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |