Fault information reading method, device and equipment, medium and vehicle

By setting the target pointer and cursor pointer in the AUTOSAR Dem solution, quickly locate and read the latest fault information, the problem of low error information reading efficiency in the existing technology is solved, and efficient fault information reading is achieved.

CN119847409AActive Publication Date: 2025-04-18BEIJING CO WHEELS TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311338918.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-18
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

When reading fault information, the existing AUTOSAR Dem scheme needs to traverse the entire cache space, resulting in low reading efficiency.

Method used

By setting the target pointer in the cache space, quickly locate the cache block where the latest failure information is located, and start from the block, read the fault information in accordance with the direction indicated by the cursor pointer, so as to realize the order of reading from new to old.

Benefits of technology

It improves the efficiency of reading fault information, avoids traversing the cache space multiple times, and achieves the purpose of obtaining full amount of fault information by one read.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847409A_ABST
    Figure CN119847409A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a fault information reading method and device, equipment, a medium and a vehicle. The method comprises the steps that a fault information reading instruction is received; in response to the fault information reading instruction, a target cache block pointed by a target pointer in a cache space is determined, the target pointer is used for pointing to a cache block storing target fault information in the cache space, and the target fault information is fault information corresponding to a latest fault in the cache space; the fault information stored in at least one cache block is read from the target cache block according to the indication direction of a vernier pointer in the at least one cache block in the cache space, and the indication direction of the vernier pointer is opposite to the fault occurrence sequence corresponding to the fault information stored in the at least one cache block. According to the embodiment of the invention, the reading efficiency of the fault information can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of operation and maintenance technology, and in particular, relates to a method, device, equipment, medium and vehicle for reading fault information. Background Art

[0002] In the existing diagnostic event manager (Dem) solution of the AUTomotive Open System Architecture (AUTOSAR), DEM supports converting fault information into cache (Primary Memory or User Defined Memory), and solidifying fault information into non-volatile memory through the correspondence between cache block (Memory Entry) and non-volatile memory block (NvM Block).

[0003] At present, in the existing operation logic of Dem, when the Data Communication Module (Dcm) requests to read the full amount of fault information stored in Dem from the cache space, it is necessary to read from the newest to the oldest in the order of the fault occurrence time. Based on the fact that Dem uses an array as a data cache structure, Dem needs to traverse the entire cache space multiple times to correctly output the fault information requested by Dcm in the order from the newest to the oldest. This is because the cache blocks used to store fault information of different degrees of newness in the cache space are fused together in disorder, so the device does not know which cache block stores the latest fault information. Therefore, whenever the latest fault information needs to be read, the device must traverse the entire cache space once, and if the fault information needs to be read in the order from the newest to the oldest, the entire cache space needs to be traversed multiple times, resulting in low efficiency in reading fault information. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a fault information reading method, device, equipment, medium and vehicle, which can improve the efficiency of fault information reading.

[0005] In a first aspect, an embodiment of the present application provides a method for reading fault information, the method comprising:

[0006] Receive fault information reading instructions;

[0007] In response to the fault information read instruction, determine a target cache block pointed to by a target pointer in the cache space, wherein the target pointer is used to point to a cache block in the cache space storing target fault information, and the target fault information is fault information corresponding to the latest fault occurring in the cache space;

[0008] Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read in the direction indicated by the cursor pointer, wherein the direction indicated by the cursor pointer is opposite to the order of fault occurrence corresponding to the fault information stored in the at least one cache block.

[0009] In some of the embodiments, the target pointer includes a preset cache block in the cache space that is set as an information reading head node;

[0010] Determining the target cache block pointed to by the target pointer in the cache space includes:

[0011] The cache block pointed to by the cursor pointer of the preset cache block is determined as the target cache block.

[0012] In some implementation modes, determining the cache block pointed to by the cursor pointer of the preset cache block as the target cache block includes:

[0013] Determine the cache block pointed to by the backward cursor of the preset cache block as the target cache block;

[0014] The step of starting from the target cache block and reading the fault information stored in the at least one cache block in the cache space according to the direction indicated by the cursor pointer in the at least one cache block includes:

[0015] Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read according to the indication direction of the backward cursor in the at least one cache block.

[0016] In some embodiments, after reading the fault information stored in at least one cache block in the cache space starting from the target cache block in the direction indicated by the backward cursor in the at least one cache block, the method further includes:

[0017] When the fault information stored in the first cache block in the cache space is updated, the forward cursor of the first cache block is updated to point to the preset cache block, and the backward cursor of the first cache block is updated to point to the target cache block, the first cache block being other cache blocks in the cache space except the target cache block;

[0018] The backward cursor of the preset cache block is updated to point to the first cache block, and the forward cursor of the target cache block is updated to point to the first cache block.

[0019] In some embodiments, before updating the forward cursor of the first cache block to point to the preset cache block and updating the backward cursor of the first cache block to point to the target cache block, the method further includes:

[0020] Determine a second cache block pointed to by a forward cursor of the first cache block and a third cache block pointed to by a backward cursor;

[0021] The backward cursor of the second cache block is updated to point to the third cache block, and the forward cursor of the third cache block is updated to point to the second cache block.

[0022] In some embodiments, after reading the fault information stored in at least one cache block in the cache space starting from the target cache block in the direction indicated by the backward cursor in the at least one cache block, the method further includes:

[0023] In the case of storing the fault information in a fourth cache block that is free in the cache space, pointing a forward cursor of the fourth cache block to the preset cache block, and pointing a backward cursor of the fourth cache block to the target cache block;

[0024] The backward cursor of the preset cache block is updated to point to the fourth cache block, and the forward cursor of the target cache block is updated to point to the fourth cache block.

[0025] In some implementation modes, determining the cache block pointed to by the cursor pointer of the preset cache block as the target cache block includes:

[0026] Determine the cache block pointed to by the forward cursor of the preset cache block as the target cache block;

[0027] The step of starting from the target cache block and reading the fault information stored in the at least one cache block in the cache space according to the direction indicated by the cursor pointer in the at least one cache block includes:

[0028] Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read according to the indication direction of the forward cursor in the at least one cache block.

[0029] In a second aspect, an embodiment of the present application provides a fault information reading device, the device comprising:

[0030] An instruction receiving module, used for receiving a fault information reading instruction;

[0031] a target determination module, configured to determine, in response to the fault information reading instruction, a target cache block pointed to by a target pointer in a cache space, wherein the target pointer is used to point to a cache block in the cache space storing target fault information, and the target fault information is fault information corresponding to the latest fault occurring in the cache space;

[0032] An information reading module is used to read the fault information stored in at least one cache block in the cache space starting from the target cache block according to the indication direction of the cursor pointer in at least one cache block, wherein the indication direction of the cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in the at least one cache block.

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

[0034] When the processor executes the computer program instructions, the steps of the fault information reading method in any one of the embodiments of the first aspect are implemented.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the fault information reading method provided by any one of the implementations in the first aspect is implemented.

[0036] In a fifth aspect, an embodiment of the present application provides a vehicle, the vehicle at least comprising:

[0037] The fault information reading device of the second aspect;

[0038] Such as the electronic device of the third aspect;

[0039] A computer-readable storage medium as in the fourth aspect.

[0040] In the fault information reading method, device, equipment, medium and vehicle in the embodiment of the present application, since a target pointer is set in the cache space, and the target pointer is used to point to the cache block in the cache space where the fault information corresponding to the latest fault is stored, that is, the target cache block, when receiving the fault information reading instruction, it is not necessary to traverse all the cache blocks in the cache space, and the target cache block where the fault information corresponding to the latest fault is located can be quickly found by using the target pointer, thereby improving the search efficiency of the cache block, and thus improving the reading efficiency of the fault information. In addition, starting from the target cache block, according to the indication direction of the cursor pointer in at least one cache block in the cache space, the fault information stored in at least one cache block is read, because the indication direction of the cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in the at least one cache block, therefore, the purpose of obtaining the full amount of fault information from the newest to the oldest can be achieved by reading once, without traversing the entire cache space multiple times, thereby improving the reading efficiency of the fault information. In summary, through the embodiment of the present application, the reading efficiency of the fault information can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] 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.

[0042] Figure 1 It is a flowchart of a method for reading fault information provided in an embodiment of the present application;

[0043] Figure 2 It is a structural schematic diagram of a fault information reading device provided in an embodiment of the present application;

[0044] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0047] It should be noted that, in this article, relational terms such as "first" and "second" 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 term "comprising" or any other variant thereof is 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 sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0048] In addition, in the embodiments of the present application, the abbreviations and key terms are defined as follows:

[0049] AUTOSAR: AUTomotive Open System Architecture;

[0050] Dem: AUTOSAR module responsible for centralized management of reporting, caching, solidification and export of diagnostic faults;

[0051] Dcm: Data communication module, which refers to the network communication function module installed in the vehicle, which is used to collect vehicle operation data and communicate with service centers and other platforms;

[0052] Primary Memory: Dem's priority cache area, which is the default supported cache area;

[0053] User Defined Memory: Dem's user-defined buffer area;

[0054] NvM: AUTOSAR module responsible for managing and abstracting non-volatile memories.

[0055] Based on this, in order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment, medium and vehicle for reading fault information. The method for reading fault information can be applied to the scenario of reading fault information in the Dem cache in the vehicle.

[0056] The fault information reading method provided in the embodiment of the present application is described in detail below through specific embodiments and drawings in combination with the drawings.

[0057] Figure 1 1 is a flow chart of a method for reading fault information provided by an embodiment of the present application. The method for reading fault information can be executed by Dem.

[0058] like Figure 1 As shown, the fault information reading method may specifically include the following steps:

[0059] S110, receiving a fault information reading instruction;

[0060] S120, in response to the fault information reading instruction, determining a target cache block pointed to by a target pointer in the cache space, wherein the target pointer is used to point to a cache block in the cache space storing target fault information, and the target fault information is fault information corresponding to the latest fault occurring in the cache space;

[0061] S130. Starting from the target cache block, read the fault information stored in at least one cache block according to the indication direction of the cursor pointer in at least one cache block in the cache space, wherein the indication direction of the cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in at least one cache block.

[0062] Therefore, since a target pointer is set in the cache space, and the target pointer is used to point to the cache block in the cache space that stores the fault information corresponding to the latest fault, that is, the target cache block, when receiving the fault information reading instruction, it is not necessary to traverse all the cache blocks in the cache space, and the target cache block where the fault information corresponding to the latest fault is located can be quickly found by using the target pointer, thereby improving the search efficiency of the cache block, and further improving the reading efficiency of the fault information. In addition, starting from the target cache block, according to the indication direction of the cursor pointer in at least one cache block in the cache space, the fault information stored in at least one cache block is read. Since the indication direction of the cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in the at least one cache block, the purpose of obtaining the full amount of fault information from the newest to the oldest can be achieved by reading once, without traversing the entire cache space multiple times, thereby improving the reading efficiency of the fault information. In summary, through the embodiments of the present application, the reading efficiency of the fault information can be improved.

[0063] The specific implementation methods of the above steps are introduced below.

[0064] In some implementations, in S110, the fault information reading instruction may be an instruction for reading the fault information stored in the cache space. The fault information reading instruction may be sent by the Dcm to the Dem to instruct the Dem to read the full amount of fault information requested by the Dcm from the cache space.

[0065] In some implementations, in S120, the fault information stored in the cache space may be managed in a static linked list. The static linked list may be a linear storage structure. The implementation basis of the static linked list may be a static array, and the static linked list may take into account the advantages of both the sequential list and the linked list by adding a cursor pointer. The static linked list corresponding to the cursor pointer in this embodiment may be called a read management linked list.

[0066] In this embodiment, the cache space may include multiple cache blocks storing fault information of different degrees of newness, that is, the fault information stored in different cache blocks in the cache space may correspond to different fault occurrence times.

[0067] Based on this, in some examples, after a certain fault occurs, Dem will store the fault information corresponding to the fault in the pre-allocated cache space. After writing the fault information to the cache block in the cache space, Dem will set the cursor pointer of the cache block according to the fault occurrence order from the latest to the oldest fault information, so that the cursor pointer indicates the opposite direction of the fault occurrence order, thereby updating the read management linked list.

[0068] In addition, a target pointer is also provided in the cache space. The target pointer can be used to point to a cache block in the cache space that stores fault information corresponding to the latest fault. When no fault information is stored in the cache space, the values ​​of all cursor pointers and target pointers in the read management linked list can be null values.

[0069] In some implementations, the target pointer may include a preset cache block in the cache space that is set as an information reading head node.

[0070] Based on this, the above S120 may specifically include:

[0071] The cache block pointed to by the cursor pointer of the preset cache block is determined as the target cache block.

[0072] Here, the target pointer is set in the cache space by setting a cache block in the cache space as the information reading head node in the read management linked list in advance, and then when reading the fault information, the fault information is read from the cache block pointed to by the cursor pointer in the preset cache block. The cursor pointer can be a forward cursor or a backward cursor.

[0073] For example, the buffer block pointed by the backward cursor of the preset buffer block can be used as the starting buffer block for information reading, i.e. the target buffer block. In addition, the buffer block pointed by the forward cursor of the preset buffer block can also be used as the starting buffer block for information reading.

[0074] In this way, by setting an information reading head node in the cache space, it is possible to set a target pointer in the cache space to point to the cache block where the fault information corresponding to the latest fault is located, thereby quickly finding the target cache block where the latest fault information is located without traversing all the cache blocks, thereby improving the cache block search efficiency.

[0075] In some embodiments, in S130, after determining the target cache block, the target cache block can be used as the starting cache block, the fault information stored in the target cache block can be read, and according to the cache block pointed to by the cursor pointer in the target cache block, the fault information in the next cache block can be read, and so on, until all the fault information stored in the cache space is read.

[0076] In addition, the cursor pointer type may include a forward cursor or a backward cursor.

[0077] Exemplarily, when the cursor pointer is a backward cursor, the fault information stored in each cache block can be read backward from the target cache block in the direction indicated by the backward cursor in the cache block; when the cursor pointer is a forward cursor, the fault information stored in each cache block can be read forward from the target cache block in the direction indicated by the forward cursor in the cache block.

[0078] In this way, since the indication direction of the cursor pointer in each cache block that has stored fault information in the cache space is opposite to the order in which the faults occurred, the fault information corresponding to the later faults, that is, the newer fault information, is read first, and the fault information corresponding to the earlier faults, that is, the older fault information, is read first. It can be seen that the fault information read according to the indication direction of the cursor pointer in each cache block is fault information arranged in order from new to old, so that Dem does not need to traverse the entire cache space multiple times, and only reading it once can meet the demand for outputting the fault information requested by Dcm in order from new to old.

[0079] Based on this, in the case where the cursor pointer is a backward cursor, in some embodiments, the above-mentioned determination of the cache block pointed to by the cursor pointer of the preset cache block as the target cache block may specifically include:

[0080] The cache block pointed to by the backward cursor of the preset cache block is determined as the target cache block.

[0081] The above S130 may specifically include:

[0082] Starting from the target cache block, the fault information stored in at least one cache block is read according to the indication direction of the backward cursor in at least one cache block in the cache space, wherein the indication direction of the backward cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in at least one cache block.

[0083] Exemplarily, it is assumed that the cache blocks storing fault information in the cache space include: cache block 1, cache block 2, cache block 3, cache block 4, and cache block 5. If the order of occurrence of the fault corresponding to the fault information is: cache block 2 → cache block 1 → cache block 4 → cache block 5 → cache block 3, then the indication direction of the backward cursor of each cache block is: cache block 3 → cache block 5 → cache block 4 → cache block 1 → cache block 2. Based on this, cache block 3 can be determined as the target cache block through the target pointer, and then the fault information is first read from cache block 3, and then the fault information is read from cache block 5 pointed to by the backward cursor in cache block 3, and then the information is read from cache block 4 pointed to by the backward cursor in cache block 5, and then the information is read from cache block 1 pointed to by the backward cursor in cache block 4, and finally the information is read from cache block 2 pointed to by the backward cursor in cache block 1.

[0084] In this way, there is no need to traverse the entire cache space multiple times, and only one traversal and reading is required to obtain the full amount of fault information in the order from the newest to the oldest.

[0085] In addition, in order to ensure that when a fault corresponding to the fault information already existing in the cache space occurs again, the indication direction of the cursor pointer can still be kept opposite to the fault occurrence order corresponding to the fault information stored in each cache block, in some embodiments, after the above step of starting from the target cache block and reading the fault information stored in at least one cache block according to the indication direction of the backward cursor in at least one cache block in the cache space, the fault information reading method provided in the embodiment of the present application may further include:

[0086] In the case where the fault information stored in the first cache block in the cache space is updated, the forward cursor of the first cache block is updated to point to the preset cache block, and the backward cursor of the first cache block is updated to point to the target cache block, the first cache block being the other cache blocks in the cache space except the target cache block;

[0087] The backward cursor of the preset cache block is updated to point to the first cache block, and the forward cursor of the target cache block is updated to point to the first cache block.

[0088] Here, when the fault corresponding to the fault information already existing in the cache space occurs again, Dem will update the cache block where the old fault information corresponding to the same fault is located according to the latest fault information. At this time, the fault information stored in the cache block will be updated.

[0089] Exemplarily, if the fault information stored in the first cache block in the cache space is updated, it means that the fault corresponding to the fault information stored in the first cache block is the latest fault currently occurring in the cache space. Therefore, it is necessary to update the node position of the first cache block in the read management linked list. The updating method may include: inserting the node corresponding to the first cache block in the read management linked list between the information reading head node and the secondary node. That is, updating the forward cursor of the first cache block to point to the preset cache block, and updating the backward cursor of the first cache block to point to the target cache block. Accordingly, it is also necessary to update the backward cursor of the preset cache block to point to the first cache block, and update the forward cursor of the target cache block to point to the first cache block.

[0090] In this way, by updating the value of the cursor pointer of the first cache block, the cache block where the latest updated fault information is located can always be kept in the position second only to the head node in the read management linked list, thereby ensuring that each read always starts from the cache block where the latest fault information is located.

[0091] In addition, in order to maintain the order and integrity of the read management linked list, in some embodiments, before the forward cursor of the first cache block is updated to point to the preset cache block and the backward cursor of the first cache block is updated to point to the target cache block, the fault information reading method provided in the embodiment of the present application may further include:

[0092] Determine a second cache block pointed to by a forward cursor of the first cache block and a third cache block pointed to by a backward cursor;

[0093] The backward cursor of the second cache block is updated to point to the third cache block, and the forward cursor of the third cache block is updated to point to the second cache block.

[0094] Exemplarily, the node corresponding to the first cache block in the read management linked list can be extracted from the original position, and the two nodes before and after it can be connected together. That is, when the cache block pointed to by the forward cursor in the first cache block is the second cache block, and the cache block pointed to by the backward cursor in the first cache block is the third cache block, the backward cursor of the second cache block is updated from pointing to the first cache block to pointing to the third cache block, and the forward cursor of the third cache block is updated from pointing to the first cache block to pointing to the second cache block.

[0095] In this way, by performing node splicing on the two cache blocks before and after the first cache block in the read management linked list, the sequentiality and integrity of the read management linked list can be maintained after the node position of the first cache block in the read management linked list is subsequently moved.

[0096] In addition, in order to ensure that the indication direction of the cursor pointer is still opposite to the fault occurrence order corresponding to the fault information stored in each cache block when storing the fault information corresponding to the new fault in the cache space, in some embodiments, after the above step of starting from the target cache block and reading the fault information stored in at least one cache block according to the indication direction of the backward cursor in at least one cache block in the cache space, the fault information reading method provided in the embodiment of the present application may further include:

[0097] In the case of storing the fault information in the free fourth cache block in the cache space, pointing the forward cursor of the fourth cache block to the preset cache block, and pointing the backward cursor of the fourth cache block to the target cache block;

[0098] The backward cursor of the preset cache block is updated to point to the fourth cache block, and the forward cursor of the target cache block is updated to point to the fourth cache block.

[0099] Here, when a fault that does not exist in the cache space occurs, Dem will determine that the fault is a new fault. At this time, Dem will try to find a free cache block in the cache space to store the fault information corresponding to the new fault.

[0100] Exemplarily, if Dem successfully finds a suitable cache block in the cache space, such as the fourth cache block, Dem can store the fault information corresponding to the latest fault in the fourth cache block. At this time, the fault corresponding to the fault information stored in the fourth cache block is the latest fault currently occurring in the cache space. Therefore, it is necessary to insert the fourth cache block into the position next to the information read head node in the read management linked list. The insertion method may include: inserting the node corresponding to the fourth cache block in the read management linked list between the information read head node and the secondary node. That is, the forward cursor of the fourth cache block is updated to point to the preset cache block, and the backward cursor of the fourth cache block is updated to point to the target cache block. Accordingly, it is also necessary to update the backward cursor of the preset cache block to point to the fourth cache block, and update the forward cursor of the target cache block to point to the fourth cache block.

[0101] In this way, by setting the cursor pointer of the fourth cache block, the cache block where the latest fault information is stored can always be kept in the position next to the head node in the read management linked list, thereby ensuring that each read always starts from the cache block where the latest fault information is located.

[0102] In addition, with respect to the case where the cursor pointer of at least one cache block in the above S130 is a forward cursor, and the cursor pointer of the preset cache block is also a forward cursor, in some embodiments, the above determination of the cache block pointed to by the cursor pointer of the preset cache block as the target cache block may specifically include:

[0103] The cache block pointed to by the forward cursor of the preset cache block is determined as the target cache block.

[0104] The above S130 may specifically include:

[0105] Starting from the target cache block, the fault information stored in at least one cache block is read according to the indication direction of the forward cursor in at least one cache block in the cache space, wherein the indication direction of the forward cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in at least one cache block.

[0106] Exemplarily, it is assumed that the cache blocks storing fault information in the cache space include: cache block 1, cache block 2, cache block 3, cache block 4, and cache block 5. If the fault occurrence order corresponding to the stored fault information is: cache block 2 → cache block 1 → cache block 4 → cache block 5 → cache block 3, then the indication direction of the forward cursor of each cache block may be: cache block 2 ← cache block 1 ← cache block 4 ← cache block 5 ← cache block 3. Based on this, cache block 3 can be determined as the target cache block through the target pointer or the forward cursor pointer of the preset cache block, and then the fault information is first read from cache block 3, and then the fault information is read from cache block 5 pointed to by the forward cursor in cache block 3, and then the information is read from cache block 4 pointed to by the forward cursor in cache block 5, and then the information is read from cache block 1 pointed to by the forward cursor in cache block 4, and finally the information is read from cache block 2 pointed to by the forward cursor in cache block 1.

[0107] In this way, there is no need to traverse the entire cache space multiple times, and only one traversal and reading is required to obtain the full amount of fault information in the order from the newest to the oldest.

[0108] In addition, in response to the above situation, technical means similar to the aforementioned embodiments or implementation methods can also be used to update fault information and store fault information. Therefore, on the basis of the aforementioned embodiments or implementation methods, when there is fault information updating or fault information storage, the cache block pointed to by the bidirectional cursor of the corresponding cache block can be adjusted to update the node position of the corresponding cache block in the read management linked list, so that the cache block where the fault information corresponding to the latest fault is located is always kept at the starting read node position in the read management linked list, thereby ensuring that each reading is always started from the cache block where the latest fault information is located.

[0109] It should be noted that the application scenarios described in the above-mentioned embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0110] Based on the same inventive concept, the present application also provides a fault information reading device. Figure 2 Provide detailed explanation.

[0111] Figure 2 It is a structural schematic diagram of a fault information reading device provided by an embodiment of the present application.

[0112] like Figure 2 As shown, the fault information reading device 200 may include:

[0113] The instruction receiving module 201 is used to receive the fault information reading instruction;

[0114] A target determination module 202 is used to determine, in response to the fault information reading instruction, a target cache block pointed to by a target pointer in the cache space, wherein the target pointer is used to point to a cache block in the cache space storing target fault information, and the target fault information is fault information corresponding to the latest fault occurring in the cache space;

[0115] The information reading module 203 is used to read the fault information stored in the at least one cache block starting from the target cache block according to the indication direction of the cursor pointer in at least one cache block in the cache space, wherein the indication direction of the cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in the at least one cache block.

[0116] The above-mentioned fault information reading device 300 is described in detail below, as shown below:

[0117] In some of these embodiments, the target pointer includes a preset cache block in the cache space that is set as an information reading head node;

[0118] The target determination module 202 may be specifically used for:

[0119] The cache block pointed to by the cursor pointer of the preset cache block is determined as the target cache block.

[0120] In some embodiments, the target determination module 202 may also be used to:

[0121] Determine the cache block pointed to by the backward cursor of the preset cache block as the target cache block;

[0122] The information reading module 203 can be specifically used for:

[0123] Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read according to the indication direction of the backward cursor in the at least one cache block.

[0124] In some embodiments, the fault information reading device 300 may further include:

[0125] a first updating module, configured to, starting from the target cache block and following the indication direction of the backward pointer in at least one cache block in the cache space, read the fault information stored in the at least one cache block, and in the case where the fault information stored in the first cache block in the cache space is updated, update the forward cursor of the first cache block to point to the preset cache block, and update the backward cursor of the first cache block to point to the target cache block, wherein the first cache block is a cache block other than the target cache block in the cache space;

[0126] The second updating module is used to update the backward cursor of the preset cache block to point to the first cache block, and update the forward cursor of the target cache block to point to the first cache block.

[0127] In some embodiments, the fault information reading device 300 may further include:

[0128] A first determination module, used for determining a second cache block pointed to by the forward cursor of the first cache block and a third cache block pointed to by the backward cursor before updating the forward cursor of the first cache block to point to the preset cache block and updating the backward cursor of the first cache block to point to the target cache block;

[0129] The third updating module is used to update the backward cursor of the second cache block to point to the third cache block, and update the forward cursor of the third cache block to point to the second cache block.

[0130] In some embodiments, the fault information reading device 300 may further include:

[0131] a cursor setting module, configured to, starting from the target cache block, read the fault information stored in the at least one cache block in the cache space in accordance with the indication direction of the backward cursor in the at least one cache block in the cache space, and, in the case of storing the fault information in an idle fourth cache block in the cache space, point the forward cursor of the fourth cache block to the preset cache block, and point the backward cursor of the fourth cache block to the target cache block;

[0132] The fourth updating module is used to update the backward cursor of the preset cache block to point to the fourth cache block, and update the forward cursor of the target cache block to point to the fourth cache block.

[0133] In some embodiments, the target determination module 202 may also be used to:

[0134] Determine the cache block pointed to by the forward cursor of the preset cache block as the target cache block;

[0135] The information reading module 203 can be specifically used for:

[0136] Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read according to the indication direction of the forward cursor in the at least one cache block.

[0137] Therefore, since a target pointer is set in the cache space, and the target pointer is used to point to the cache block in the cache space that stores the fault information corresponding to the latest fault, that is, the target cache block, when receiving the fault information reading instruction, it is not necessary to traverse all the cache blocks in the cache space, and the target cache block where the fault information corresponding to the latest fault is located can be quickly found by using the target pointer, thereby improving the search efficiency of the cache block, and further improving the reading efficiency of the fault information. In addition, starting from the target cache block, according to the indication direction of the cursor pointer in at least one cache block in the cache space, the fault information stored in at least one cache block is read. Since the indication direction of the cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in the at least one cache block, the purpose of obtaining the full amount of fault information from the newest to the oldest can be achieved by reading once, without traversing the entire cache space multiple times, thereby improving the reading efficiency of the fault information. In summary, through the embodiments of the present application, the reading efficiency of the fault information can be improved.

[0138] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application.

[0139] The electronic device 300 may include a processor 301 and a memory 302 storing computer program instructions.

[0140] Specifically, the processor 301 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.

[0141] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 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 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.

[0142] In certain embodiments, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, 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 one aspect of the present application.

[0143] The processor 301 implements any one of the fault information reading methods in the above embodiments by reading and executing the computer program instructions stored in the memory 302 .

[0144] In some examples, the electronic device 300 may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.

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

[0146] Bus 310 includes hardware, software or both, and the components of online data flow billing equipment are coupled to each other. For example, but not limitation, bus 310 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 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0147] Exemplarily, the electronic device 300 may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).

[0148] The electronic device 300 can execute the fault information reading method in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 2 Described is a method and device for reading fault information.

[0149] In addition, in combination with the fault information reading method in the above embodiment, the embodiment of the present application may provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the fault information reading methods in the above embodiment is implemented. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, etc.

[0150] The embodiment of the present application also provides a computer program product. When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device executes the fault information reading method provided in the embodiment of the present application.

[0151] A vehicle is also provided in an embodiment of the present application, which may include at least one of a power battery charging device, an electronic device, and a computer storage medium. The specific fault information reading device, electronic device, and computer storage medium involved are consistent with the above description and will not be repeated here.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the 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 realization of the function / action specified in one or more square boxes of the flow chart and / or the 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 square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0156] 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 reading fault information, characterized in that: include: Receive fault information reading instructions; In response to the fault information read instruction, determine a target cache block pointed to by a target pointer in the cache space, wherein the target pointer is used to point to a cache block in the cache space storing target fault information, and the target fault information is fault information corresponding to the latest fault occurring in the cache space; Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read in the direction indicated by the cursor pointer, wherein the direction indicated by the cursor pointer is opposite to the order of fault occurrence corresponding to the fault information stored in the at least one cache block.

2. The method according to claim 1, characterized in that The target pointer includes a preset cache block in the cache space that is set as an information reading head node; Determining the target cache block pointed to by the target pointer in the cache space includes: The cache block pointed to by the cursor pointer of the preset cache block is determined as the target cache block.

3. The method according to claim 2, characterized in that The step of determining the cache block pointed to by the cursor pointer of the preset cache block as the target cache block includes: Determine the cache block pointed to by the backward cursor of the preset cache block as the target cache block; The step of starting from the target cache block and reading the fault information stored in the at least one cache block in the cache space according to the direction indicated by the cursor pointer in the at least one cache block includes: Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read according to the indication direction of the backward cursor in the at least one cache block.

4. The method according to claim 3, characterized in that After reading the fault information stored in at least one cache block in the cache space starting from the target cache block according to the indication direction of the backward cursor in the at least one cache block in the cache space, the method further includes: When the fault information stored in the first cache block in the cache space is updated, the forward cursor of the first cache block is updated to point to the preset cache block, and the backward cursor of the first cache block is updated to point to the target cache block, the first cache block being other cache blocks in the cache space except the target cache block; The backward cursor of the preset cache block is updated to point to the first cache block, and the forward cursor of the target cache block is updated to point to the first cache block.

5. The method according to claim 4, characterized in that Before updating the forward cursor of the first cache block to point to the preset cache block and updating the backward cursor of the second cache block to point to the target cache block, the method further includes: Determine a second cache block pointed to by a forward cursor of the first cache block and a third cache block pointed to by a backward cursor; The backward cursor of the second cache block is updated to point to the third cache block, and the forward cursor of the third cache block is updated to point to the second cache block.

6. The method according to claim 3, characterized in that After reading the fault information stored in at least one cache block in the cache space starting from the target cache block according to the indication direction of the backward cursor in the at least one cache block in the cache space, the method further includes: In the case of storing the fault information in a fourth cache block that is free in the cache space, pointing a forward cursor of the fourth cache block to the preset cache block, and pointing a backward cursor of the fourth cache block to the target cache block; The backward cursor of the preset cache block is updated to point to the fourth cache block, and the forward cursor of the target cache block is updated to point to the fourth cache block.

7. The method according to claim 2, characterized in that The step of determining the cache block pointed to by the cursor pointer of the preset cache block as the target cache block includes: Determine the cache block pointed to by the forward cursor of the preset cache block as the target cache block; The step of starting from the target cache block and reading the fault information stored in the at least one cache block in the cache space according to the direction indicated by the cursor pointer in the at least one cache block includes: Starting from the target cache block, the fault information stored in the at least one cache block in the cache space is read according to the indication direction of the forward cursor in the at least one cache block.

8. A fault information reading device, characterized in that: include: An instruction receiving module, used for receiving a fault information reading instruction; a target determination module, configured to determine, in response to the fault information reading instruction, a target cache block pointed to by a target pointer in a cache space, wherein the target pointer is used to point to a cache block in the cache space storing target fault information, and the target fault information is fault information corresponding to the latest fault occurring in the cache space; An information reading module is used to read the fault information stored in at least one cache block in the cache space starting from the target cache block according to the indication direction of the cursor pointer in at least one cache block, wherein the indication direction of the cursor pointer is opposite to the fault occurrence order corresponding to the fault information stored in the at least one cache block.

9. 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 steps of the fault information reading method according to any one of claims 1 to 7 are implemented.

10. A vehicle, characterized in that: Include at least one of the following: The fault information reading device according to claim 8; The electronic device as claimed in claim 9.

Citation Information

Patent Citations

  • Oplogging for online recovery in direct connection client server systems

    CN101133397A

  • Information recommendation method, device and apparatus

    CN110647685A

  • Log acquisition method and electronic equipment

    CN116450226A

  • Storage system journal entry redaction

    US10866865B1

  • Buffer managing method and buffer managing apparatus

    US20090043927A1