CN111474913B - Program operation monitoring method and device and electric automobile - Google Patents

Program operation monitoring method and device and electric automobile Download PDF

Info

Publication number
CN111474913B
CN111474913B CN201910064023.1A CN201910064023A CN111474913B CN 111474913 B CN111474913 B CN 111474913B CN 201910064023 A CN201910064023 A CN 201910064023A CN 111474913 B CN111474913 B CN 111474913B
Authority
CN
China
Prior art keywords
time interval
execution sequence
program
current
interface function
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
Application number
CN201910064023.1A
Other languages
Chinese (zh)
Other versions
CN111474913A (en
Inventor
张占龙
代康伟
梁海强
余军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN201910064023.1A priority Critical patent/CN111474913B/en
Publication of CN111474913A publication Critical patent/CN111474913A/en
Application granted granted Critical
Publication of CN111474913B publication Critical patent/CN111474913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0221Preprocessing measurements, e.g. data collection rate adjustment; Standardization of measurements; Time series or signal analysis, e.g. frequency analysis or wavelets; Trustworthiness of measurements; Indexes therefor; Measurements using easily measured parameters to estimate parameters difficult to measure; Virtual sensor creation; De-noising; Sensor fusion; Unconventional preprocessing inherently present in specific fault detection methods like PCA-based methods

Abstract

The invention provides a program operation monitoring method and device and an electric automobile, and relates to the technical field of vehicle control, wherein the method comprises the following steps: acquiring a target execution serial number pointed by a first pointer of an interface function at present and a form parameter representing the current execution serial number in the interface function called at present; the target execution sequence number is a target execution sequence number in a pre-stored program execution sequence list; determining whether the current program execution sequence is abnormal or not according to the target execution sequence number and the form parameter representing the current execution sequence number; and reporting a fault signal of the abnormal program running sequence when the current program execution sequence is determined to be abnormal. The scheme of the invention realizes the monitoring of the program running sequence in the electric automobile, thereby being convenient for finding out wrong program execution results in time and avoiding safety accidents caused by disordered program execution of the electric automobile.

Description

Program operation monitoring method and device and electric automobile
Technical Field
The invention belongs to the technical field of whole vehicle control, and particularly relates to a program operation monitoring method and device and an electric vehicle.
Background
Now, software in the automobile controller does not monitor the execution sequence of the programs, nor the interval time of executing a plurality of programs, so that the following two situations occur:
one is a program execution sequence error caused by operating system errors, interruption errors or other reasons, and the other is that the execution interval time between programs needing data transmission is too long and the real-time performance of data is deteriorated due to program execution errors or interruption times and other reasons, and the two situations may cause the execution result to be erroneous and can not be found, so that the automobile executes wrong commands, and the safety of people and the automobile is threatened.
Disclosure of Invention
The embodiment of the invention aims to provide a program operation monitoring method and device and an electric automobile, so that the problem that in the prior art, the safety of people and vehicles is threatened due to the fact that the electric automobile executes wrong commands due to wrong program execution sequences or wrong execution results caused by overlong interval time is solved.
In order to achieve the above object, the present invention provides a program operation monitoring method, including:
acquiring a target execution serial number pointed by a first pointer of an interface function at present and a form parameter representing the current execution serial number in the interface function called at present; the target execution sequence number is a target execution sequence number in a pre-stored program execution sequence list;
determining whether the current program execution sequence is abnormal or not according to the target execution sequence number and the form parameter representing the current execution sequence number;
and reporting a fault signal of the abnormal program running sequence when the current program execution sequence is determined to be abnormal.
Wherein, the step of determining whether the current program execution sequence is abnormal according to the target execution sequence number and the form parameter representing the current execution sequence number comprises:
if the target execution sequence number is different from the form parameter representing the current execution sequence number, determining that the current program execution sequence is abnormal;
and if the target execution sequence number is the same as the form parameter representing the current execution sequence number, determining that the current program execution sequence is normal.
After the step of determining whether the current program execution sequence is abnormal according to the target execution sequence number and the form parameter representing the current execution sequence number, the method further includes:
when the current program execution sequence is determined to be normal, acquiring a preset time interval pointed by a second pointer of the interface function currently and a time interval between the previous calling of the interface function and the current calling of the interface function; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
determining whether the current program execution time interval is overtime or not according to the preset time interval and the time interval between the previous calling of the interface function and the current calling of the interface function;
and reporting a fault signal of the overtime program execution time interval when the overtime program execution time interval of the current program is determined.
The step of determining whether the current program execution time interval is overtime according to the preset time interval and the time interval between the previous calling of the interface function and the current calling of the interface function comprises the following steps:
if the time interval between the previous calling of the interface function and the current calling of the interface function is greater than the preset time interval, determining that the current program execution time interval is overtime;
and if the time interval between the previous calling of the interface function and the current calling of the interface function is less than or equal to the preset time interval, determining that the current program execution time interval is not overtime.
After the step of determining whether the current program execution time interval is overtime according to the preset time interval and the time interval between the previous time of calling the interface function and the current time of calling the interface function, the method further includes:
and when the current program execution time interval is not over time, controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
After the step of reporting the fault signal indicating that the time interval of the execution of the program is overtime, the method further includes:
and controlling the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
After the step of reporting the fault signal that the program running sequence is abnormal, the method further includes:
acquiring a preset time interval pointed by a second pointer of the interface function at present; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
and controlling the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
An embodiment of the present invention further provides a program operation monitoring apparatus, including:
the first acquisition module is used for acquiring a target execution serial number currently pointed by a first pointer of an interface function and a form parameter representing the current execution serial number in the currently called interface function; the target execution sequence number is a target execution sequence number in a pre-stored program execution sequence list;
the first determining module is used for determining whether the current program execution sequence is abnormal or not according to the target execution sequence number and the form parameter representing the current execution sequence number;
the first reporting module is used for reporting a fault signal of the abnormal program running sequence when the current program execution sequence is determined to be abnormal.
Wherein the first determining module comprises:
the first determining submodule determines that the current program execution sequence is abnormal if the target execution sequence number is different from the form parameter representing the current execution sequence number;
and the second determining submodule is used for determining that the execution sequence of the current program is normal if the target execution sequence number is the same as the form parameter representing the current execution sequence number.
Wherein the apparatus further comprises:
the second obtaining module is used for obtaining a preset time interval pointed by a second pointer of the interface function currently and a time interval between the previous calling of the interface function and the current calling of the interface function when the current program execution sequence is determined to be normal; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
a second determining module, configured to determine whether the current program execution time interval is overtime according to the preset time interval and a time interval between the previous time of calling the interface function and the current time of calling the interface function;
and the second reporting module is used for reporting the fault signal of the overtime program execution time interval when the overtime program execution time interval of the current program is determined.
Wherein the second determining module comprises:
a third determining submodule, configured to determine that the current program execution time interval is overtime if a time interval between a previous time of calling the interface function and a current time of calling the interface function is greater than the preset time interval;
and the fourth determining submodule is used for determining that the current program execution time interval is not overtime if the time interval between the previous time of calling the interface function and the current time of calling the interface function is less than or equal to the preset time interval.
Wherein the apparatus further comprises:
the first control module is configured to, when it is determined that the current program execution time interval is not timed out, control the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and control the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
Wherein the apparatus further comprises:
and the second control module is used for controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
Wherein the apparatus further comprises:
a third obtaining module, configured to obtain a preset time interval to which a second pointer of the interface function currently points; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
and the third control module is used for controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
The embodiment of the invention also provides an electric automobile which comprises the program operation monitoring device.
An embodiment of the present invention further provides an electric vehicle, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the program operation monitoring method as described above.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the program operation monitoring method described above are implemented.
The technical scheme of the invention at least has the following beneficial effects:
in the embodiment of the invention, in the process of executing the program, whether the execution sequence of the current program is abnormal is determined by calling the interface function and according to the form parameter in the currently called interface function and the target execution sequence number currently pointed by the first pointer of the interface function, and when the execution sequence of the current program is determined to be abnormal, a fault signal of the abnormal execution sequence of the program is reported, so that the problem that the safety of people and vehicles is threatened due to the fact that the wrong execution result cannot be found in time and the wrong command of the electric vehicle is executed is avoided.
Drawings
FIG. 1 is a schematic diagram illustrating the basic steps of a program operation monitoring method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an implementation process of the program operation monitoring method according to the embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
The embodiment of the invention provides a program operation monitoring method and device and an electric vehicle, aiming at the problem that in the prior art, the safety of people and vehicles is threatened due to wrong commands executed by the electric vehicle caused by wrong program execution sequence or wrong execution results caused by overlong program operation interval time, so that the current program execution sequence and the time interval between two executed adjacent programs are monitored, and the problem that the wrong execution results or data real-time performance is poor caused by wrong execution sequence or overtime interval is avoided.
As shown in fig. 1, an embodiment of the present invention provides a program operation monitoring method, including:
step S101: acquiring a target execution serial number pointed by a first pointer of an interface function at present and a form parameter representing the current execution serial number in the interface function called at present; the target execution sequence number is a target execution sequence number in a pre-stored program execution sequence table.
The interface function in this step is a statement written in each subroutine in advance, and the interface function can be called by executing the statement. According to the program operation monitoring method, each subprogram is called when the main program is operated, the interface function is called in the process of executing each subprogram, and the execution sequence number representing the currently executed program can be obtained through the form parameters in the interface function. The current execution sequence number is an execution sequence number corresponding to the currently executed program in sequence numbers which are pre-arranged according to the execution sequence of each program.
In addition, the program execution sequence table is a comparison table set according to the execution sequence of each subprogram, and in the initial execution stage of the main program, the first pointer of the interface function points to the first target execution sequence number in the program execution sequence table.
Step S102: and determining whether the current program execution sequence is abnormal or not according to the target execution sequence number and the form parameter representing the current execution sequence number.
In the embodiment of the present invention, the program execution sequence table is a comparison table preset according to the execution sequence of each subroutine, and each time one subroutine is executed, the interface function is called once to obtain the execution sequence number corresponding to the currently executed subroutine. Therefore, whether the sequence of the currently executed program is abnormal can be determined according to the comparison between the target execution sequence number pointed by the first pointer currently and the running parameter representing the currently executed sequence number.
Step S103: and reporting a fault signal of the abnormal program running sequence when the current program execution sequence is determined to be abnormal.
The program operation monitoring method can be applied to a vehicle control unit of an electric vehicle, wherein the vehicle control unit comprises a fault processing module, and when the current program execution sequence is determined to be abnormal, a fault signal of the abnormal program execution sequence can be sent to the fault processing module, so that an erroneous execution result can be found in time.
The program operation monitoring method of the embodiment of the invention realizes the real-time monitoring of the operation sequence of each program by calling the interface function, and reports the fault signal of the abnormal operation sequence of the program in time when the operation sequence is abnormal, thereby finding the wrong execution result in time and avoiding the danger to the safety of people and vehicles caused by the execution of wrong commands by the electric automobile.
Specifically, step S102, determining whether the current program execution sequence is abnormal according to the target execution sequence number and the form parameter representing the current execution sequence number, includes:
if the target execution sequence number is different from the form parameter representing the current execution sequence number, determining that the current program execution sequence is abnormal; and if the target execution sequence number is the same as the form parameter representing the current execution sequence number, determining that the current program execution sequence is normal.
The program execution sequence table is a comparison table which is preset according to the execution sequence of each program, and a first pointer of the interface function points to a first target execution sequence number in the program execution sequence table at the initial execution stage of the main program, and the first pointer is accumulated and points to an adjacent next target execution sequence number each time the interface function is called, so that whether the current program execution sequence is normal can be determined according to whether a target execution sequence number currently pointed by the first pointer is the same as a form parameter representing the current execution sequence number.
Further, in step S102, after determining whether the current program execution sequence is abnormal according to the target execution sequence number and the form parameter representing the current execution sequence number, the method further includes:
firstly, when the execution sequence of the current program is determined to be normal, acquiring a preset time interval pointed by a second pointer of the interface function currently and a time interval between the previous calling of the interface function and the current calling of the interface function; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table.
It should be noted that, each time the interface function is called, the current timing time of the timer in the vehicle controller is collected, so that the time interval between the previous calling of the interface function and the current calling of the interface function in this step is conveniently obtained.
In the prior art, since there are no defects that the execution sequence of the program is abnormal and the interval time between the execution of two adjacent programs is overtime when the execution of the program is not monitored, in the embodiment of the present invention, after the execution sequence of the current program is determined to be normal, it is further determined whether the interval time between the execution of the two programs is overtime, and it is determined that the execution of the current program is not abnormal only if the execution sequence of the program is normal and the interval time is not overtime.
Similarly, the maximum interval time table for program execution is the maximum value of the interval time between the execution of two adjacent programs determined according to the test data, and at the initial stage of the main program execution, the second pointer of the interface function points to the first preset time interval in the maximum interval time table for program execution.
And secondly, determining whether the current program execution time interval is overtime or not according to the preset time interval and the time interval between the previous time of calling the interface function and the current time of calling the interface function.
Since the program execution maximum interval time table is the maximum value of the predetermined adjacent two program execution interval times, and the arrangement sequence of the maximum values of the interval times in the program execution maximum interval time table is the same as the sequence of the programs in the program execution sequence table, that is: the second preset time interval in the program execution maximum interval time table is the maximum value of the execution time interval between the program corresponding to the first target execution sequence number in the program execution sequence table and the program corresponding to the second target execution sequence number in the program execution sequence table; the third preset time interval in the program execution maximum interval time table is the maximum value of the execution time interval between the program corresponding to the second target execution sequence number in the program execution sequence table and the program corresponding to the third target execution sequence number in the program execution sequence table. Here, it is emphasized that the first preset time interval in the program execution maximum interval schedule may be set to zero, i.e.: the default maximum time interval is zero when the interface function is called for the first time.
And finally, reporting a fault signal of the overtime program execution time interval when the overtime program execution time interval of the current program is determined.
In this step, when the current program execution time interval is determined to be overtime, a fault signal indicating that the program execution time interval is overtime can be sent to a fault processing module in the vehicle control unit, so that the problem that the execution result is wrong and cannot be found due to the fact that the real-time performance of data is poor is avoided.
More specifically, the step of determining whether the current program execution time interval is overtime according to the preset time interval and the time interval between the previous time of calling the interface function and the current time of calling the interface function includes:
if the time interval between the previous calling of the interface function and the current calling of the interface function is greater than the preset time interval, determining that the current program execution time interval is overtime; and if the time interval between the previous calling of the interface function and the current calling of the interface function is less than or equal to the preset time interval, determining that the current program execution time interval is not overtime.
The maximum interval time table for program execution is the maximum value of the execution interval time of two adjacent programs in the program execution sequence table determined according to experimental data, and the second pointer of the interface function points to the first preset time interval in the maximum interval time table for program execution at the initial execution stage of the main program, and the second pointer is accumulated to point to the next preset time interval each time the interface function is called, so that whether the current program execution time interval is overtime can be determined according to the preset time interval currently pointed by the second pointer and the time interval between the previous time when the interface function is called and the current time when the interface function is called.
More specifically, after the step of determining whether the current program execution time interval is overtime according to the preset time interval and the time interval between the previous time of calling the interface function and the current time of calling the interface function, the method further includes:
and when the current program execution time interval is not over time, controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
The maximum interval time table for program execution is a predetermined comparison table of interval time between two adjacent programs in the program execution sequence table, and the second pointer of the interface function points to the first preset time interval in the maximum interval time table for program execution at the initial execution stage in the main city, and the second pointer is accumulated to point to the next preset time interval each time the interface function is called, so that whether the current program execution time interval is overtime can be determined according to the preset time interval currently pointed by the second pointer and the time interval between the previous time when the interface function is called and the current time when the interface function is called.
Further, after the step of reporting the fault signal that the execution time interval of the program is expired, the method further comprises:
and controlling the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
In the embodiment of the present invention, whether the time interval of program execution is overtime is determined according to the preset time interval currently pointed by the second pointer and the time interval between the previous call of the interface function and the current call of the interface function, so after the fault signal that the time interval of program execution is overtime is reported, the first pointer needs to be controlled to point to the next target execution sequence number, and the second pointer needs to be controlled to point to the next preset time interval, so as to conveniently determine whether the sequence of the next call of the interface function is normal and whether the next call of the interface function is overtime.
Further, after the step of reporting the fault signal indicating that the program running sequence is abnormal in step S103, the method further includes:
acquiring a preset time interval pointed by a second pointer of the interface function at present; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
and controlling the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
According to the program operation monitoring method, whether the execution sequence of the current program is abnormal or not is determined by comparing the form parameter representing the current execution sequence number in the currently called interface function with the target execution sequence number currently pointed by the first pointer of the interface function; after the execution sequence of the current program is determined to be normal, whether the interval time of the program operation is overtime is further judged; reporting a fault signal of abnormal program running sequence after determining that the current program running sequence is abnormal, and reporting a fault signal of overtime program running time interval after determining that the current program running time interval is overtime; therefore, the wrong execution result of the program can be found in time, and the problem of danger of people and vehicles caused by abnormal execution of the program is reduced. In addition, after a fault signal is reported or the execution time interval of the current program is determined not to be overtime, the first pointer and the second pointer are controlled to be accumulated, so that the first pointer points to a next target execution sequence number, and the second pointer points to a next preset time interval, thereby facilitating the monitoring of the subsequent program execution condition.
Next, with reference to fig. 2, the steps of the program operation monitoring method according to the embodiment of the present invention will be specifically described.
Step S201, calling an interface function, and reading a form parameter representing a current execution serial number in the interface function.
Step S202, determining whether the currently read driving parameter is the same as the target execution serial number currently pointed by the first pointer of the interface function, if so, performing step S203, and if not, performing step S206.
Step S203, obtaining a preset time interval currently pointed by the second pointer of the interface function and a time interval between the previous call of the interface function and the current call of the interface function.
Step S204, judging whether the preset time interval is smaller than the time interval between the previous calling of the interface function and the current calling of the interface function; if so, step S205 is executed, otherwise, step S208 is executed.
Step S205 reports a failure signal indicating that the time interval of the execution of the program is overtime.
And step S206, reporting a fault signal that the program running sequence is abnormal.
Step S207, obtaining a preset time interval currently pointed by the second pointer of the interface function.
Step S208, controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to execute a next preset time interval adjacent to the currently pointed preset time interval in the maximum interval time table of program execution.
An embodiment of the present invention provides a program operation monitoring apparatus, including:
the first acquisition module is used for acquiring a target execution serial number currently pointed by a first pointer of an interface function and a form parameter representing the current execution serial number in the currently called interface function; the target execution sequence number is a target execution sequence number in a pre-stored program execution sequence list;
the first determining module is used for determining whether the current program execution sequence is abnormal or not according to the target execution sequence number and the form parameter representing the current execution sequence number;
the first reporting module is used for reporting a fault signal of the abnormal program running sequence when the current program execution sequence is determined to be abnormal.
In the program operation monitoring apparatus according to the embodiment of the present invention, the first determining module includes:
the first determining submodule determines that the current program execution sequence is abnormal if the target execution sequence number is different from the form parameter representing the current execution sequence number;
and the second determining submodule is used for determining that the execution sequence of the current program is normal if the target execution sequence number is the same as the form parameter representing the current execution sequence number.
The program operation monitoring device of the embodiment of the invention further comprises:
the second obtaining module is used for obtaining a preset time interval pointed by a second pointer of the interface function currently and a time interval between the previous calling of the interface function and the current calling of the interface function when the current program execution sequence is determined to be normal; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
a second determining module, configured to determine whether the current program execution time interval is overtime according to the preset time interval and a time interval between the previous time of calling the interface function and the current time of calling the interface function;
and the second reporting module is used for reporting the fault signal of the overtime program execution time interval when the overtime program execution time interval of the current program is determined.
In the program operation monitoring apparatus according to the embodiment of the present invention, the second determining module includes:
a third determining submodule, configured to determine that the current program execution time interval is overtime if a time interval between a previous time of calling the interface function and a current time of calling the interface function is greater than the preset time interval;
and the fourth determining submodule is used for determining that the current program execution time interval is not overtime if the time interval between the previous time of calling the interface function and the current time of calling the interface function is less than or equal to the preset time interval.
In the program operation monitoring apparatus of the embodiment of the present invention, the apparatus further includes:
the first control module is configured to, when it is determined that the current program execution time interval is not timed out, control the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and control the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
In the program operation monitoring apparatus of the embodiment of the present invention, the apparatus further includes:
and the second control module is configured to control the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table and control the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table after the second reporting module reports the fault signal indicating that the program execution time interval is overtime.
In the program operation monitoring apparatus of the embodiment of the present invention, the apparatus further includes:
a third obtaining module, configured to obtain a preset time interval currently pointed by a second pointer of the interface function after the first reporting module reports the fault signal that the program running sequence is abnormal; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
and the third control module is used for controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
The program operation monitoring device of the embodiment of the invention compares the target execution sequence number currently pointed by the first pointer of the interface function with the formal parameter representing the current execution sequence number in the interface function to determine whether the current program execution sequence is abnormal, and reports the fault signal of the abnormal program execution sequence when the current program execution sequence is determined to be abnormal, thereby realizing timely discovery of wrong execution results, reducing the possibility of human-vehicle safety problems, and improving the safety and reliability of the whole vehicle.
The embodiment of the invention also provides an electric automobile which comprises the program operation monitoring device.
An embodiment of the present invention further provides an electric vehicle, including: the processor, the memory and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement each process of the steps of the above-described program running monitoring method embodiment, and can achieve the same technical effect, and are not described herein again to avoid repetition.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned embodiment of the program operation monitoring method, and in order to avoid repetition, details are not repeated here.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (17)

1. A program operation monitoring method, comprising:
acquiring a target execution serial number pointed by a first pointer of an interface function at present and a form parameter representing the current execution serial number in the interface function called at present; the target execution sequence number is a target execution sequence number in a pre-stored program execution sequence list; the interface function is a statement written in each subprogram in advance, and the program execution sequence table is a comparison table set in advance according to the execution sequence of each subprogram;
determining whether the current program execution sequence is abnormal or not according to the target execution sequence number and the form parameter representing the current execution sequence number;
and reporting a fault signal of the abnormal program running sequence when the current program execution sequence is determined to be abnormal.
2. The program operation monitoring method according to claim 1, wherein the step of determining whether the current program execution sequence is abnormal according to the target execution sequence number and the formal parameter representing the current execution sequence number comprises:
if the target execution sequence number is different from the form parameter representing the current execution sequence number, determining that the current program execution sequence is abnormal;
and if the target execution sequence number is the same as the form parameter representing the current execution sequence number, determining that the current program execution sequence is normal.
3. The program operation monitoring method according to claim 1, wherein after the step of determining whether the current program execution sequence is abnormal according to the target execution sequence number and the formal parameter representing the current execution sequence number, the method further comprises:
when the current program execution sequence is determined to be normal, acquiring a preset time interval pointed by a second pointer of the interface function currently and a time interval between the previous calling of the interface function and the current calling of the interface function; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
determining whether the current program execution time interval is overtime or not according to the preset time interval and the time interval between the previous calling of the interface function and the current calling of the interface function;
and reporting a fault signal of the overtime program execution time interval when the overtime program execution time interval of the current program is determined.
4. The program operation monitoring method according to claim 3, wherein the step of determining whether the current program execution time interval is overtime according to the preset time interval and the time interval between the previous call of the interface function and the current call of the interface function comprises:
if the time interval between the previous calling of the interface function and the current calling of the interface function is greater than the preset time interval, determining that the current program execution time interval is overtime;
and if the time interval between the previous calling of the interface function and the current calling of the interface function is less than or equal to the preset time interval, determining that the current program execution time interval is not overtime.
5. The method according to claim 3, wherein after the step of determining whether the current execution time interval is over time according to the preset time interval and the time interval between the previous calling of the interface function and the current calling of the interface function, the method further comprises:
and when the current program execution time interval is not over time, controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
6. The method according to claim 3, wherein after the step of reporting the fault signal indicating that the time interval between the execution of the program has expired, the method further comprises:
and controlling the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
7. The method according to claim 1, wherein after the step of reporting the fault signal indicating the abnormal program running sequence, the method further comprises:
acquiring a preset time interval pointed by a second pointer of the interface function at present; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
and controlling the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and controlling the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
8. A program operation monitoring device, comprising:
the first acquisition module is used for acquiring a target execution serial number currently pointed by a first pointer of an interface function and a form parameter representing the current execution serial number in the currently called interface function; the target execution sequence number is a target execution sequence number in a pre-stored program execution sequence list; the interface function is a statement written in each subprogram in advance, and the program execution sequence table is a comparison table set in advance according to the execution sequence of each subprogram;
the first determining module is used for determining whether the current program execution sequence is abnormal or not according to the target execution sequence number and the form parameter representing the current execution sequence number;
the first reporting module is used for reporting a fault signal of the abnormal program running sequence when the current program execution sequence is determined to be abnormal.
9. The program operation monitoring device according to claim 8, wherein the first determining module includes:
the first determining submodule determines that the current program execution sequence is abnormal if the target execution sequence number is different from the form parameter representing the current execution sequence number;
and the second determining submodule is used for determining that the execution sequence of the current program is normal if the target execution sequence number is the same as the form parameter representing the current execution sequence number.
10. The program operation monitoring device according to claim 8, characterized in that the device further comprises:
the second obtaining module is used for obtaining a preset time interval pointed by a second pointer of the interface function currently and a time interval between the previous calling of the interface function and the current calling of the interface function when the current program execution sequence is determined to be normal; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
a second determining module, configured to determine whether the current program execution time interval is overtime according to the preset time interval and a time interval between the previous time of calling the interface function and the current time of calling the interface function;
and the second reporting module is used for reporting the fault signal of the overtime program execution time interval when the overtime program execution time interval of the current program is determined.
11. The program operation monitoring device according to claim 10, wherein the second determining module includes:
a third determining submodule, configured to determine that the current program execution time interval is overtime if a time interval between a previous time of calling the interface function and a current time of calling the interface function is greater than the preset time interval;
and the fourth determining submodule is used for determining that the current program execution time interval is not overtime if the time interval between the previous time of calling the interface function and the current time of calling the interface function is less than or equal to the preset time interval.
12. The program operation monitoring device according to claim 10, characterized in that the device further comprises:
the first control module is configured to, when it is determined that the current program execution time interval is not timed out, control the first pointer to point to a next target execution sequence number adjacent to a currently pointed target execution sequence number in the program execution sequence table, and control the second pointer to point to a next preset time interval adjacent to a currently pointed preset time interval in the program execution maximum interval time table.
13. The program operation monitoring device according to claim 10, characterized in that the device further comprises:
and the second control module is used for controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
14. The program operation monitoring device according to claim 8, characterized in that the device further comprises:
a third obtaining module, configured to obtain a preset time interval to which a second pointer of the interface function currently points; the preset time interval is a preset time interval in a pre-stored program execution maximum interval time table;
and the third control module is used for controlling the first pointer to point to a next target execution sequence number adjacent to the currently pointed target execution sequence number in the program execution sequence table and controlling the second pointer to point to a next preset time interval adjacent to the currently pointed preset time interval in the program execution maximum interval time table.
15. An electric vehicle characterized by comprising the program operation monitoring device according to any one of claims 8 to 14.
16. An electric vehicle, comprising: processor, memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the program operation monitoring method according to any one of claims 1 to 7.
17. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the program execution monitoring method according to any one of claims 1 to 7.
CN201910064023.1A 2019-01-23 2019-01-23 Program operation monitoring method and device and electric automobile Active CN111474913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910064023.1A CN111474913B (en) 2019-01-23 2019-01-23 Program operation monitoring method and device and electric automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910064023.1A CN111474913B (en) 2019-01-23 2019-01-23 Program operation monitoring method and device and electric automobile

Publications (2)

Publication Number Publication Date
CN111474913A CN111474913A (en) 2020-07-31
CN111474913B true CN111474913B (en) 2021-07-20

Family

ID=71743315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910064023.1A Active CN111474913B (en) 2019-01-23 2019-01-23 Program operation monitoring method and device and electric automobile

Country Status (1)

Country Link
CN (1) CN111474913B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635940A (en) * 2009-08-27 2010-01-27 中兴通讯股份有限公司 Method and device for measuring program segment execution time
CN103631695A (en) * 2013-12-19 2014-03-12 北京经纬恒润科技有限公司 Time monitoring method and device
CN104572472A (en) * 2015-01-28 2015-04-29 中国农业银行股份有限公司 Program execution sequence diagnosis method and program execution sequence diagnosis system
CN105912447A (en) * 2016-05-19 2016-08-31 南京科远自动化集团股份有限公司 Monitoring method for embedded program execution order
CN107122282A (en) * 2017-03-28 2017-09-01 中国第汽车股份有限公司 A kind of Functional Safety Communication method based on spi bus
CN107531194A (en) * 2014-09-25 2018-01-02 日本精工株式会社 The control device and control method of vehicle-mounted electronic device
US9928365B1 (en) * 2016-10-31 2018-03-27 International Business Machines Corporation Automated mechanism to obtain detailed forensic analysis of file access
WO2018163655A1 (en) * 2017-03-06 2018-09-13 オムロン株式会社 Motor control device, motor control system, runaway state detection method, and program
CN108848072A (en) * 2018-05-25 2018-11-20 东南大学 A kind of vehicle-mounted CAN bus method for detecting abnormality based on relative entropy

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006012156B4 (en) * 2006-03-10 2008-11-06 Imc Messsysteme Gmbh A programmer for a device for testing, a method for producing a program sequence for a programmer, a computer program for carrying out the steps of the method, and a device and method for testing
US8832411B2 (en) * 2011-12-14 2014-09-09 Microsoft Corporation Working set swapping using a sequentially ordered swap file
JP5956506B2 (en) * 2014-05-23 2016-07-27 ファナック株式会社 Numerical control device with program processing resume function
CN106569783B (en) * 2015-10-08 2021-05-28 腾讯科技(深圳)有限公司 Method and device for executing task script

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635940A (en) * 2009-08-27 2010-01-27 中兴通讯股份有限公司 Method and device for measuring program segment execution time
CN103631695A (en) * 2013-12-19 2014-03-12 北京经纬恒润科技有限公司 Time monitoring method and device
CN107531194A (en) * 2014-09-25 2018-01-02 日本精工株式会社 The control device and control method of vehicle-mounted electronic device
CN104572472A (en) * 2015-01-28 2015-04-29 中国农业银行股份有限公司 Program execution sequence diagnosis method and program execution sequence diagnosis system
CN105912447A (en) * 2016-05-19 2016-08-31 南京科远自动化集团股份有限公司 Monitoring method for embedded program execution order
US9928365B1 (en) * 2016-10-31 2018-03-27 International Business Machines Corporation Automated mechanism to obtain detailed forensic analysis of file access
WO2018163655A1 (en) * 2017-03-06 2018-09-13 オムロン株式会社 Motor control device, motor control system, runaway state detection method, and program
CN107122282A (en) * 2017-03-28 2017-09-01 中国第汽车股份有限公司 A kind of Functional Safety Communication method based on spi bus
CN108848072A (en) * 2018-05-25 2018-11-20 东南大学 A kind of vehicle-mounted CAN bus method for detecting abnormality based on relative entropy

Also Published As

Publication number Publication date
CN111474913A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN108872762B (en) Electronic equipment leakage detection method and device, electronic equipment and storage medium
CN110486349B (en) Filter failure detection method, hydraulic system, vehicle and storage medium
CN111474913B (en) Program operation monitoring method and device and electric automobile
CN113654080B (en) Method and device for determining on-off state of burner in gas boiler
CN113595773B (en) Information processing method, device, electronic equipment and storage medium
CN110555009B (en) Processing method and device for Network File System (NFS) service
CN108945091B (en) Steering control method and device, electric power steering system controller and automobile
CN111465150A (en) Control method and device for ultraviolet L ED lamp
CN114584041A (en) Control method and device of servo driver
CN111625185B (en) Method, system and related assembly for monitoring disk fault
JP2013088937A (en) Information processing device
CN112924166B (en) Overflow valve fault detection method and device, electronic equipment and storage medium
CN114510495B (en) Database service data consistency processing method and system
JPS6029982B2 (en) Pseudo failure generating device
WO2022015313A1 (en) Generation of alerts of correlated time-series behavior of environments
CN111591302A (en) Vehicle control method and device
JP4562641B2 (en) Computer system, operation state determination program, and operation state determination method
CN110955554A (en) Fault processing method, device, equipment and storage medium
CN114859868B (en) Error-proofing processing method for off-line configuration of passenger car combination instrument system
CN113991839B (en) Device and method for improving remote control opening reliability
CN115855119B (en) Navigation system fault analysis method and related device
CN114148270B (en) Low-voltage fault warning shielding method, system and medium in engine starting process
CN113687621B (en) Alarm suppression method, system, device and storage medium based on time sequence alarm information
US10705980B2 (en) Method and system for multicore communication with safety properties
CN117309687A (en) Transformer fault information monitoring point position determining method, device, terminal and medium

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