Freeze frame generation method and related device

By using variable pointers of non-volatile storage variables to generate freeze frames in vehicle fault detection, the problem of high storage space occupancy is solved and more efficient fault diagnosis is achieved.

CN119621389BActive Publication Date: 2025-09-23NINGBO GEELY ROYAL ENGINE COMPONENTS CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411670976.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-09-23
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

In the prior art, there are many variables related to vehicle failures, which results in a high storage space occupancy rate of the freeze frame and requires large storage resources.

Method used

By obtaining a data identifier list, traversing and identifying a target data identifier, and using a variable pointer in a non-volatile storage variable to generate a freeze frame, the need to define a data identifier separately for each fault assessment variable is reduced.

Benefits of technology

It effectively reduces the storage space usage and improves the accuracy and efficiency of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621389B_ABST
    Figure CN119621389B_ABST
Patent Text Reader

Abstract

The present application discloses a freeze frame generation method and related apparatus, wherein the method includes: upon detecting a first fault of an electronic device, obtaining a data identifier list, traversing the data identifier list, and when traversing to a target data identifier, generating a freeze frame corresponding to the first fault based on the data of a fault assessment variable located by a variable pointer in a non-volatile storage variable. In this way, the variable pointer is stored in the non-volatile storage variable, and the variable data is obtained through the variable pointer in the non-volatile storage variable. This eliminates the need to define a data identifier for each fault assessment variable, thereby reducing space usage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of vehicle failure, and in particular relates to a freeze frame generation method and related devices. Background Art

[0002] "Freeze frame" is important data for automobile fault diagnosis. When a vehicle detects a fault, it will record the sensor and internal status information at a specific moment to form a data snapshot, namely the freeze frame.

[0003] Generally, a data identifier DID is defined for variables related to vehicle failure. The variables are used to determine the cause of the vehicle failure. One DID corresponds to one variable, and the corresponding relationship is immutable. The defined data identifier DID is written to the freeze frame so that the variable data corresponding to the data identifier DID can be obtained later to locate the cause of the failure.

[0004] Since there are many variables related to vehicle failures, if a corresponding DID is defined for each variable separately, a lot of storage space and resources will be required.

[0005] Therefore, a method is urgently needed to achieve the goal of not having to define each variable related to vehicle faults individually to reduce the storage space occupancy. Summary of the Invention

[0006] Embodiments of the present application provide a freeze frame generation method, device, electronic device, storage medium, and vehicle, which can reduce the occupancy of storage space.

[0007] In a first aspect, an embodiment of the present application provides a method for generating a frozen frame, the method comprising:

[0008] When a first fault of the electronic device is detected, obtaining a data identifier list, wherein the data identifier list includes at least one data identifier, each of the data identifiers is used to identify a fault assessment variable, and the fault assessment variable is a variable used to assess a cause of the fault of the electronic device;

[0009] Traversing the data identifier list to obtain a traversal result, the traversal result being used to indicate whether a target data identifier exists in the data identifier list, the target data identifier being used to be associated with a non-volatile storage variable, the non-volatile storage variable including at least one variable pointer of a fault assessment variable associated with a historical fault of the electronic device, and the variable pointer being used to locate data corresponding to the fault assessment variable, wherein the variable pointer in the non-volatile storage variable may be incremented or the data located by the variable pointer may be updated;

[0010] When the traversal result indicates that the target data identifier exists in the data identifier list, a freeze frame corresponding to the first fault is generated based on data of the fault assessment variable located by the variable pointer in the non-volatile storage variable.

[0011] In some embodiments, before acquiring the data identifier list when a first fault occurs in the electronic device, the method further includes:

[0012] In a case where a second fault occurs in the electronic device, identifying at least one first fault assessment variable related to the second fault, the historical faults including the second fault;

[0013] Obtaining a first variable pointer corresponding to the at least one first fault assessment variable;

[0014] In a case where the first variable pointer exists in the non-volatile storage variable, updating the data located by the first variable pointer in the non-volatile storage variable to the data under the second fault; or

[0015] When the first variable pointer does not exist in the non-volatile storage variable, the first variable pointer is added to the non-volatile storage variable.

[0016] In some implementations, generating a freeze frame corresponding to the first fault based on data of the fault assessment variable located by the variable pointer in the non-volatile storage variable includes:

[0017] Obtaining at least one variable pointer in the non-volatile storage variable associated with the target data identifier to obtain a second variable pointer;

[0018] Obtain the target data located by the second variable pointer;

[0019] Writing each acquired target data into a freeze frame corresponding to the first fault to generate a freeze frame corresponding to the first fault;

[0020] The obtaining of at least one variable pointer in the non-volatile storage variable associated with the target data identifier, before obtaining the second variable pointer, includes:

[0021] Performing data verification on the non-volatile storage variable to obtain a verification result, where the verification result is used to indicate whether the non-volatile storage variable passes the data verification;

[0022] If the verification result indicates that the non-volatile storage variable passes the data verification, the step of obtaining at least one variable pointer in the non-volatile storage variable associated with the target data identifier to obtain a second variable pointer is performed.

[0023] In some embodiments, the performing of data verification on the non-volatile storage variable to obtain a verification result includes at least one of the following:

[0024] Obtaining the number of variables in the non-volatile storage variable, and if the number of variables is less than or equal to the maximum number of variables corresponding to the non-volatile storage variable, a verification result indicates that the non-volatile storage variable passes data verification;

[0025] Performing validity identification on each of the variable pointers in the non-volatile storage variables to obtain a verification result;

[0026] A cyclic redundancy check is performed on the non-volatile storage variable to obtain a check result.

[0027] In some embodiments, the variable pointer includes a variable length and a variable address, and the performing validity identification on each variable pointer in the non-volatile storage variable to obtain a verification result includes:

[0028] Identify whether the length of each variable is less than a preset length, and whether the address of each variable is within a preset range;

[0029] If the length of each variable is less than the preset length, and the address of each variable is within the preset range, the verification result indicates that the non-volatile storage variable passes the data verification.

[0030] In some implementations, performing a cyclic redundancy check on the non-volatile storage variable to obtain a check result includes:

[0031] Performing a cyclic redundancy check on the non-volatile storage variable to obtain a target CRC value;

[0032] If the target CRC value is consistent with the preset CRC value, the verification result indicates that the non-volatile storage variable passes the data verification.

[0033] In a second aspect, an embodiment of the present application further provides a freeze frame generation device, comprising:

[0034] A list acquisition module is used to acquire a data identifier list when a first fault is detected in the electronic device. The data identifier list includes at least one data identifier, each of which is used to identify a fault assessment variable, and the fault assessment variable is a variable used to assess the cause of the fault of the electronic device.

[0035] A list traversal module is used to traverse the data identifier list and obtain a traversal result, wherein the traversal result is used to indicate whether a target data identifier exists in the data identifier list, and the target data identifier is used to be associated with a non-volatile storage variable, and the non-volatile storage variable includes at least one variable pointer of a fault assessment variable related to a historical fault of the electronic device, and the variable pointer is used to locate the data corresponding to the fault assessment variable, and the variable pointer in the non-volatile storage variable can be increased or the data located by the variable pointer can be updated.

[0036] A freeze frame generating module is configured to generate a freeze frame corresponding to the first fault based on data of the fault assessment variable located by the variable pointer in the non-volatile storage variable when the traversal result indicates that the target data identifier exists in the data identifier list.

[0037] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor and a memory storing computer program instructions;

[0038] When the processor executes the computer program instructions, the method for generating a freeze frame as described in any one of the first aspects is implemented.

[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the freeze frame generation method as described in any one of the first aspects is implemented.

[0040] In a fifth aspect, an embodiment of the present application further provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the freeze frame generation method as described in the first aspect.

[0041] In a sixth aspect, an embodiment of the present application further provides a vehicle comprising the electronic device as described in the third aspect.

[0042] The freeze frame generation method, device, electronic device, storage medium, and vehicle of the embodiments of the present application associate a target data identifier with a non-volatile storage variable, place the target data identifier in a data identifier list, and upon detecting a first fault in the electronic device, obtain the data identifier list, traverse the data identifier list, and upon traversing to the target data identifier, generate a freeze frame corresponding to the first fault based on the data of the fault assessment variable located by the variable pointer in the non-volatile storage variable. In this way, by storing the variable pointer in the non-volatile storage variable and obtaining the variable data through the variable pointer in the non-volatile storage variable, it is possible to eliminate the need to define a data identifier for each fault assessment variable separately, thereby reducing space usage. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0044] Figure 1 This is a flow chart of an embodiment of a method for generating a freeze frame provided by the present application;

[0045] Figure 2 This application provides Figure 1 Flow chart of the steps before step S101;

[0046] Figure 3 This application provides Figure 1 Flowchart example of step S103;

[0047] Figure 4 Provided for this application Figure 3 Flow chart of the steps before step S301;

[0048] Figure 5 Provided for this application Figure 4 Flow diagram of step S401;

[0049] Figure 6 A complete verification process diagram provided for this application;

[0050] Figure 7 A schematic diagram of the structure of a freeze frame generation device provided in this application;

[0051] Figure 8 It is a structural diagram of an embodiment of the electronic device provided by this application. DETAILED DESCRIPTION

[0052] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.

[0053] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.

[0054] Figure 1 The flowchart of an embodiment of a method for generating a frozen frame provided by the present application is shown. The method for generating a frozen frame of the present application can be applied to electronic devices, which may include user terminals, portable notebooks or vehicle-mounted terminals, etc. Figure 1 As shown, the freeze frame generation method includes but is not limited to the following steps S101 to S103.

[0055] Step S101: When a first fault is detected in an electronic device, a data identifier list is obtained.

[0056] Step S102: traverse the data identifier list to obtain a traversal result.

[0057] Step S103 : if the traversal result indicates that the target data identifier exists in the data identifier list, generating a freeze frame corresponding to the first fault based on the data of the fault assessment variable located by the variable pointer in the non-volatile storage variable.

[0058] The above-mentioned data identifier list contains at least one data identifier DID, and the data identifier DID is used to identify the fault assessment variable. The fault assessment variable is a variable used to evaluate the cause of the fault of the electronic device. For example, if the fault assessment variable is time or vehicle speed, the data identifier list contains time DID and vehicle speed DID. The time DID is used to identify the time, and the speed DID is used to identify the vehicle speed.

[0059] In a possible implementation, the fault assessment variable includes at least one of an engine speed and a vehicle operating mode.

[0060] In step S101 of some instances, the data identifier DID can be divided into a universal data identifier and a specialized data identifier. The universal data identifier can be used to identify universal fault assessment variables that are directly related to the operating status of the electronic device. For example, when the electronic device is a vehicle, the universal fault assessment variables can be time, vehicle speed, engine speed, vehicle operating mode, etc. Therefore, the universal data identifier can include time DID, vehicle speed DID, vehicle operating mode DID, etc. The specialized data identifier can be used to identify fault assessment variables that are directly related to the fault. For example, when the electronic device is a vehicle, the fault is difficulty in starting the engine, then the fault assessment variables that are directly related to the fault are the mixture concentration, the carbon deposit content at the throttle valve, etc. Therefore, the specialized data identifier can include the mixture concentration DID, the carbon deposit content at the throttle valve DID, etc.

[0061] The data identifier list may include a universal data identifier list and a specialized data identifier list, wherein the universal data identifier list contains universal data identifiers and the specialized data identifier list contains specialized data identifiers.

[0062] When a first fault is detected in the electronic device, a universal data identifier list and a specialized data identifier list may be acquired.

[0063] In an embodiment of the present invention, a shareable data identifier, namely a target data identifier, is also constructed. The target data identifier is used to associate with a non-volatile storage (NVM) variable. The non-volatile storage variable includes at least one variable pointer to a fault assessment variable related to a historical fault of the electronic device. The historical fault is a fault that has occurred in the electronic device. For example, the electronic device is a car. When the fault assessment variables related to the historical faults of the car are time, vehicle speed, and vehicle operating mode, the non-volatile storage variable may include a variable pointer to time, a variable pointer to vehicle speed, and a variable pointer to vehicle operating mode.

[0064] The variable pointer is used to locate the data of the corresponding fault assessment variable. Specifically, the variable pointer is used to locate the location of the data of the corresponding fault assessment variable so as to locate the data of the corresponding fault assessment variable.

[0065] The variable pointer may include a variable length and a variable address. The variable length is the data length of the fault assessment variable, and the variable address is the address of the fault assessment variable. The NVM variable may be composed of the variable length and the variable address. Refer to Table 1, which is the data structure definition of the NVM variable.

[0066] Table 1

[0067]

[0068] The variable pointer in the above non-volatile storage variable may increase. Since as the number of failures of the electronic device increases, the number of failure assessment variables related to historical failures will also increase accordingly, so the variable pointer in the non-volatile storage variable will also increase.

[0069] The data at the location indicated by the variable pointer can be updated. When a fault is detected in the electronic device, the data at the location indicated by the variable pointer is updated to the value of the fault assessment variable corresponding to the variable pointer under the current fault. For example, if the vehicle's speed at the time of the fault was 15 m / s and the time was 12:00, and the fault assessment variables include speed and time, then the data at the location indicated by the variable pointer for speed is updated to 15 m / s, and the data at the location indicated by the variable pointer for time is updated to 12:00.

[0070] In a possible implementation, the variable pointer may be configured by a target device storing data of the fault assessment variable, and the data stored in the target device may be updated.

[0071] For example, the target device is a single-chip microcomputer, that is, the data corresponding to the fault assessment variable can be stored in the single-chip of the electronic device, each variable pointer can locate the position of the data of the corresponding fault assessment variable in the single-chip, and the variable pointer of the fault assessment variable can be configured by the single-chip. Therefore, the position of the data of the corresponding fault assessment variable in the single-chip can be located based on each variable pointer, thereby locating the data of each fault assessment variable.

[0072] For example, when the car breaks down, the speed is 15m / s and the time is 12:00. The fault assessment variables include the speed and time. The data at the position located by the variable pointer of the speed is updated to 15m / s, and the data at the position located by the variable pointer of the time is updated to 12:00. The data located by the variable pointer of the speed and the variable pointer of the time are 15m / s and 12:00 respectively.

[0073] The above traversal result is used to indicate whether the target data identifier exists in the data identifier list.

[0074] In step S102 of some instances, the traversal result is divided into indicating that the target data identifier exists in the data identifier list or indicating that the target data identifier does not exist in the data identifier list, and by sequentially identifying the data identifiers in the data identifier list, it is determined whether the target data identifier exists.

[0075] In step S103 of some instances, when the traversal result indicates that a target data identifier exists in the data identifier list, at least one variable pointer in a non-volatile storage variable associated with the target data identifier is read through a preset target data identifier reading function, and data of a corresponding fault assessment variable is obtained based on the read variable pointer, and a freeze frame corresponding to the first fault is generated. The target data identifier reading function is a pre-set function for reading variable pointers in non-volatile storage variables.

[0076] In steps S101 to S103 of the embodiment of the present invention, a corresponding relationship between the target data identifier and the variable pointers of multiple fault assessment variables is established by associating the target data identifier with the non-volatile storage variable. This allows the target data identifier to identify multiple fault assessment variables, and there is no need to define a data identifier separately for each fault assessment variable, thereby reducing space occupancy and saving resources.

[0077] like Figure 2 As shown, before step S101 , the following steps S201 to S203 are included but not limited to.

[0078] Step S201: When a second fault is detected in the electronic device, identifying at least one first fault assessment variable related to the second fault.

[0079] Step S202: Acquire a first variable pointer corresponding to the at least one first fault assessment variable.

[0080] Step S203: If the first variable pointer exists in the non-volatile storage variable, update the data located by the first variable pointer in the non-volatile storage variable to the data under the second fault; or, if the first variable pointer does not exist in the non-volatile storage variable, add the first variable pointer to the non-volatile storage variable.

[0081] The second fault is a fault that occurs before the first fault.

[0082] In step S201 in some examples, all fault assessment variables related to the second fault may be identified by using a preset logic analysis technology to obtain a plurality of first fault assessment variables.

[0083] In step S202 of some instances, a variable pointer corresponding to the first fault assessment variable obtained in the above step S201 is obtained to obtain multiple first variable pointers. For example, when the data corresponding to the first fault assessment variable is stored in the microcontroller, the microcontroller configures the corresponding first variable pointer based on the location where the data corresponding to the first fault assessment variable is stored.

[0084] In a possible implementation, a first preset number of first fault assessment variables may be selected from the first fault assessment variables acquired in step S201 to obtain a target fault assessment variable, and then a first variable pointer corresponding to the target fault assessment variable may be acquired.

[0085] In step S203 of some instances, when there is a first variable pointer in the non-volatile storage variable, the data located by the first variable pointer in the non-volatile storage variable is updated to the data under the second fault. For example, the first variable pointer includes a variable pointer for vehicle speed and a variable pointer for time. There are already variable pointers for vehicle speed and time in the non-volatile storage variable, and the vehicle speed when the second fault occurs is 15m / s and the time is 12:00. Then, the data at the position located by the variable pointer for vehicle speed is updated to 15m / s, and the data at the position located by the variable pointer for time is updated to 12:00.

[0086] When the first variable pointer does not exist in the non-volatile storage variable, a new first variable pointer is added to the non-volatile storage variable. For example, the first variable pointer includes the variable pointer of the vehicle speed and the variable pointer of the time, and the non-volatile storage variable does not include the variable pointer of the vehicle speed and the variable pointer of the time, then the obtained variable pointer of the vehicle speed and the variable pointer of the time are stored in the non-volatile storage variable.

[0087] In a possible implementation, the originally stored variable pointer may be replaced by the first variable pointer obtained in step S202.

[0088] It should be noted that, since the historical fault is a fault that has already occurred, the above historical fault includes the second fault.

[0089] In steps S201-S202 of the embodiment of the present invention, by writing the variable pointers corresponding to the fault assessment variables of the historical faults into the non-volatile storage variables, more variable pointers corresponding to the fault assessment variables can be obtained when executing step S103, thereby obtaining more fault assessment variables related to the electronic equipment fault, which can improve the effectiveness of the subsequent generation of freeze frames and improve the accuracy of fault diagnosis.

[0090] like Figure 3 As shown, step S103 also includes but is not limited to the following steps S301 to S303.

[0091] Step S301: Acquire at least one variable pointer in the non-volatile storage variable associated with the target data identifier to obtain a second variable pointer.

[0092] Step S302: Acquire the target data located by the second variable pointer.

[0093] Step S303 : writing each acquired target data into a freeze frame corresponding to the first fault to generate a freeze frame corresponding to the first fault.

[0094] In some examples, in step S301, all variable pointers in the non-volatile storage variable associated with the target data identifier are obtained to obtain a second variable pointer. In a possible implementation, a second preset number of variable pointers may be selected from the non-volatile storage variable to obtain the second variable pointer.

[0095] In step S302 of some instances, the storage location of the data of the corresponding fault assessment variable is located through each variable pointer in the second variable pointer, the corresponding data is acquired, and the target data of each fault assessment variable corresponding to the second variable pointer is obtained.

[0096] In step S303 of some examples, each target data is correspondingly written into the freeze frame, so that the target data of each fault assessment variable corresponding to the second variable pointer is stored in the freeze frame, thereby generating a final freeze frame of the first fault.

[0097] In steps S301 to S303 of the embodiment of the present invention, the target data of each fault assessment variable corresponding to the second variable pointer is obtained through the second variable pointer in the non-volatile storage variable, so that the target data of as many fault assessment variables as possible can be quickly obtained to improve the effectiveness and efficiency of the generated freeze frame.

[0098] like Figure 4 As shown, step S301 also includes but is not limited to the following steps S401 to S402.

[0099] Step S401: performing data verification on the non-volatile storage variable to obtain a verification result.

[0100] Step S402: If the verification result indicates that the non-volatile storage variable passes the data verification, the step of obtaining at least one variable pointer in the non-volatile storage variable associated with the target data identifier to obtain a second variable pointer is executed.

[0101] The above verification result is used to indicate whether the non-volatile storage variable has passed the data verification, and can be divided into a first verification result and a second verification result. The first verification result indicates that the non-volatile storage variable has passed the data verification, and the second verification result indicates that the non-volatile storage variable has not passed the data verification.

[0102] In step S401 of some examples, data verification may be performed on the non-volatile storage variable using a preset target data identifier reading function.

[0103] In step S401 and step S402 of the embodiment of the present invention, by performing data verification on the non-volatile storage variable before obtaining the second variable pointer in the non-volatile storage variable, errors in the non-volatile storage variable can be avoided.

[0104] like Figure 5 As shown, step S401 includes but is not limited to at least one of the following steps S501 to S503.

[0105] Step S501 , obtaining the number of variables in the non-volatile storage variables. If the number of variables is less than or equal to the maximum number of variables corresponding to the non-volatile storage variables, the verification result indicates that the non-volatile storage variables pass data verification.

[0106] Step S502: performing validity identification on each variable pointer in the non-volatile storage variable to obtain a verification result.

[0107] Step S503: Perform a cyclic redundancy check on the non-volatile storage variable to obtain a check result.

[0108] The variable pointers may include variable lengths and variable addresses. Each variable length is fixed, and the total length of data in the NVM variables is also fixed. The maximum number of variables can be obtained by dividing the total length of data in the NVM variables by the variable lengths. The number of variables may be the number of variable pointers.

[0109] In step S501 of some instances, if the number of variables is less than or equal to the maximum number of variables corresponding to the non-volatile storage variables, the verification result is the first verification result; if the number of variables is greater than the maximum number of variables corresponding to the non-volatile storage variables, the verification result is the second verification result.

[0110] In step S502 of some instances, when the variable pointer includes a variable length and a variable address, validity identification is performed by determining whether the variable length of each variable pointer in the non-volatile storage variable is less than a preset length, and whether the variable address of each variable pointer is within a preset range.

[0111] Specifically, it identifies whether the length of each variable is less than the preset length and whether the address of each variable is within the preset range. If the length of each variable is less than the preset length and the address of each variable is within the preset range, the verification result is the first verification result. If there is a variable length greater than the preset length or a variable address not within the preset range, the verification result is the second verification result.

[0112] In step S503 of some examples, the check result is obtained by determining whether a CRC value obtained by performing a cyclic redundancy check on the non-volatile storage variable is valid.

[0113] Specifically, a cyclic redundancy check (CRC calculation) is performed on the non-volatile storage variable to obtain a target CRC value. If the target CRC value is consistent with the preset CRC value, the check result is the first check result. If the target CRC value is inconsistent with the preset CRC value, the check result is the second check result.

[0114] In a possible implementation, if the verification result is the second verification result, preset fixed data representing the second verification result will be read, and finally, the read preset fixed data will be stored in the frozen frame.

[0115] It should be noted that if step S401 includes at least two items of steps S501 to S503, at least two items of steps S501 to S503 may be executed sequentially in any order, or at least two items of steps S501 to S503 may be executed simultaneously.

[0116] In order to better understand the above step S401, this embodiment provides a complete verification process diagram including steps S501 to S503, referring to Figure 6 .

[0117] First, read the NVM variable, obtain the number of variables in the NVM variable, and determine whether the number of variables is valid. If the number of variables is less than or equal to the maximum number of variables corresponding to the non-volatile storage variables, the number of variables is valid. Further obtain the variable pointer and determine whether the variable pointer is valid. If the length of each variable in the variable pointer is less than the preset length and the address of each variable is within the preset range, the variable pointer is valid. Further perform a cyclic redundancy check on the NVM variable to obtain the target CRC value. Determine whether the target CRC value is consistent with the preset CRC value. If they are consistent, the cyclic redundancy check passes, and finally the non-volatile storage variable passes the data verification.

[0118] Among them, if the number of variables is greater than the maximum number of variables corresponding to the non-volatile storage variables, the number of variables is invalid and the data verification fails. If the lengths of the variables of the variable pointers are not all less than the preset length, or the addresses of the variables are not all within the preset range, the variable pointers are invalid and the data verification fails. If the target CRC value is inconsistent with the preset CRC value, the data verification fails.

[0119] This embodiment utilizes the freeze frame generation method described above to associate a target data identifier with a non-volatile storage variable, placing the target data identifier in a data identifier list. Upon detecting a first fault in the electronic device, the data identifier list is retrieved and traversed. Upon reaching the target data identifier, a freeze frame for the first fault is generated based on the data of the fault assessment variable located by the variable pointer in the non-volatile storage variable. By storing the variable pointer in the non-volatile storage variable and retrieving the variable data through the variable pointer in the non-volatile storage variable, it is possible to eliminate the need to define a separate data identifier for each fault assessment variable, thereby reducing space usage.

[0120] Figure 7 FIG. 1 shows a schematic diagram of the structure of a freeze frame generation device provided in an embodiment of the present application. Figure 7 As shown, the freeze frame generating device 700 includes:

[0121] The list acquisition module 701 is used to obtain a data identifier list when a first fault is detected in the electronic device. The data identifier list includes at least one data identifier, each of which is used to identify a fault assessment variable, and the fault assessment variable is a variable used to evaluate the cause of the fault of the electronic device.

[0122] The list traversal module 702 is used to traverse the data identifier list and obtain a traversal result, wherein the traversal result is used to indicate whether a target data identifier exists in the data identifier list, and the target data identifier is used to be associated with a non-volatile storage variable. The non-volatile storage variable includes a variable pointer of at least one fault assessment variable related to a historical fault of the electronic device, and the variable pointer is used to locate the data corresponding to the fault assessment variable. The variable pointer in the non-volatile storage variable can be increased or the data located by the variable pointer can be updated.

[0123] The freeze frame generating module 703 is configured to generate a freeze frame corresponding to the first fault based on data of the fault assessment variable located by the variable pointer in the non-volatile storage variable when the traversal result indicates that the target data identifier exists in the data identifier list.

[0124] The freeze frame generation device 700 provided in the embodiment of the present application can implement the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be described in detail here.

[0125] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0126] The electronic device may include a processor 801 and a memory 802 storing computer program instructions.

[0127] Specifically, the processor 801 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0128] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 802 may include removable or non-removable (or fixed) media. Where appropriate, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.

[0129] In some embodiments, the memory 802 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0130] The processor 801 reads and executes computer program instructions stored in the memory 802 to implement any one of the freeze frame generation methods in the above embodiments.

[0131] In one example, the electronic device may further include a communication interface 803 and a bus 810. Figure 4 As shown, the processor 801, the memory 802, and the communication interface 803 are connected via a bus 810 and communicate with each other.

[0132] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0133] Bus 810 includes hardware, software or both, and the components of online data flow metering equipment are coupled to each other. For example, but not limitation, bus can include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 can include one or more buses. Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.

[0134] The electronic device can execute the freeze frame generation method in the embodiment of the present application, thereby realizing the combination of Figures 1 to 7 A method and apparatus for generating a freeze frame are described.

[0135] In addition, in conjunction with the freeze frame generation method in the above embodiment, the present application also provides a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, the freeze frame generation method in the above embodiment is implemented.

[0136] In combination with the freeze frame generation method in the above embodiment, an embodiment of the present application further provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device implements the freeze frame generation method in the above embodiment.

[0137] In combination with the electronic device in the above embodiment, an embodiment of the present application further provides a vehicle, which includes the electronic device in the above embodiment.

[0138] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0139] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0140] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0141] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0142] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.

Claims

1. A method for generating a freeze frame, characterized in that: The method comprises: When a first fault of the electronic device is detected, obtaining a data identifier list, wherein the data identifier list includes at least one data identifier, each of the data identifiers is used to identify a fault assessment variable, and the fault assessment variable is a variable used to assess a cause of the fault of the electronic device; Traversing the data identifier list to obtain a traversal result, the traversal result being used to indicate whether a target data identifier exists in the data identifier list, the target data identifier being used to be associated with a non-volatile storage variable, the non-volatile storage variable including at least one variable pointer of a fault assessment variable associated with a historical fault of the electronic device, and the variable pointer being used to locate data corresponding to the fault assessment variable, wherein the variable pointer in the non-volatile storage variable may be incremented or the data located by the variable pointer may be updated; When the traversal result indicates that the target data identifier exists in the data identifier list, a freeze frame corresponding to the first fault is generated based on data of the fault assessment variable located by the variable pointer in the non-volatile storage variable.

2. The method according to claim 1, characterized in that Before acquiring the data identifier list when a first fault occurs in the electronic device, the method further includes: In a case where a second fault occurs in the electronic device, identifying at least one first fault assessment variable related to the second fault, the historical faults including the second fault; Obtaining a first variable pointer corresponding to the at least one first fault assessment variable; In a case where the first variable pointer exists in the non-volatile storage variable, updating the data located by the first variable pointer in the non-volatile storage variable to the data under the second fault; or When the first variable pointer does not exist in the non-volatile storage variable, the first variable pointer is added to the non-volatile storage variable.

3. The method according to claim 1, characterized in that The generating a freeze frame corresponding to the first fault based on data of the fault assessment variable located by the variable pointer in the non-volatile storage variable includes: Obtaining at least one variable pointer in the non-volatile storage variable associated with the target data identifier to obtain a second variable pointer; Obtain the target data located by the second variable pointer; Writing each acquired target data into a freeze frame corresponding to the first fault to generate a freeze frame corresponding to the first fault; The obtaining of at least one variable pointer in the non-volatile storage variable associated with the target data identifier, before obtaining the second variable pointer, includes: Performing data verification on the non-volatile storage variable to obtain a verification result, where the verification result is used to indicate whether the non-volatile storage variable passes the data verification; If the verification result indicates that the non-volatile storage variable passes the data verification, the step of obtaining at least one variable pointer in the non-volatile storage variable associated with the target data identifier to obtain a second variable pointer is performed.

4. The method according to claim 3, characterized in that The performing of data verification on the non-volatile storage variable to obtain a verification result includes at least one of the following: Obtaining the number of variables in the non-volatile storage variable, and if the number of variables is less than or equal to the maximum number of variables corresponding to the non-volatile storage variable, a verification result indicates that the non-volatile storage variable passes data verification; Performing validity identification on each of the variable pointers in the non-volatile storage variables to obtain a verification result; A cyclic redundancy check is performed on the non-volatile storage variable to obtain a check result.

5. The method according to claim 4, characterized in that The variable pointer includes a variable length and a variable address, and the validity identification of each variable pointer in the non-volatile storage variable is performed to obtain a verification result, including: Identify whether the length of each variable is less than a preset length, and whether the address of each variable is within a preset range; If the length of each variable is less than the preset length, and the address of each variable is within the preset range, the verification result indicates that the non-volatile storage variable passes the data verification.

6. The method according to claim 4, characterized in that The performing a cyclic redundancy check on the non-volatile storage variable to obtain a check result includes: Performing a cyclic redundancy check on the non-volatile storage variable to obtain a target CRC value; If the target CRC value is consistent with the preset CRC value, the verification result indicates that the non-volatile storage variable passes the data verification.

7. An electronic device, characterized in that: The electronic device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the freeze frame generation method according to any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for generating a freeze frame according to any one of claims 1 to 6 is implemented.

9. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is caused to execute the freeze frame generation method according to any one of claims 1 to 6.

10. A vehicle, characterized in that: Comprising the electronic device as claimed in claim 7.

Citation Information

Patent Citations

  • Fault data recording system and method

    CN115454347A

  • Vehicle fault snapshot data analysis method, device, equipment and medium

    CN118259650A