Freeze frame generation method and related device

By using the data identifier list and variable pointers in the nonvolatile storage variable in the freezing frame generation method, the problem of high storage space occupancy caused by individually defining data identifiers for each variable in the prior art is solved, and more efficient freezing frame generation and resource utilization are achieved.

CN119621389AActive Publication Date: 2025-03-14NINGBO GEELY ROYAL ENGINE COMPONENTS CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When generating a frozen frame, the prior art needs to define a data identifier for each variable related to a vehicle failure, resulting in a high storage space occupancy.

Method used

By obtaining a list of data identifiers, iterating over the list to find the target data identifier, and generating a frozen frame based on data of the failure evaluation variable located by the variable pointer in the nonvolatile storage variable. This approach does not require individually defining the data identifier for each failure evaluation variable.

Benefits of technology

It reduces the occupancy of storage space, improves the efficiency of freezing frame generation, and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621389A_ABST
    Figure CN119621389A_ABST
Patent Text Reader

Abstract

The invention discloses a frozen frame generation method and a related device.The method comprises the steps that under the condition that it is detected that electronic equipment has a first fault, a data identifier list is obtained, the data identifier list is traversed, and when a target data identifier is traversed, the first fault is generated; and generating a freezing frame corresponding to the first fault based on the data of the fault evaluation variable positioned by the variable pointer in the nonvolatile storage variable. Therefore, the variable pointer is stored in the nonvolatile storage variable, and the variable data is acquired through the variable pointer in the nonvolatile storage variable, so that a data identifier does not need to be independently defined for each fault evaluation variable, and the occupied space is reduced.
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 method for generating a freeze frame and a related device. Background Art

[0002] "Freeze frame" is important data for automobile fault diagnosis. When a vehicle detects a fault, the sensor and internal status information at a specific moment will be recorded 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 requiring a single definition of each variable related to vehicle faults in order to reduce the occupancy of storage space. 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 rate of storage space.

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

[0008] When a first fault of the electronic device is detected, a data identifier list is obtained, wherein 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 a cause of the fault of the electronic device;

[0009] Traversing the data identifier list to obtain a traversal result, wherein the traversal result is used to indicate whether a target data identifier exists in the data identifier list, wherein the target data identifier is used to be associated with a non-volatile storage variable, wherein 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 data corresponding to the fault assessment variable, wherein the variable pointer in the non-volatile storage variable may be increased or the data located by the variable pointer may be updated;

[0010] In a case where 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 implementations, before acquiring the data identifier list when a first fault occurs in the electronic device, the method further includes:

[0012] In the case where a second fault of the electronic device is detected, identifying at least one first fault assessment variable associated with 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 the case where the first variable pointer exists 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; 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 the freeze frame under 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, comprises:

[0021] Performing data verification on the non-volatile storage variable to obtain a verification result, wherein 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 implementations, 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 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 the 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 implementations, the variable pointer includes a variable length and a variable address, and the performing validity identification on each of the variable pointers in the non-volatile storage variables 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 of the variables is less than the preset length, and the address of each of the variables is within a 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, wherein 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 to 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 generation module is used 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, the 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, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method for generating a freeze frame 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 instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for generating a freeze frame 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 embodiment of the present application associates the target data identifier with the non-volatile storage variable, puts the target data identifier into the data identifier list, obtains the data identifier list and traverses the data identifier list when the first fault of the electronic device is detected, and when the target data identifier is traversed, a freeze frame corresponding to 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. 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, so that the data identifier does not need to be defined separately for each fault assessment variable, so as to reduce space occupation. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solution 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 It is a flowchart of an embodiment of a method for generating a freeze frame provided by the present application;

[0045] Figure 2 This application provides Figure 1 Schematic diagram of the process of the steps before step S101;

[0046] Figure 3 This application provides Figure 1 Flow chart of step S103;

[0047] Figure 4 Provided for this application Figure 3 Schematic diagram of the process of the steps before step S301;

[0048] Figure 5 Provided for this application Figure 4 Schematic diagram of the process 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 the present application;

[0051] Figure 8 It is a schematic diagram of the structure of an embodiment of the electronic device provided by the present 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 only 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 article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including 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 an electronic device, which may include a user terminal, a portable notebook or a vehicle-mounted terminal, 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 the electronic device, a data identifier list is obtained.

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

[0057] Step S103, when 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 a fault assessment variable. The fault assessment variable is a variable used to assess the cause of a fault of an electronic device. For example, if the fault assessment variable is time or vehicle speed, then the data identifier list contains a time DID and a vehicle speed DID. The time DID is used to identify the time, and the vehicle speed DID is used to identify the vehicle speed.

[0059] In a possible implementation manner, 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, etc. Therefore, the specialized data identifier can include the mixture concentration DID, the carbon deposit content at the throttle, 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 position where the data of the corresponding fault assessment variable is located is located by using the variable pointer to locate the data of the corresponding fault assessment variable.

[0065] The variable pointer may include a variable length and a variable address, wherein 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 increase accordingly, the variable pointer in the non-volatile storage variable will also increase.

[0069] The data at the position where the variable pointer is located can be updated. When a fault is detected in the electronic device, the data at the position where the variable pointer is located is updated to the value of the fault assessment variable corresponding to the variable pointer under the current fault. For example, when the car breaks down, the speed is 15m / s and the time is 12:00. The fault assessment variable includes the speed and time. Then the data at the position where the variable pointer of the speed is located is updated to 15m / s, and the data at the position where the variable pointer of the time is located 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 identifying the data identifiers in the data identifier list in turn, it is determined whether the target data identifier exists.

[0075] In step S103 of some instances, when the traversal result indicates that there is a target data identifier in the data identifier list, at least one variable pointer in the non-volatile storage variable associated with the target data identifier is read through a preset target data identifier reading function, and data of the 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, when 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, when 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 of some examples, all fault assessment variables related to the second fault may be identified by a preset logic analysis technique 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 the vehicle speed and a variable pointer for the time. There are already a variable pointer for the vehicle speed and a variable pointer for the time in the non-volatile storage variable. When the second fault occurs, the vehicle speed is 15 m / s and the time is 12:00. Then, the data located by the variable pointer for the vehicle speed is updated to 15 m / s, and the data located by the variable pointer for the time is updated to 12:00.

[0086] When the first variable pointer does not exist in the non-volatile storage variable, a first variable pointer is added to the non-volatile storage variable. For example, the first variable pointer includes a variable pointer for the vehicle speed and a variable pointer for the time, and the non-volatile storage variable does not include the variable pointer for the vehicle speed and the variable pointer for the time, then the obtained variable pointer for the vehicle speed and the variable pointer for 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 historical fault includes the second fault.

[0089] In step S201-step S202 of the embodiment of the present invention, by writing the variable pointer corresponding to the fault assessment variable of the historical fault into the non-volatile storage variable, it is possible to obtain more variable pointers corresponding to the fault assessment variables 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 the freeze frame and improve the accuracy of the 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, obtaining 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, obtaining the target data located by the second variable pointer.

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

[0094] In step S301 of some examples, all variable pointers in the nonvolatile 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 also be selected from the nonvolatile storage variable to obtain the second variable pointer.

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

[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, and the freeze frame of the final first fault is generated.

[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, before step S301, it 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, a 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 through a preset target data identifier reading function.

[0103] In step S401-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 the data verification.

[0106] Step S502, performing validity identification on each of the variable pointers in the non-volatile storage variables to obtain a verification result.

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

[0108] The variable pointer may include a variable length and a variable address. Each variable length is fixed, and the total length of data in the NVM variable is also fixed. The maximum number of variables can be obtained by dividing the total length of data in the NVM variable by the variable length. 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 is identified 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 there is a variable address that is 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 of steps S501 to S503, at least two of steps S501 to S503 may be executed sequentially in any order, or at least two 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 of 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 and 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 variable lengths of the variable pointers are not all less than the preset length, or the variable addresses 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 uses the above-mentioned freeze frame generation method to associate the target data identifier with the non-volatile storage variable, put the target data identifier into the data identifier list, and when the first fault of the electronic device is detected, obtain the data identifier list, traverse the data identifier list, and when the target data identifier is traversed, generate a freeze frame of 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, 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, so that the data identifier does not need to be defined separately for each fault assessment variable, so as to reduce space occupation.

[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 acquire a data identifier list when a first fault is detected in the electronic device, wherein 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.

[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 there is a target data identifier 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.

[0123] The freeze frame generation module 703 is used to 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 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 execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated 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. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, 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 a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) 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 the 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 parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial 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 may include one or more buses. Although the present application embodiment describes and shows a 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 combination with the freeze frame generation method in the above embodiment, the present application embodiment 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 clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between 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, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, 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 capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), 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, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0141] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment 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 can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0142] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity 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 protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this 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, a data identifier list is obtained, wherein 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 a cause of the fault of the electronic device; Traversing the data identifier list to obtain a traversal result, wherein the traversal result is used to indicate whether a target data identifier exists in the data identifier list, wherein the target data identifier is used to be associated with a non-volatile storage variable, wherein 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 data corresponding to the fault assessment variable, wherein the variable pointer in the non-volatile storage variable may be increased or the data located by the variable pointer may be updated; In a case where 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 In the case where the first fault of the electronic device is detected, before acquiring the data identifier list, the method further includes: In the case where a second fault of the electronic device is detected, identifying at least one first fault assessment variable associated with 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 the case where the first variable pointer exists 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; 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 step of 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 comprises: 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 the freeze frame under 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, comprises: Performing data verification on the non-volatile storage variable to obtain a verification result, wherein 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 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 the 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 of the variables is less than the preset length, and the address of each of the variables is within a 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 comprises: 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 executes the method for generating a freeze frame as described in 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

  • Method for processing memory apparatus snapshot with bit map table algorithm

    CN101063951A

  • New energy vehicle electric driving system fault freeze frame storing method

    CN109901560A

  • Generating snapshots of a key-value index

    CN113868244A

  • Fault data recording system and method

    CN115454347A

  • Data acquisition method and device, equipment and storage medium

    CN115469810A