CN115855119A - Navigation system fault analysis method and related device - Google Patents

Navigation system fault analysis method and related device Download PDF

Info

Publication number
CN115855119A
CN115855119A CN202310146792.2A CN202310146792A CN115855119A CN 115855119 A CN115855119 A CN 115855119A CN 202310146792 A CN202310146792 A CN 202310146792A CN 115855119 A CN115855119 A CN 115855119A
Authority
CN
China
Prior art keywords
error
navigation
controller
target
sequence
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.)
Granted
Application number
CN202310146792.2A
Other languages
Chinese (zh)
Other versions
CN115855119B (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.)
Guangzhou Asensing Technology Co Ltd
Original Assignee
Guangzhou Asensing Technology 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 Guangzhou Asensing Technology Co Ltd filed Critical Guangzhou Asensing Technology Co Ltd
Priority to CN202310146792.2A priority Critical patent/CN115855119B/en
Publication of CN115855119A publication Critical patent/CN115855119A/en
Application granted granted Critical
Publication of CN115855119B publication Critical patent/CN115855119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of navigation, and provides a navigation system fault analysis method and a related device.A micro control unit in a navigation terminal records the type of a system error, a historical calling function sequence and current navigation data by calling a prestored error information capturing function when capturing the system error of a navigation system in the running process; and after the navigation system is restarted, the error type, the historical calling function sequence and the current navigation data of the system are sent to the server side, so that the navigation system is subjected to fault analysis through the server side. The error information capturing function is called when the navigation system has errors, so that the system error information is stored and sent to the server side for fault analysis, the fault tracing of the navigation system is realized, the fault analysis efficiency is improved, favorable conditions are provided for the optimization and the upgrade of the navigation system, and the stability of the navigation system is improved.

Description

Navigation system fault analysis method and related device
Technical Field
The invention relates to the technical field of navigation, in particular to a navigation system fault analysis method and a related device.
Background
In the operation process of the navigation system, wrong navigation information is sometimes injected into the navigation system, so that the navigation system is wrong, and the operation of the navigation system is abnormal. At present, automatic recovery is usually realized by clearing all system error information so as to ensure that the navigation system can normally operate. Due to the fact that system error information is lost in the mode, the root cause of the fault of the navigation system is difficult to analyze, real problems cannot be solved, and therefore the stability of the navigation system is affected.
Disclosure of Invention
In view of the above, the present invention provides a method and a related apparatus for analyzing a navigation system fault.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for analyzing a fault of a navigation system, which is applied to a micro control unit in a navigation terminal, wherein the navigation terminal is provided with the navigation system, and is in communication connection with a server, and the method includes:
when a system error occurs in the operation process of the navigation system, the type of the system error, a historical calling function sequence and current navigation data are recorded by calling a pre-stored error information capturing function;
and after the navigation system is restarted, sending the system error type, the historical calling function sequence and the current navigation data to the server side so as to analyze the fault of the navigation system through the server side.
In an alternative embodiment, the micro control unit includes a controller and a non-volatile memory;
the step of recording the system error type, the historical calling function sequence and the current navigation data comprises the following steps:
the controller obtains a target error code, wherein the target error code represents the system error type;
the controller obtaining a pointer sequence comprising N historical pointers pointing to N historical functions called by the navigation system prior to calling the error information capture function; n is a positive integer;
the controller controls the navigation system to stop updating the navigation data and obtain the current navigation data;
the controller stores the target error code, the sequence of pointers, and the current navigation data to the non-volatile memory.
In an optional embodiment, the micro control unit further includes a read-only register, where the read-only register is used to cache an error code generated when a system error occurs in an operation process of the navigation system;
the step of acquiring the target error code by the controller includes:
and the controller reads the latest error code from the read-only register to obtain the target error code.
In an optional embodiment, the micro control unit further includes a stack pointer register, where each element of a stack in the stack pointer register represents a pointer corresponding to a function called by the navigation system;
the step of the controller obtaining a pointer sequence comprising N historical pointers comprises:
the controller acquires the address of the stack top based on the stack pointer register to obtain a stack address; elements in the stack top represent target pointers corresponding to the error information capturing functions;
the controller performs N +1 times of stack popping operation based on the stack address to obtain the target pointer and N historical pointers;
and the controller obtains the pointer sequence based on the pop sequence of the N historical pointers.
In an alternative embodiment, the step of storing the target error code, the pointer sequence, and the current navigation data in the nonvolatile memory by the controller includes:
and the controller organizes the target error code, the pointer sequence and the current navigation data into a target structure body according to a preset rule, and stores the target structure body into the nonvolatile memory.
In an optional embodiment, the step of sending the system error type, the historical calling function sequence and the current navigation data to the server includes:
the controller acquires the target structure from the nonvolatile memory and analyzes the target structure to obtain the system error type, the historical calling function sequence and the current navigation data;
and the controller generates a system error log based on the system error type, the historical calling function sequence and the current navigation data, and sends the system error log to the server.
In an alternative embodiment, the navigation terminal further comprises a non-volatile memory communicatively connected to a micro control unit, the micro control unit comprising a controller;
the step of recording the system error type, the historical calling function sequence and the current navigation data comprises the following steps:
the controller obtains a target error code, wherein the target error code represents the system error type;
the controller obtaining a pointer sequence comprising N historical pointers pointing to N historical functions called by the navigation system prior to calling the error information capture function; n is a positive integer;
the controller controls the navigation system to stop updating the navigation data and obtain the current navigation data;
the controller stores the target error code, the sequence of pointers, and the current navigation data to the non-volatile memory.
In an optional implementation manner, the navigation terminal is in communication connection with the server through a controller domain network;
the step of sending the system error type, the historical calling function sequence and the current navigation data to the server includes:
and sending the system error type, the historical calling function sequence and the current navigation data to the server through a special channel in the controller domain network.
In an alternative embodiment, the micro-control unit has an error trapping function corresponding to each basic system error type;
before the step of recording a system error type, a history calling function sequence and current navigation data by calling a pre-stored error information capturing function when capturing that an error occurs in the operation process of the navigation system, the method further comprises the following steps:
determining a plurality of target system error types from all basic system error types;
starting a target error capturing function corresponding to each target system error type by configuring a micro control unit; the target error capturing function is used for capturing when a corresponding target system error occurs in the navigation system;
and setting the pre-programmed error information capture function as a response function corresponding to all target error capture functions.
In a second aspect, the present invention provides a navigation system fault analysis device, which is applied to a micro control unit in a navigation terminal, wherein the navigation terminal is provided with a navigation system, and the navigation terminal is in communication connection with a server, and the device includes:
the recording module is used for recording the type of the system error, a historical calling function sequence and the current navigation data by calling a pre-stored error information capturing function when the navigation system is captured to have the system error in the running process;
and the sending module is used for sending the system error type, the historical calling function sequence and the current navigation data to the server after the navigation system is restarted so as to analyze the fault of the navigation system through the server.
In a third aspect, the present invention provides a micro control unit for implementing the method of any one of the preceding embodiments.
In a fourth aspect, the present invention provides a navigation terminal, which includes the micro control unit described in the foregoing embodiments.
In a fifth aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any one of the preceding embodiments.
According to the navigation system fault analysis method and the related device provided by the invention, when a micro control unit in a navigation terminal captures a system error in the operation process of the navigation system, a prestored error information capturing function is called, and the type of the system error, a historical calling function sequence and current navigation data are recorded; and after the navigation system is restarted, the error type, the historical calling function sequence and the current navigation data of the system are sent to the server side, so that the navigation system is subjected to fault analysis through the server side. The error information capturing function is called when the navigation system has errors, so that the system error information is stored and sent to the server side for fault analysis, the fault tracing of the navigation system is realized, the fault analysis efficiency is improved, favorable conditions are provided for the optimization and the upgrade of the navigation system, and the stability of the navigation system is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating an application scenario provided by an embodiment of the present invention;
FIG. 2 is a block diagram of a navigation terminal provided by an embodiment of the present invention;
FIG. 3 is a flow chart of a method for analyzing a fault of a navigation system according to an embodiment of the present invention;
FIG. 4 is a second flowchart illustrating a method for analyzing a fault of a navigation system according to an embodiment of the present invention;
FIG. 5 is a third schematic flow chart illustrating a navigation system fault analysis method according to an embodiment of the present invention;
fig. 6 is a functional block diagram of a navigation system fault analysis apparatus according to an embodiment of the present invention.
Icon: 10-a navigation terminal; 20-a server side; 110-a micro control unit; 120-non-volatile memory; 111-a controller; 113-a non-volatile memory; 115-read only register; 117-stack pointer register; 300-a navigation system fault analysis device; 310-a recording module; 330-a sending module; 350-configuration module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
In the operation process of the navigation system, wrong navigation information is sometimes injected into the navigation system, so that the navigation system is wrong, and the operation of the navigation system is abnormal. At present, automatic recovery is usually realized by clearing all system error information so as to ensure that the navigation system can normally operate. Due to the fact that system error information is lost in the mode, the root cause of the fault of the navigation system is difficult to analyze, real problems cannot be solved, and therefore the stability of the navigation system is affected. Further, the embodiment of the invention provides a method for analyzing the fault of the navigation system to solve the problem.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention. The navigation terminal 10 and the server 20 are included, and the navigation terminal 10 and the server 20 may be connected through ethernet communication, or may be connected through Controller Area Network (CAN) communication.
The navigation terminal 10 may be a type of in-vehicle navigation apparatus that is installed with a navigation system, which may be understood as an application having a navigation function.
The server 20 may be an independent server or a server cluster composed of a plurality of servers.
Please refer to fig. 2, which is a block diagram of a navigation terminal 10 according to an embodiment of the present invention. The navigation terminal 10 includes a micro control Unit 110, i.e., an MCU (micro controller Unit), which is an integrated circuit chip, and the micro control Unit 110 may be understood as a processing chip for implementing a navigation function.
The mcu 110 may include a controller 111, a non-volatile memory 113, a read-only register 115, and a stack pointer register 117 connected by a bus.
Among other things, the controller 111 has signal processing capability that can interpret received commands and perform calculations or data processing based on the interpreted commands. The non-volatile memory 113 is a non-volatile memory module inside the mcu 110, i.e. data is not lost after power off; alternatively, the nonvolatile memory 113 may be a Dataflash.
The read-only register 115 is a register that can only be read and cannot be written, and is used for caching error codes generated when an error occurs in the operation process of the navigation system. The Stack Pointer register 117 is an SP (Stack Pointer) register, and the Stack in the Stack Pointer register 117 is used for storing a Pointer corresponding to a function called by the navigation system.
Optionally, the navigation terminal 10 may further include a non-volatile memory 120 communicatively connected to the micro control unit 110. Alternatively, the nonvolatile Memory 120 may be an electrically Erasable Read Only Memory (EEPROM).
It is understood that the structure shown in fig. 2 is only a schematic structural diagram of the navigation terminal 10, and the navigation terminal 10 may include more or less components than those shown in fig. 2, or have a different configuration from that shown in fig. 1. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
The micro control unit 110 is used as an execution body to execute the steps of the methods provided by the embodiments of the present invention, and achieve the corresponding technical effects.
Fig. 3 is a schematic flow chart of a method for analyzing a navigation system fault according to an embodiment of the present invention.
Step S202, when a system error occurs in the operation process of the navigation system, the type of the system error, a historical calling function sequence and current navigation data are recorded by calling a pre-stored error information capturing function;
in this embodiment, during the operation of the navigation system, a system error, such as a memory encroachment error, a zero-crossing error, a data access error, a stack overflow error, etc., may occur due to the navigation information with an error being injected, and the mcu 110 may be used to capture the system error occurring in the navigation system. It should be noted that the system errors listed here are only examples, and the present embodiment is not limited thereto.
When the micro control unit 110 captures that the navigation system has a system error, the type of the system error, the sequence of the historical calling functions and the current navigation data can be recorded by calling a preset error information capturing function. The system error type refers to the type of system error generated by the current navigation system; the history calling function sequence refers to a function called by the navigation system before an error occurs and a calling sequence; the current navigation data refers to navigation data of the navigation system when an error occurs.
Wherein the navigation data may include, but is not limited to: the method comprises the following steps of current time, position solution state, longitude and standard deviation thereof, latitude and standard deviation thereof, altitude and standard deviation thereof, course angle and standard deviation thereof, roll angle and standard deviation thereof, pitch angle and standard deviation thereof, positioning box installation angle error, northeast speed value and standard deviation thereof, triaxial accelerometer value and standard deviation thereof, triaxial gyro value and standard deviation thereof, differential age and satellite number. It should be noted that the specific content of the navigation data may be set according to the actual application, and the embodiment of the present invention is not limited.
It can be understood that, when an error of the navigation system is captured, the embodiment of the invention records three types of system error information, namely the type of the system error, the sequence of the historical calling function and the current navigation data, by calling the error information capturing function, so as to store the fault site information of the navigation system, and facilitate the subsequent fault analysis according to the system error information.
Step S204, after the navigation system is restarted, the error type, the historical calling function sequence and the current navigation data of the system are sent to a server side, so that the navigation system is subjected to fault analysis through the server side;
in this embodiment, after the system error type, the history call function sequence, and the current navigation data are recorded, the navigation system is immediately restarted, that is, the system reset is completed in the shortest time, so that the navigation system continues to provide the navigation service. The navigation terminal 10 then transmits the system error type, the history calling function sequence, and the current navigation data to the server 20. Development engineers and maintenance personnel can know the working state of the navigation system when the navigation system has errors through the system error information received by the server 20, and carry out fault analysis and problem troubleshooting based on the system error information, analyze the root cause of the navigation system errors, and carry out optimization and upgrade on the navigation system so as to improve the stability of the navigation system.
Based on the steps, when a micro control unit in the navigation terminal captures a system error in the operation process of the navigation system, the micro control unit calls a pre-stored error information capture function and records the type of the system error, a historical call function sequence and current navigation data; and after the navigation system is restarted, the error type, the historical calling function sequence and the current navigation data of the system are sent to the server side, so that the navigation system is subjected to fault analysis through the server side. The error information capturing function is called when the navigation system has errors, so that the system error information is stored and sent to the server side for fault analysis, the fault tracing of the navigation system is realized, the fault analysis efficiency is improved, favorable conditions are provided for the optimization and the upgrade of the navigation system, and the stability of the navigation system is improved.
Optionally, for the process of recording the system error type, the history call function sequence, and the current navigation data in step S202, two implementation manners are provided in the embodiment of the present invention, please refer to fig. 4.
Step S202-1, the controller obtains a target error code, wherein the target error code represents a system error type;
step S202-3, the controller obtains a pointer sequence comprising N historical pointers, wherein the N historical pointers point to N historical functions called by the navigation system before the error information capturing function is called; n is a positive integer;
step S202-5, the controller controls the navigation system to stop updating the navigation data and obtain the current navigation data;
in this embodiment, by calling the error information capturing function, the controller 111 in the mcu 110 can obtain the target error code and the pointer sequence, and at the same time, the controller 111 can control the navigation system to stop updating the navigation data and obtain the current navigation data.
It is understood that each system error has an error code corresponding thereto, and the target error code refers to an error code corresponding to a system error occurring in the current navigation system, which indicates a type of the system error occurring in the current navigation system, i.e., a system error type.
The pointer sequence includes N historical pointers, each historical pointer pointing to each historical function, the historical functions referring to functions called by the navigation system before calling the error information capturing function. And the N historical pointers in the pointer sequence are arranged according to the sequence that the navigation system calls the N historical functions, namely the calling time of each historical function is arranged from far to near.
Step S202-7A, the controller stores the target error code, the pointer sequence and the current navigation data into a nonvolatile memory;
step S202-7B, the controller stores the target error code, the pointer sequence and the current navigation data into a nonvolatile memory;
in this embodiment, after the controller 111 acquires the target error code, the pointer sequence, and the current navigation data, the three types of system error data are stored, so as to achieve the effect of storing the fault field information. For the storage process, the embodiment of the invention provides two implementation modes:
in the first step, step S202-7A, the non-volatile memory 113 has a memory block dedicated to storing system error data. The controller 111 stores the target error code, the pointer sequence and the current navigation data in a dedicated memory block in the non-volatile memory 113, which can be understood as writing these three types of system error data into a memory space inside the mcu 110.
In the second, step S202-7B, the non-volatile memory 120 has a memory block dedicated to storing system error data. The controller 111 stores the target error code, the pointer sequence and the current navigation data to a dedicated memory block in the non-volatile memory 120, which can be understood as writing these three types of system error data to a memory space outside the micro control unit 110.
It will be appreciated that, regardless of the storage method, the controller will store the system error data in a dedicated memory block, thereby avoiding memory conflicts with other system data.
Optionally, for the step S202-1, the embodiment of the present invention provides a possible implementation manner, that is: and the controller reads the latest error code from the read-only register to obtain a target error code.
It will be appreciated that the micro control unit 110 also includes a read only register 115 for buffering error codes generated when a system error occurs during operation of the navigation system.
In this embodiment, by invoking the error information capturing function, parameters in the error information capturing function may be linked to the rom 115, and the controller 111 obtains the target error code by reading the latest error code in the rom 115, i.e. the error code corresponding to the system error occurring in the current navigation system.
Optionally, for the step S202-3, the embodiment of the present invention provides a possible implementation manner, that is:
step S202-3-1, the controller acquires the address of the stack top based on the stack pointer register to obtain a stack address; elements in the stack top represent target pointers corresponding to the error information capturing functions;
step S202-3-3, the controller performs N +1 times of stack popping operation based on the stack address to obtain a target pointer and N historical pointers;
and step S202-3-5, the controller obtains a pointer sequence based on the pop sequence of the N historical pointers.
It will be appreciated that the mcu 110 further includes a stack pointer register 117, where the stack pointer register 117 includes a stack, which can be understood to be a first-in-last-out data structure. The top end of the stack is called the top of the stack and the bottom end of the stack is called the bottom of the stack.
The pointer corresponding to the function called by the navigation system at present can be placed at the top of the stack as a new element, and each element in the stack represents the pointer corresponding to the function called by the navigation system. Because the function called by the navigation system at present is an error information capture function, the element in the current stack top represents a pointer corresponding to the error information capture function, namely a target pointer.
In this embodiment, the controller 111 may obtain the address of the stack top based on the stack pointer register 117, that is, the stack address; and then, performing N +1 times of stack popping operation based on the stack address, namely acquiring N +1 elements from the stack to obtain a target pointer and N historical pointers before the target pointer. Since the elements in the stack are in-first and out-last, the pointer sequence can be derived based on the out-of-stack order of the N historical pointers.
It can be understood that the N historical pointers in the pointer sequence point to N historical functions called by the navigation system before the navigation system calls the error information capturing function, and the functions and the calling sequence called by the navigation system before the system error occurs can be obtained based on the pointer sequence, which provides key information for subsequently analyzing the fault reason of the navigation system, and is beneficial for a development engineer to analyze the problem more efficiently and according to the basis.
Optionally, for the step S202-7A, the embodiment of the present invention provides a possible implementation manner, that is: the controller organizes the target error code, the pointer sequence and the current navigation data into a target structure according to a preset rule, and stores the target structure into a nonvolatile memory.
In this embodiment, a rule for storing system error data, that is, a preset rule is preset, and the preset rule may be a storage protocol between the controller 111 and the nonvolatile memory 113, which is agreed in advance.
The controller 111 organizes the target error code, the pointer sequence, and the current navigation data into a data type of a structure according to a preset rule to obtain a target structure, and stores the target structure in the nonvolatile memory 113.
It can be understood that the embodiment of the present invention combines the system error data when the navigation system has a system error into a data type of a structure and stores the data type. Because the system error data are the original data in the navigation system and occupy small storage space, the storage resources can be saved by storing the system error data, so that more and more comprehensive system error data can be stored, and data support is provided for the optimization and the upgrade of the navigation system.
It should be understood that step S202-7B for the above-mentioned step can be implemented in a similar manner, that is, the controller 111 organizes the target error code, the pointer sequence and the current navigation data into a target structure according to a predetermined rule, and stores the target structure into the nonvolatile memory 120, wherein the predetermined rule is a storage protocol between the controller 111 and the nonvolatile memory 120 agreed in advance.
Optionally, for the scenario where the target structure is stored in the nonvolatile memory, the present invention implements a process of sending the system error type, the history call function sequence, and the current navigation data to the server in step S204, and an embodiment of the present invention provides a possible implementation manner.
Step S204-1, the controller acquires a target structure from the nonvolatile memory and analyzes the target structure to obtain a system error type, a historical calling function sequence and current navigation data;
step S204-3, the controller generates a system error log based on the system error type, the historical calling function sequence and the current navigation data, and sends the system error log to the server;
in this embodiment, after the navigation system is restarted and the system reset is completed, the controller 111 acquires the target structure from the nonvolatile memory 113, and analyzes the target structure to analyze the system error data into system error information of a plaintext, that is, a system error type, a history calling function sequence, and current navigation data; and then generating a system error log based on the type of the system error, the historical calling function sequence and the current navigation data and sending the system error log to the server 20, so that a development engineer and a maintenance worker can perform fault analysis on the system error log received by the server 20.
It is understood that after the system error log is generated, the system error log may be broadcasted many times according to a preset time period to ensure that the server receives the system error log. Moreover, the system error log may be stored in a non-volatile memory to ensure that system error information is not lost due to power-up or power-down. When the nonvolatile memory is fully loaded, the latest system error log may overwrite the original system error log.
It should be understood that, for the scenario of storing the target structure into the nonvolatile memory, the above-mentioned implementation may be implemented in a similar manner, that is, the controller 111 obtains the target structure from the nonvolatile memory 120, parses the target structure, obtains a system error type, a history calling function sequence, and current navigation data, and then generates a system error log based on the system error type, the history calling function sequence, and the current navigation data, and sends the system error log to the server 20.
Optionally, for a scenario where the navigation terminal is in communication connection with the server through the CAN network, for the process of sending the system error type, the historical call function sequence, and the current navigation data to the server in step S204, a possible implementation manner is provided in the embodiment of the present invention, that is: and sending the system error type, the historical calling function sequence and the current navigation data to a server through a special channel in the controller domain network.
In this embodiment, a dedicated channel dedicated to transmitting the system error information may be preset in the CAN network, so that the navigation terminal 10 sends the system error information, i.e., the type of the system error, the history call function sequence, and the current navigation data, to the server 20 through the dedicated channel.
It can be understood that, in the embodiment of the present invention, the dedicated channel is used to separately transmit the system error information, which can avoid the influence on the transmission of other system data caused by the shared transmission channel, and further can ensure that the navigation system can normally provide the navigation service after being restarted.
Optionally, before step 202, a possible implementation manner is further provided in the embodiment of the present invention, please refer to fig. 5.
Step S206, determining a plurality of target system error types in all basic system error types;
step S208, a micro control unit is configured, and a target error capturing function corresponding to each target system error type is started; the target error capturing function is used for capturing when a navigation system has a corresponding target system error;
step S210, setting the pre-programmed error information capturing function as the response function corresponding to all the target error capturing functions.
In the present embodiment, the mcu 110 has an error trapping function corresponding to each basic system error type. For the basic system error types, analysis can be performed according to the conditions caused after the basic system error types occur, and then the system error types with serious conditions are used as target system error types, namely a plurality of target system error types are obtained.
By referring to the data manual of the micro control unit 110, the error capturing function corresponding to the types of the target system errors, i.e., the interface of the target error capturing function, can be obtained, then the micro control unit 110 is configured, and the interface of each target error capturing function is set to be in an open state, so as to start each target error capturing function, and then the micro control unit 110 can capture the target system errors when the navigation system has the target system errors.
After each target error capturing function is started, the pre-programmed error information capturing function is set as a response function corresponding to all target error capturing functions, so that when the micro control unit 110 captures a system error of the navigation system, the system error information is recorded by calling the error information capturing function, thereby enabling the storage of the fault site information of the navigation system to be possible, and providing a basis for the subsequent fault analysis of the navigation system.
In order to execute the corresponding steps in the above embodiments and various possible modes, an implementation mode of the navigation system fault analysis device is given below. Referring to fig. 6, fig. 6 is a functional block diagram of a navigation system fault analysis apparatus 300 according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the navigation system fault analysis device 300 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and corresponding contents in the above embodiments may be referred to. The navigation system failure analysis device 300 includes:
the recording module 310 is configured to, when a system error occurs in the operation process of the navigation system, call a pre-stored error information capture function, and record a system error type, a history call function sequence, and current navigation data;
the sending module 330 is configured to send the system error type, the historical call function sequence, and the current navigation data to the server after the navigation system is restarted, so as to perform fault analysis on the navigation system through the server.
Optionally, the recording module 310 is further configured to: the controller acquires a target error code, wherein the target error code represents a system error type; the controller acquires a pointer sequence comprising N historical pointers, wherein the N historical pointers point to N historical functions called by a navigation system before calling an error information capturing function; n is a positive integer; the controller controls the navigation system to stop updating the navigation data and obtain the current navigation data; the controller stores the target error code, the pointer sequence, and the current navigation data to the non-volatile memory.
Optionally, the recording module 310 is further configured to: and the controller reads the latest error code from the read-only register to obtain a target error code.
Optionally, the recording module 310 is further configured to: the controller acquires the address of the stack top based on the stack pointer register to obtain a stack address; elements in the stack top represent target pointers corresponding to the error information capturing functions; the controller performs N +1 times of stack popping operation based on the stack address to obtain a target pointer and N historical pointers; and the controller obtains a pointer sequence based on the pop sequence of the N historical pointers.
Optionally, the recording module 310 is further configured to: the controller organizes the target error code, the pointer sequence and the current navigation data into a target structure according to a preset rule, and stores the target structure into a nonvolatile memory.
Optionally, the sending module 330 is further configured to: the controller acquires a target structure from the nonvolatile memory and analyzes the target structure to obtain a system error type, a historical calling function sequence and current navigation data; the controller generates a system error log based on the system error type, the historical calling function sequence and the current navigation data, and sends the system error log to the server.
Optionally, the recording module 310 is further configured to: the controller acquires a target error code, wherein the target error code represents a system error type; the controller acquires a pointer sequence comprising N historical pointers, wherein the N historical pointers point to N historical functions called by a navigation system before calling an error information capturing function; n is a positive integer; the controller controls the navigation system to stop updating the navigation data and obtains the current navigation data; the controller stores the target error code, the sequence of pointers, and the current navigation data to the non-volatile memory.
Optionally, the sending module 330 is further configured to: and sending the system error type, the historical calling function sequence and the current navigation data to a server through a special channel in the controller domain network.
Optionally, the navigation system fault analysis apparatus 300 further includes a configuration module 350 for determining a plurality of target system error types among all the base system error types; starting a target error capturing function corresponding to each target system error type by configuring the micro control unit; the target error capturing function is used for capturing when a navigation system has a corresponding target system error; and setting the pre-programmed error information capture function as a response function corresponding to all target error capture functions.
The embodiment of the invention also provides a micro control unit, and the micro control unit is used for realizing the navigation system fault analysis method disclosed by the embodiment of the invention.
The embodiment of the invention also provides a navigation terminal which comprises the micro control unit provided by the embodiment of the invention.
The embodiment of the invention also provides a storage medium, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the navigation system fault analysis method disclosed by the embodiment of the invention is realized.
In summary, the present invention provides a method and a related device for analyzing a navigation system fault, wherein when a micro control unit in a navigation terminal captures a system error occurring in a running process of the navigation system, the micro control unit calls a pre-stored error information capture function to record a system error type, a history call function sequence and current navigation data; and after the navigation system is restarted, the error type, the historical calling function sequence and the current navigation data of the system are sent to the server side, so that the navigation system is subjected to fault analysis through the server side. The error information capturing function is called when the navigation system has errors, so that the system error information is stored and sent to the server side for fault analysis, the fault tracing of the navigation system is realized, the fault analysis efficiency is improved, favorable conditions are provided for the optimization and the upgrade of the navigation system, and the stability of the navigation system is improved.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A fault analysis method of a navigation system is characterized by being applied to a micro control unit in a navigation terminal, wherein the navigation terminal is provided with the navigation system and is in communication connection with a server side, and the method comprises the following steps:
when a system error occurs in the operation process of the navigation system, the type of the system error, a historical calling function sequence and current navigation data are recorded by calling a pre-stored error information capturing function;
and after the navigation system is restarted, sending the system error type, the historical calling function sequence and the current navigation data to the server side so as to analyze the fault of the navigation system through the server side.
2. The method of claim 1, wherein the micro-control unit comprises a controller and a non-volatile memory;
the step of recording the system error type, the historical calling function sequence and the current navigation data comprises the following steps:
the controller obtains a target error code, wherein the target error code represents the system error type;
the controller obtaining a pointer sequence comprising N historical pointers pointing to N historical functions called by the navigation system prior to calling the error information capture function; n is a positive integer;
the controller controls the navigation system to stop updating the navigation data and acquire the current navigation data;
the controller stores the target error code, the sequence of pointers, and the current navigation data to the non-volatile memory.
3. The method of claim 2, wherein the mcu further comprises a read-only register for buffering error codes generated when a system error occurs during operation of the navigation system;
the step of acquiring the target error code by the controller includes:
and the controller reads the latest error code from the read-only register to obtain the target error code.
4. The method of claim 2, wherein the mcu further comprises a stack pointer register, wherein each element of the stack in the stack pointer register represents a pointer corresponding to a function called by the navigation system;
the step of the controller obtaining a pointer sequence comprising N historical pointers comprises:
the controller acquires the address of the stack top based on the stack pointer register to obtain a stack address; elements in the stack top represent target pointers corresponding to the error information capturing functions;
the controller performs N +1 times of stack popping operation based on the stack address to obtain the target pointer and N historical pointers;
and the controller obtains the pointer sequence based on the pop sequence of the N historical pointers.
5. The method of claim 2, wherein the step of the controller storing the target error code, the sequence of pointers, and the current navigation data to the non-volatile memory comprises:
and the controller organizes the target error code, the pointer sequence and the current navigation data into a target structure body according to a preset rule, and stores the target structure body into the nonvolatile memory.
6. The method of claim 5, wherein the step of sending the system error type, the historical calling function sequence, and the current navigation data to the server comprises:
the controller acquires the target structure from the nonvolatile memory and analyzes the target structure to obtain the system error type, the historical calling function sequence and the current navigation data;
and the controller generates a system error log based on the system error type, the historical calling function sequence and the current navigation data, and sends the system error log to the server.
7. The method of claim 1, wherein the navigation terminal further comprises a non-volatile memory communicatively connected to a micro-control unit, the micro-control unit comprising a controller;
the step of recording the system error type, the historical calling function sequence and the current navigation data comprises the following steps:
the controller obtains a target error code, wherein the target error code represents the system error type;
the controller obtaining a pointer sequence comprising N historical pointers pointing to N historical functions called by the navigation system prior to calling the error information capture function; n is a positive integer;
the controller controls the navigation system to stop updating the navigation data and obtain the current navigation data;
the controller stores the target error code, the sequence of pointers, and the current navigation data to the non-volatile memory.
8. The method of claim 1, wherein the navigation terminal is communicatively connected with the server via a controller domain network;
the step of sending the system error type, the historical calling function sequence and the current navigation data to the server includes:
and sending the system error type, the historical calling function sequence and the current navigation data to the server through a special channel in the controller domain network.
9. The method of claim 1, wherein the micro control unit has an error trapping function corresponding to each basic system error type;
before the step of recording a system error type, a history calling function sequence and current navigation data by calling a pre-stored error information capturing function when capturing that an error occurs in the operation process of the navigation system, the method further comprises the following steps:
determining a plurality of target system error types in all the basic system error types;
starting a target error capturing function corresponding to each target system error type by configuring a micro control unit; the target error capturing function is used for capturing when a corresponding target system error occurs in the navigation system;
and setting the pre-programmed error information capture function as a response function corresponding to all target error capture functions.
10. The utility model provides a navigation system fault analysis device which characterized in that, is applied to the little the control unit in the navigation terminal, navigation system is installed to the navigation terminal, navigation terminal and server side communication connection, the device includes:
the recording module is used for recording the type of system errors, a historical calling function sequence and current navigation data by calling a pre-stored error information capturing function when the navigation system is captured to have system errors in the running process;
and the sending module is used for sending the system error type, the historical calling function sequence and the current navigation data to the server after the navigation system is restarted so as to analyze the fault of the navigation system through the server.
11. A micro control unit, characterized in that it is adapted to implement the method of any of claims 1 to 9.
12. A navigation terminal, characterized in that it comprises a micro control unit according to claim 11.
13. A storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, implements the method of any one of claims 1 to 9.
CN202310146792.2A 2023-02-21 2023-02-21 Navigation system fault analysis method and related device Active CN115855119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310146792.2A CN115855119B (en) 2023-02-21 2023-02-21 Navigation system fault analysis method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310146792.2A CN115855119B (en) 2023-02-21 2023-02-21 Navigation system fault analysis method and related device

Publications (2)

Publication Number Publication Date
CN115855119A true CN115855119A (en) 2023-03-28
CN115855119B CN115855119B (en) 2023-05-02

Family

ID=85658596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310146792.2A Active CN115855119B (en) 2023-02-21 2023-02-21 Navigation system fault analysis method and related device

Country Status (1)

Country Link
CN (1) CN115855119B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5628016A (en) * 1994-06-15 1997-05-06 Borland International, Inc. Systems and methods and implementing exception handling using exception registration records stored in stack memory
CN103293399A (en) * 2012-02-22 2013-09-11 海尔集团公司 Method and system for fault analysis of electric equipment
CN108920314A (en) * 2018-06-26 2018-11-30 郑州云海信息技术有限公司 A kind of faulty hardware localization method, device, system and readable storage medium storing program for executing
CN113778726A (en) * 2020-06-09 2021-12-10 武汉斗鱼网络科技有限公司 Error information processing method, device, server and storage medium
CN114543839A (en) * 2022-02-25 2022-05-27 中国第一汽车股份有限公司 Vehicle-mounted navigation fault diagnosis system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5628016A (en) * 1994-06-15 1997-05-06 Borland International, Inc. Systems and methods and implementing exception handling using exception registration records stored in stack memory
CN103293399A (en) * 2012-02-22 2013-09-11 海尔集团公司 Method and system for fault analysis of electric equipment
CN108920314A (en) * 2018-06-26 2018-11-30 郑州云海信息技术有限公司 A kind of faulty hardware localization method, device, system and readable storage medium storing program for executing
CN113778726A (en) * 2020-06-09 2021-12-10 武汉斗鱼网络科技有限公司 Error information processing method, device, server and storage medium
CN114543839A (en) * 2022-02-25 2022-05-27 中国第一汽车股份有限公司 Vehicle-mounted navigation fault diagnosis system and method

Also Published As

Publication number Publication date
CN115855119B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN106777049B (en) Processing method and system for avoiding repeated log output
CN109165152B (en) Method, system and storage medium for monitoring performance of WEB system
CN110618830A (en) Remote upgrading method and system based on NBIOT network
CN103327051A (en) Long-distance desktop management system and method
KR102555801B1 (en) Method for debugging noise elimination algorithm, apparatua and electronic device
CN111865718A (en) Gateway offline data storage method, device, equipment and medium
CN111490947A (en) Data packet transmitting method, data packet receiving method, system, device and medium
CN109962827A (en) Device link detection method, device, equipment and readable storage medium storing program for executing
CN111586022A (en) Firewall opening verification method, electronic device, computer equipment and storage medium
CN115855119B (en) Navigation system fault analysis method and related device
CN112905106B (en) Data processing method, device, system, equipment and storage medium
CN110555009B (en) Processing method and device for Network File System (NFS) service
CN110941254A (en) Aeroengine data processing method and equipment
CN104536892A (en) Software online debugging method and system
CN112527363A (en) Software package version updating method, device, system, equipment and medium
CN111400094A (en) Method, device, equipment and medium for restoring factory settings of server system
CN111338681A (en) Firmware upgrading method and system for equipment
CN112530615A (en) Variable forcing method and system suitable for nuclear power station equipment
CN113076225B (en) External storage medium detection method, device and equipment and storage medium
CN112463071B (en) Method and device for selectively clearing nonvolatile storage
CN109901117A (en) A kind of radar method for restarting and device
CN113411402B (en) Device monitoring method and device based on adb and electronic device
CN112565398B (en) GFS data downloading method and device, electronic equipment and storage medium
CN111857664B (en) Application development method, device, equipment and storage medium
CN116931995A (en) System upgrading method and device, electronic equipment and storage 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