Information management method and device, electronic equipment and medium
Patent Information
- Application Number
- CN202311630413.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-11-30
AI Technical Summary
[0003]在MCU下电过程中,会将Long-term区的信息存储到NVM中,储存在Long-term区的信息有些已被清故障的指令清除,或者历史故障已不需要保留,若在下电过程中将全部的Long-term区的信息存储到NVM中,会导致NVM存储空间利用率不高
[0056]应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。
Smart Images

Figure CN117632022B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information processing technology, and in particular to an information management method, apparatus, electronic device, and medium. Background Technology
[0002] The fault diagnosis management system under the AOTUSAR architecture (AUTomotive Open System Architecture) includes a Long-term area that stores information (fault ID, event ID, freeze frame data, fault status, timestamp, driving cycle, aging count, etc.). The information is stored in the Long-term area in the order it is reported.
[0003] During the MCU power-down process, the information in the Long-term area is stored in the NVM. Some of the information stored in the Long-term area has been cleared by the fault clearing instruction, or historical faults no longer need to be retained. If all the information in the Long-term area is stored in the NVM during the power-down process, it will result in low utilization of the NVM storage space. Summary of the Invention
[0004] This invention provides an information management method, apparatus, electronic device, and medium that can exchange storage areas for deleted information at the top of the list and non-deletable information at the bottom of the list. This saves NVM storage space and improves storage space utilization during power-off storage.
[0005] In a first aspect, embodiments of the present invention provide an information management method, comprising:
[0006] The system retrieves first information from the information queue that can be deleted, and retrieves second information from the information queue that cannot be deleted; wherein the information queue is the information stored in the first storage area of memory, and the information is determined according to the time of its first generation.
[0007] If the first information is in the order of the information queue before the second information is in the order of the information queue, then the storage locations of the first information and the second information in the first storage area are swapped.
[0008] During the current power-down process, the information in the information queue that is at the head of the queue before the last second information is stored from the first storage area of memory to the second storage area of memory; wherein, the first storage area is the storage area where the internally stored data will be lost after power-down; the second storage area is the storage area where the internally stored data will not be lost after power-down.
[0009] The above method can perform information queries on the information queue under different conditions, and exchange the storage areas of the deleted information at the front of the queue and the non-deletable information at the back of the queue. During the power-down process, the deleted information at the back of the queue does not need to be stored in the NVM, thereby improving the utilization of the NVM storage space.
[0010] In one possible implementation, querying the information queue for the first piece of information that can be deleted includes:
[0011] Set the first pointer to the head of the message queue;
[0012] If the fault state contained in the information at the head position of the information queue is the first state, then the information at the head position of the information queue is the first information, and the position of the first pointer is fixed at the head position of the information queue.
[0013] If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue meets a preset deletion condition, then the information at the head of the information queue is changed to the first information, the position of the first pointer is fixed at the head of the information queue, and the fault state contained in the information at the head of the information queue is modified to the first state; wherein, the preset deletion condition is the condition for modifying the fault state contained in the information at the head of the information queue to the first state.
[0014] If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion condition, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0015] If the fault state recorded in the information at the head of the information queue is the third state, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0016] The above method simplifies the query process by finding the first piece of information by querying the fault status of the information through pointers.
[0017] In one possible implementation, querying the information queue for second, non-deletable information includes:
[0018] Set the second pointer to the tail of the message queue;
[0019] If the fault state contained in the information at the tail position of the information queue is the third state, then the information at the tail position of the information queue is changed to the second information, and the position of the second pointer is fixed at the tail position of the information queue.
[0020] If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue meets the preset deletion conditions, then the fault state contained in the information at the tail position of the information queue is modified to the first state, and the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or all the information in the information queue is detected.
[0021] If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion conditions, then the information at the tail position of the information queue is the second information, and the position of the second pointer is fixed at the tail position of the information queue.
[0022] If the fault state recorded in the information at the tail position of the information queue is the first state, then the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or until all the information in the information queue has been detected.
[0023] The above method simplifies the query process by checking whether the fault status of the information is in the third state through a pointer query.
[0024] In one possible implementation, exchanging the storage locations of the first information and the second information in the first storage area includes:
[0025] Copy the first information to the temporary address;
[0026] Copy the second information to the original storage location of the first information;
[0027] Copy the first information at the temporary address to the original storage location of the second information.
[0028] The above method can move information to a temporary address and exchange information between two storage locations based on the temporary address, thus avoiding information queue disorder during data exchange.
[0029] In one possible implementation, the fault state contained in the information is determined by:
[0030] If a user sends an instruction to clear the fault in the information, then the fault state contained in the information is determined to be a first state; otherwise, the fault state of the information is determined to be a third state; or
[0031] If the fault recorded in the information is automatically detected to have been cured, the fault status contained in the information is determined to be the second status; otherwise, the fault status of the information is determined to be the third status.
[0032] The above method can record fault status information through user-defined or automatic detection, thereby improving operational efficiency.
[0033] In one possible implementation, all the information in the information queue is stored in a first storage area of memory in the form of the same structure type.
[0034] The above method can store all the information in the information queue in the first storage area in the same structure type. This avoids the situation where the storage space required by the information before the move does not match the storage space required by the information after the move when exchanging information.
[0035] In a second aspect, embodiments of the present invention provide an information management device, comprising:
[0036] The query module is used to query first information that can be deleted from the information queue, and to query second information that cannot be deleted from the information queue; wherein, the information queue is the information stored in the first storage area of memory, which is determined according to the time of its first generation;
[0037] An interaction module is used to exchange the storage locations of the first information and the second information in the first storage area if the first information is in the order of the information queue before the second information is in the order of the information queue.
[0038] During the current power-down process, the information in the information queue that is at the head of the queue before the last second information is stored from the first storage area of memory to the second storage area of memory; wherein, the first storage area is the storage area where the internally stored data will be lost after power-down; the second storage area is the storage area where the internally stored data will not be lost after power-down.
[0039] In one possible implementation, the query module is specifically used for:
[0040] Set the first pointer to the head of the message queue;
[0041] If the fault state contained in the information at the head position of the information queue is the first state, then the information at the head position of the information queue is the first information, and the position of the first pointer is fixed at the head position of the information queue.
[0042] If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue meets a preset deletion condition, then the information at the head of the information queue is changed to the first information, the position of the first pointer is fixed at the head of the information queue, and the fault state contained in the information at the head of the information queue is modified to the first state; wherein, the preset deletion condition is the condition for modifying the fault state contained in the information at the head of the information queue to the first state.
[0043] If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion condition, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0044] If the fault state recorded in the information at the head of the information queue is the third state, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0045] Set the second pointer to the tail of the message queue;
[0046] If the fault state contained in the information at the tail position of the information queue is the third state, then the information at the tail position of the information queue is changed to the second information, and the position of the second pointer is fixed at the tail position of the information queue.
[0047] If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue meets the preset deletion condition, then the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or all the information in the information queue has been detected.
[0048] If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion conditions, then the information at the tail position of the information queue is the second information, and the position of the second pointer is fixed at the tail position of the information queue.
[0049] If the fault state recorded in the information at the tail position of the information queue is the first state, then the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or until all the information in the information queue has been detected.
[0050] Thirdly, embodiments of the present invention provide an electronic device, comprising:
[0051] processor;
[0052] A processor for executing computer programs or instructions in the memory, such that the information management method as described in any of the first aspects is performed.
[0053] Fourthly, embodiments of the present invention provide a computer-readable storage medium that, when instructions in the storage medium are executed by a processor, enables the processor to perform the information management method as described in any of the first aspects.
[0054] Fifthly, embodiments of the present invention provide a computer program product, the computer program product comprising: computer program code, which, when executed on a computer, causes the computer to perform the information management method described in any of the first aspects.
[0055] Furthermore, the technical effects of any of the implementation methods in the second to fifth aspects can be found in the technical effects of different implementation methods in the first aspect, and will not be repeated here.
[0056] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0057] Figure 1 A flowchart of an information management method provided in an embodiment of the present invention;
[0058] Figure 2 This is a schematic diagram illustrating the changes in storage area during information management, provided as an embodiment of the present invention.
[0059] Figure 3 This is a schematic diagram illustrating the changes in storage area during information exchange, provided by an embodiment of the present invention.
[0060] Figure 4 A flowchart of another information management method provided in an embodiment of the present invention;
[0061] Figure 5 This is a schematic diagram of the structure of an information management device provided in an embodiment of the present invention;
[0062] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0064] Combination Figure 1 As shown, an embodiment of the present invention provides an information management method, including:
[0065] S100: Query the first piece of information that can be deleted from the information queue, and query the second piece of information that cannot be deleted from the information queue; wherein, the information queue is the information stored in the first storage area of memory, which is determined according to the time of its first generation;
[0066] For example, the first storage area of memory is the Long-term area, which is also called the Entry (EventMemory).
[0067] In this context, all the information in the information queue is stored in the first storage area of memory in the same structure type.
[0068] S101: If the first information is in the order of the second information in the information queue, then the storage locations of the first information and the second information in the first storage area are swapped.
[0069] S102: In the current running state of power-down, the information that is at the head of the queue before the last second information in the information queue is stored from the first storage area of memory to the second storage area of memory.
[0070] The first storage area is the storage area where the internally stored data will be lost after power-off; the second storage area is the storage area where the internally stored data will not be lost after power-off.
[0071] The second storage area is NVM (Non-Volatile Memory).
[0072] For example, taking a car as an example, when a car malfunctions, information is generated. This generated information is the time of its initial generation and is stored in the Long-term area. As the car continues to operate, the malfunction may self-recover, automatically clearing the information. Alternatively, if the malfunction is manually repaired, a manual command to clear the information will immediately erase it. Figure 2As shown, the information stored in the Long-term area includes: Information A to Information I. These information items are queued in chronological order of their initial generation time, forming an information queue. Information A was first generated on October 5th at 10:00 AM; Information B was first generated on October 1st at 12:00 PM; Information C was first generated on October 2nd at 1:00 PM; Information D was first generated on October 4th at 11:00 PM; Information E was first generated on October 1st at 2:00 PM; Information F was first generated on October 3rd at 8:00 AM; Information G was first generated on October 1st at 9:00 PM; Information H was first generated on October 2nd at 4:00 AM; and Information I was first generated on October 1st at 3:00 PM.
[0073] The information queue, ordered chronologically by its initial generation time, is as follows: Information B, Information E, Information I, Information G, Information H, Information C, Information F, Information D, Information A. Querying this information queue, we find that the first piece of information that can be deleted is Information E, and the second piece of information that cannot be deleted is Information A. According to this information queue, Information E is the second most important piece of information, and Information A is the last most important piece. Since Information E is listed before Information A in the queue, we swap Information E and Information A in their original positions. The resulting new information queue is: Information B, Information A, Information I, Information G, Information H, Information C, Information F, Information D, Information E.
[0074] The last piece of information E in the information queue is the first piece of information that can be deleted, and the second to last piece of information D is the second piece of information that cannot be deleted. Thus, in the current running state where the power is being turned off, information B, information A, information I, information G, information H, information C, information F, and information D are stored from the first storage area of memory to the second storage area of memory.
[0075] When retrieving information from the information queue under different conditions, one can start from the head of the queue to check if the information is deletable, and start from the tail of the queue to check if the information is a non-deletable second piece of information. This embodiment of the invention uses a pointer to query the queue. Specifically:
[0076] The method to retrieve the first deletable information from the information queue is as follows:
[0077] Set the first pointer to the head of the message queue;
[0078] If the fault state contained in the information at the head of the information queue is the first state, then the information at the head of the information queue will be set to the first information, and the position of the first pointer will be fixed at the head of the information queue.
[0079] If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue meets the preset deletion condition, then the information at the head of the information queue is changed to the first information, the position of the first pointer is fixed at the head of the information queue, and the fault state contained in the information at the head of the information queue is modified to the first state; wherein, the preset deletion condition is the condition of modifying the fault state contained in the information at the head of the information queue to the first state.
[0080] If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue does not meet the preset deletion conditions, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0081] If the fault state recorded in the information at the head of the information queue is the third state, then the first pointer is moved to the second position of the information queue until the first information is detected, or until all the information in the information queue has been detected.
[0082] In detail, after the information is stored in the first storage area, it can be repeatedly rewritten within one cycle of the processor. The information includes information that determines the fault status, and the fault status is queried to determine whether it belongs to the first information or the second information.
[0083] The fault status can be a first state, a second state, or a third state; the first state can be represented by the value 80, the second state by 174, and the third state by 175.
[0084] Combined Figure 2As shown, the first pointer is set at the position of information B. It checks if the fault status of information B is 80, or 174 and meets the preset deletion conditions, or 175. If the fault status of information B is 80, then the information of information B is used as the first information, and the first pointer remains stationary at the position of information B. If the fault status of information B is 174 and meets the preset deletion conditions, in addition to the above operations, the fault status of information B also needs to be changed to 80. If the fault status of information B is 175, or 174 and does not meet the preset deletion conditions, then the first pointer is moved to information E. It checks if the fault status of information E is 80, or 174 and meets the preset deletion conditions, or 175. If the fault status of information E is 80, then the information of information E is used as the first information, and the first pointer remains stationary at the position of information E. If the fault status of information E is 174 and meets the preset deletion conditions, in addition to the above operations, the fault status of information E also needs to be changed to 80. If the fault status of information E is 175, or 174 and does not meet the preset deletion conditions, then the first pointer is moved to information I until the fault status is detected as 80, or 174 and meets the preset deletion conditions, or the status of information B to information A is detected.
[0085] The method for retrieving a non-deletable second piece of information from the information queue is as follows:
[0086] Set the second pointer to the tail of the message queue;
[0087] If the fault state contained in the information at the tail position of the information queue is the third state, then the information at the tail position of the information queue will be changed to the second information, and the position of the second pointer will be fixed at the tail position of the information queue.
[0088] If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue meets the preset deletion conditions, then the fault state contained in the information at the tail position of the information queue is modified to the first state, and the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or all the information in the information queue is detected.
[0089] If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue does not meet the preset deletion conditions, then the information at the tail of the information queue will be the second information, and the position of the second pointer will be fixed at the tail of the information queue.
[0090] If the fault state recorded in the information at the tail position of the information queue is the first state, then the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or until all the information in the information queue has been detected.
[0091] Combined Figure 2 As shown, the second pointer is set at the position of information A. It checks whether the fault status of information A is 175 or 174 and whether it meets the preset deletion conditions 80. If the fault status of information A is 175 or 174 and does not meet the preset deletion conditions, the second pointer is fixed at the position of information A, and information A is used as the second information. If the fault status of information A is 80 or 174 and meets the preset deletion conditions, the second pointer is moved to information D. It checks whether the status of information D is 175 or 174 and whether it meets the preset deletion conditions 80. If the fault status of information D is 175 or 174 and does not meet the preset deletion conditions, the second pointer is fixed at the position of information D, and the fault status of information D is used as the second information. If the fault status of information D is 80 or 174 and the preset deletion condition is met, then the fault status of information D is changed to 80, and the second pointer is moved to information F until the fault status of 175 or 174 is detected and the preset deletion condition is not met, or the status of information A to information I is detected.
[0092] The preset deletion condition is that the number of operation cycles in which a fault is automatically detected and stored as a historical fault after it has been cured exceeds a preset number of cycles.
[0093] The fault status contained in the information is determined in the following ways:
[0094] If a user sends a command to clear the fault in the message, then the fault status contained in the message is determined to be the first status; otherwise, the fault status of the message is determined to be the third status; or
[0095] If the system automatically detects that the fault recorded in the information has been cured, then the fault status contained in the information is determined to be the second status; otherwise, the fault status of the information is determined to be the third status.
[0096] The information recorded in this scheme can be fault information.
[0097] The first state, the second state, and the third state are defined as follows:
[0098] Once a fault self-heals, it is called a historical fault, and its fault status is in the second state, i.e., 174. If a historical fault continues to be stored for a preset operating cycle and then does not recur, the information should be automatically cleared. In other words, after the preset operating cycle meets the preset deletion conditions, the fault status is changed to the first state, 80.
[0099] A fault is being reported but has not been addressed. Record the fault status as the third state, 175.
[0100] When a certain fault is manually cleared by sending a clear message command, the information will be immediately cleared. The fault state is denoted as state one, 80.
[0101] During automatic detection, if a fault recorded in the information has self-recovered (e.g., if a component of a car overheats and the temperature returns to normal after reducing vehicle speed), then the fault recorded in the information is determined to have self-recovered and becomes a historical fault, with a fault status of 174. If the fault does not occur in subsequent driving cycles, then the fault status in the information is determined to be 80.
[0102] The process of exchanging the storage locations of the first information and the second information in the first storage area includes:
[0103] Copy the first information to the temporary address;
[0104] Copy the second information to the original storage location of the first information;
[0105] Copy the first information at the temporary address to the original storage location of the second information.
[0106] Combination Figure 3 As shown, area P is a temporary address, the first information is information E, and the second information is information A. Information E is copied to area P, and information A is copied to the location of information E, overwriting the data of information E. Information E is then copied from the temporary address to the location of information A. This enables data interaction.
[0107] When using pointers to troubleshoot, fix the first pointer at the starting address of the second information area in the queue, and fix the second pointer at the starting address of the second-to-last information area in the queue.
[0108] For example, information with different data lengths and formats can be integrated into a single structure array, so that all data of each piece of information is arranged consecutively;
[0109] Based on the time sequence of the information's initial generation, different faults are numbered 1 to n and stored in the Long-term area. When a fault stored in the Long-term area is cleared, the cleared area is searched from front to back using index numbers 1 to n, and the index number x is recorded. The uncleared area is searched from back to front, and the index number y is recorded.
[0110] Determine the information at index x. If it has been cleared, perform a swap. If it is pending clearing, clear it first and then perform a swap.
[0111] To swap data, define two pointers, each pointing to the starting address of the structure array corresponding to the target index. Copy data sequentially starting from the starting address, completely swapping the data in the structure arrays corresponding to the two indexes. Continue searching, moving one index at a time. This process takes n / 2 steps to traverse all memory. The search ends when all valid faults are in order, invalid faults are cleared, and the memory is released to the end of the Long-term area.
[0112] The specific process for exchanging data includes: setting pointers to point to the first address of information in the entry; different information can be represented by entry indices; setting pointer 1 to point to the information with index number 1 in the entry, and pointer 2 to point to the information with index number n in the entry; if the fault status of pointer 1 is 80 or 174 and meets the preset deletion condition, stop; if it is 175 or 174 and does not meet the preset deletion condition, point to the information with index number 2 in the entry, and so on; if the information at pointer 2 is 175 or 174 and does not meet the preset deletion condition, stop; if it is 80 or 174 and meets the preset deletion condition... The deletion condition points to the fault with index number n-1 in the entry, and so on. The system waits for pointer 1 to detect 80 or 174 and meet the preset deletion condition, and for pointer 2 to detect 175 or 174 and not meet the preset deletion condition. Then, the data in pointer 1 and pointer 2 are exchanged, and the data in pointer 2 is cleared after the exchange. Specifically, the system obtains the starting address of the information (the address pointed to by the pointer), obtains the data length of the information (a fault), sets a temporary address not less than the data length, and uses memcopy to copy pointer 1 to the temporary address, pointer 2 to pointer 1, and the temporary address to pointer 2, with the copy length being the data length. It then checks whether the data in pointer 2 has been cleared; if not, it clears the data in that area.
[0113] For example, in combination Figure 4 As shown, this embodiment of the invention proposes a fault management process, including:
[0114] S400: Determine the fault status of information stored in the Long-term area;
[0115] S401: Determine if the current state is the T15 power-down process and if memory usage is not 0; if yes, execute S402 and S407; otherwise, end.
[0116] In detail, if a user sends an instruction to clear the fault in the information, the fault status contained in the information is determined to be the first state; otherwise, the fault status of the information is determined to be the third state; or if it is automatically detected that the fault recorded in the information has been cured, the fault status contained in the information is determined to be the second state; otherwise, the fault status of the information is determined to be the third state.
[0117] S402: Set the first pointer to the head of the information queue and check the fault status in the information at the head of the information queue;
[0118] S403: If the fault state is the first state, then set the information at the head of the information queue as the first information, and fix the position of the first pointer at the head of the information queue.
[0119] S404: If the fault state is the second state and the preset deletion condition is met, then the information at the head of the information queue is set to the first information, and the position of the first pointer is fixed at the head of the information queue.
[0120] S405: If the fault state is the second state and the preset deletion condition is not met, the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0121] S406: If the fault state is the third state, move the first pointer to the second position in the information queue until the first message is detected, or until all messages in the information queue have been detected;
[0122] S407: Set the second pointer to the tail of the information queue and check the fault status in the information at the tail of the information queue;
[0123] S408: If the fault state is the third state, then change the information at the tail position of the information queue to the second information, and fix the position of the second pointer at the tail position of the information queue.
[0124] S409: If the fault status is the second status and the preset deletion condition is met, then the fault status contained in the information at the tail position of the information queue is modified to the first status, and the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or all the information in the information queue is detected.
[0125] S410: If the fault state is the second state and the preset deletion condition is not met, then the information at the tail position of the information queue is the second information, and the position of the second pointer is fixed at the tail position of the information queue.
[0126] S411: If the fault state is the first state, then move the second pointer to the second-to-last position in the information queue until the second message is detected, or until all messages in the information queue have been detected;
[0127] S412: If the first information is in the order of the second information in the information queue, then the storage locations of the first information and the second information in the first storage area are swapped.
[0128] S413: In the current running state of power-down, the information that is at the head of the queue before the last second information in the information queue is stored from the first storage area of memory to the second storage area of memory.
[0129] Based on the same inventive concept, embodiments of the present invention provide an information management device, combined with Figure 5 As shown, it includes:
[0130] The query module 500 is used to query first information that can be deleted from the information queue, and to query second information that cannot be deleted from the information queue; wherein, the information queue is the information stored in the first storage area of memory, which is determined according to the time of its first generation;
[0131] The interaction module 501 is used to exchange the storage locations of the first information and the second information in the first storage area if the first information is in the order of the information queue before the second information is in the order of the information queue.
[0132] During the current power-down process, the information in the information queue that is at the head of the queue before the last second information is stored from the first storage area of memory to the second storage area of memory; wherein, the first storage area is the storage area where the internally stored data will be lost after power-down; the second storage area is the storage area where the internally stored data will not be lost after power-down.
[0133] Optional, query module 500, specifically used for:
[0134] Set the first pointer to the head of the message queue;
[0135] If the fault state contained in the information at the head position of the information queue is the first state, then the information at the head position of the information queue is the first information, and the position of the first pointer is fixed at the head position of the information queue.
[0136] If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue meets a preset deletion condition, then the information at the head of the information queue is changed to the first information, the position of the first pointer is fixed at the head of the information queue, and the fault state contained in the information at the head of the information queue is modified to the first state; wherein, the preset deletion condition is the condition for modifying the fault state contained in the information at the head of the information queue to the first state.
[0137] If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion condition, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0138] If the fault state recorded in the information at the head of the information queue is the third state, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
[0139] Set the second pointer to the tail of the message queue;
[0140] If the fault state contained in the information at the tail position of the information queue is the third state, then the information at the tail position of the information queue is changed to the second information, and the position of the second pointer is fixed at the tail position of the information queue.
[0141] If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue meets the preset deletion conditions, then the fault state contained in the information at the tail position of the information queue is modified to the first state, and the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or all the information in the information queue is detected.
[0142] If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion conditions, then the information at the tail position of the information queue is the second information, and the position of the second pointer is fixed at the tail position of the information queue.
[0143] If the fault state recorded in the information at the tail position of the information queue is the first state, then the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or until all the information in the information queue has been detected.
[0144] Optional, interaction module 501, specifically used for:
[0145] Copy the first information to the temporary address;
[0146] Copy the second information to the original storage location of the first information;
[0147] Copy the first information at the temporary address to the original storage location of the second information.
[0148] Optionally, the device further includes a preprocessing module, which is connected to the query module 500;
[0149] The preprocessing module is used for:
[0150] If a user sends an instruction to clear the fault in the information, then the fault state contained in the information is determined to be a first state; otherwise, the fault state of the information is determined to be a third state; or
[0151] If the fault recorded in the information is automatically detected to have been cured, the fault status contained in the information is determined to be the second status; otherwise, the fault status of the information is determined to be the third status.
[0152] Optionally, all the information in the information queue is stored in the first storage area of memory in the same structure type.
[0153] Optionally, the DEM system is connected to the information management device. The DEM system can send user-issued instructions to the information management device to clear faults in the information, or automatically detect that the faults recorded in the information have been cured, and automatically detect the number of operation cycles after the faults have been cured.
[0154] If the information management device receives a user's instruction to clear the fault in the information, it determines the fault status contained in the information to be the first state; otherwise, it determines the fault status of the information to be the third state; or
[0155] If the system automatically detects that the fault recorded in the information has been cured, then the fault status contained in the information is determined to be the second status; otherwise, the fault status of the information is determined to be the third status.
[0156] Before exchanging information, if it is detected that the fault recorded in the information has been cured and the number of operation cycles after the fault has been cured exceeds the preset number of cycles, the fault status in the information will be modified to the first status.
[0157] In addition, combined Figures 1-5 The information management method and apparatus described in the embodiments of the present invention can both be implemented by electronic devices.
[0158] Electronic devices, including: processors;
[0159] Memory used to store the processor's executable instructions;
[0160] The processor is configured to execute the instructions to implement the station order processing method as described above.
[0161] Based on the above introduction, an example is proposed. Figure 6 The structure of electronic devices.
[0162] The electronic device may include a processor 610 and a memory 620 storing computer program instructions.
[0163] Specifically, the processor 610 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0164] Memory 620 may include mass storage for data or instructions. For example, and not limitingly, memory 620 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where suitable, memory 620 may include removable or non-removable (or fixed) media. Where suitable, memory 620 may be internal or external to a data processing device. In a particular embodiment, memory 620 is a non-volatile solid-state memory. In a particular embodiment, memory 620 includes read-only memory (ROM). Where suitable, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0165] The processor 610 implements any of the methods for performing tasks in the above embodiments by reading and executing computer program instructions stored in the memory 620.
[0166] In one example, the electronic device may also include a communication interface 630 and a bus 660. Wherein, such as Figure 6 As shown, the processor 610, memory 620, and communication interface 630 are connected via bus 660 and communicate with each other.
[0167] The communication interface 630 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of the present invention.
[0168] Bus 660 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 660 may include one or more buses. Although specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect.
[0169] In addition, in conjunction with the electronic devices in the above embodiments, the present invention can provide a storage medium that, when the instructions in the storage medium are executed by the processor of the electronic device, enables the electronic device to perform the information management method as described in any of the above embodiments.
[0170] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0171] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0172] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0173] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0174] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An information management method, characterized in that, include: The system retrieves first information from the information queue that can be deleted, and retrieves second information from the information queue that cannot be deleted; wherein the information queue is the information stored in the first storage area of memory, and the information is determined according to the time of its first generation. If the first information is in the order of the information queue before the second information is in the order of the information queue, then the storage locations of the first information and the second information in the first storage area are swapped. During the current power-down process, the information in the information queue that is at the head of the queue before the last second information is stored from the first storage area of memory to the second storage area of memory; wherein, the first storage area is the storage area where the internally stored data will be lost after power-down; the second storage area is the storage area where the internally stored data will not be lost after power-down.
2. The information management method according to claim 1, characterized in that, Retrieve the first piece of information from the information queue that can be deleted, including: Set the first pointer to the head of the message queue; If the fault state contained in the information at the head position of the information queue is the first state, then the information at the head position of the information queue is the first information, and the position of the first pointer is fixed at the head position of the information queue. If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue meets a preset deletion condition, then the information at the head of the information queue is changed to the first information, the position of the first pointer is fixed at the head of the information queue, and the fault state contained in the information at the head of the information queue is modified to the first state; wherein, the preset deletion condition is the condition for modifying the fault state contained in the information at the head of the information queue to the first state. If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion condition, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected. If the fault state recorded in the information at the head of the information queue is the third state, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected.
3. The information management method according to claim 1, characterized in that, Retrieve the second piece of information from the information queue that cannot be deleted, including: Set the second pointer to the tail of the message queue; If the fault state contained in the information at the tail position of the information queue is the third state, then the information at the tail position of the information queue is changed to the second information, and the position of the second pointer is fixed at the tail position of the information queue. If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue meets the preset deletion conditions, then the fault state contained in the information at the tail position of the information queue is modified to the first state, and the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or all the information in the information queue is detected. If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue does not meet the preset deletion conditions, then the information at the tail position of the information queue is the second information, and the position of the second pointer is fixed at the tail position of the information queue. If the fault state recorded in the information at the tail position of the information queue is the first state, then the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or until all the information in the information queue has been detected.
4. The information management method according to claim 1, characterized in that, Exchanging the storage locations of the first information and the second information in the first storage area includes: Copy the first information to the temporary address; Copy the second information to the original storage location of the first information; Copy the first information at the temporary address to the original storage location of the second information.
5. The information management method according to claim 2, characterized in that, The fault status contained in the information is determined by the following method: If a user sends an instruction to clear the fault in the information, then the fault state contained in the information is determined to be the first state; otherwise, the fault state of the information is determined to be the third state. or If the fault recorded in the information is automatically detected to have been cured, the fault status contained in the information is determined to be the second status; otherwise, the fault status of the information is determined to be the third status.
6. The information management method according to any one of claims 1 to 5, characterized in that, in, All information in the information queue is stored in the first storage area of memory in the same structure type.
7. An information management device, characterized in that, include: The query module is used to query first information that can be deleted from the information queue, and to query second information that cannot be deleted from the information queue; wherein, the information queue is the information stored in the first storage area of memory, which is determined according to the time of its first generation; An interaction module is used to exchange the storage locations of the first information and the second information in the first storage area if the first information is in the order of the information queue before the second information is in the order of the information queue. During the current power-down process, the information in the information queue that is at the head of the queue before the last second information is stored from the first storage area of memory to the second storage area of memory; wherein, the first storage area is the storage area where the internally stored data will be lost after power-down; the second storage area is the storage area where the internally stored data will not be lost after power-down.
8. The information management device according to claim 7, characterized in that, The query module is specifically used for: Set the first pointer to the head of the message queue; If the fault state contained in the information at the head position of the information queue is the first state, then the information at the head position of the information queue is the first information, and the position of the first pointer is fixed at the head position of the information queue. If the fault state contained in the information at the head of the information queue is the second state, and the information at the head of the information queue meets a preset deletion condition, then the information at the head of the information queue is changed to the first information, the position of the first pointer is fixed at the head of the information queue, and the fault state contained in the information at the head of the information queue is modified to the first state; wherein, the preset deletion condition is the condition for modifying the fault state contained in the information at the head of the information queue to the first state. If the fault state contained in the information at the head position of the information queue is the second state, and the information at the head position of the information queue does not meet the preset deletion condition, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected. If the fault state recorded in the information at the head of the information queue is the third state, then the first pointer is moved to the second position of the information queue until the first information is detected, or all the information in the information queue has been detected. Set the second pointer to the tail of the message queue; If the fault state contained in the information at the tail position of the information queue is the third state, then the information at the tail position of the information queue is changed to the second information, and the position of the second pointer is fixed at the tail position of the information queue. If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue meets the preset deletion conditions, then the fault state contained in the information at the tail position of the information queue is modified to the first state, and the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or all the information in the information queue is detected. If the fault state contained in the information at the tail position of the information queue is the second state, and the information at the tail position of the information queue does not meet the preset deletion conditions, then the information at the tail position of the information queue is the second information, and the position of the second pointer is fixed at the tail position of the information queue. If the fault state recorded in the information at the tail position of the information queue is the first state, then the second pointer is moved to the second-to-last position of the information queue until the second information is detected, or until all the information in the information queue has been detected.
9. An electronic device, characterized in that, include: Memory is used to store computer programs or instructions; A processor for executing a computer program or instructions in the memory such that the method described in any one of claims 1-6 is performed.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including a program request that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Control method and operating system of electronic equipment
CN114237728A
Data storage method and related device
CN115268794A