Method for failure detection of electronic devices

The synchronization problem of AOF files was solved by writing and comparing verification fields in the AOF file. This solved the synchronization problem of in-memory data in the Redis database, which was not effectively solved in the existing technology.

CN113986593BActive Publication Date: 2025-12-23BEIJING UCARD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111256482.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2025-12-23
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

After a Redis server crashes and restarts, the AOF file may be corrupted or lost, causing inconsistencies between the in-memory data and the AOF file. Existing technologies are insufficient to effectively detect and resolve this issue.

Method used

By using the technical means of writing to the AOF file and generating data during server restart, this invention solves the problem of synchronizing memory data in the Redis server, which is a problem that existing technologies have failed to effectively address. It also solves the problem of synchronizing memory data with the AOF file in the Redis database, thus resolving the technical issues that existing technologies have failed to effectively address.

Benefits of technology

It can quickly detect anomalies in in-memory databases, prevent data loss, reduce server complexity and maintenance difficulty, and ensure data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986593B_ABST
    Figure CN113986593B_ABST
Patent Text Reader

Abstract

The application discloses a fault checking method of an electronic device, and has the characteristics that the method comprises: in the case that the electronic device is restarted, loading each record of an AOF file to obtain a second check field, wherein each record contains a first check field; in the case that the second check field and the first check field are inconsistent, reporting a fault; wherein the first check field is a retention quantity field representing an operation request for the electronic device recorded in each record of the AOF file, and the second check field is a quantity field calculated according to the operation request for the electronic device. The method disclosed by the application does not need an additional file to record the state, can not only check the program bug and abnormal write disorder of the in-memory database, but also solve the problem of AOF file asynchronization caused by local tampering, covering or disorder of the AOF file.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to data storage technology, in particular to a fault checking method and system of an electronic device. BACKGROUND

[0002] AOF (Append Only File) is a kind of Redis persistence mechanism, which records all the write commands and parameters of the database into the AOF file in the form of protocol text, so as to record the state of the database. As long as the protocol in the AOF file is executed again, the state of the Redis database can be restored.

[0003] Generally, after the server is restarted, the AOF file is reloaded to restore the memory data. If the hard disk is damaged, damaged by human or program bug, multiple AOF files may be damaged or lost. In this case, the memory data obtained by reloading the AOF file after the server is restarted may be lost. How to check whether the currently stored AOF file and the memory data before the server is restarted are consistent is a difficult problem. SUMMARY

[0004] The present application provides a fault checking method, system, device and medium of an electronic device, which does not need additional file recording state, can not only check the abnormality of the memory database, but also solve the problem of asynchronous AOF file.

[0005] The first aspect of the present application discloses a fault checking method of an electronic device, which comprises: loading each record of an AOF file to obtain a second check field in the case that the electronic device is restarted, each record containing a first check field; reporting a fault in the case that the second check field and the first check field are inconsistent; wherein the first check field is a retained number field representing an operation request for the electronic device recorded in each record of the AOF file, and the second check field is a number field calculated according to the operation request for the electronic device.

[0006] In a possible implementation of the above first aspect, the operation request comprises one or more of the following: ADD request, DEL request and MOD request.

[0007] In a possible implementation of the above first aspect, the first check field is the number of retained keys of the operation request for the electronic device recorded in each record of the AOF file, and the second check field is the number of keys in the memory calculated according to the operation request for the electronic device.

[0008] In a possible implementation of the first aspect, the first check field is a value accumulation value of the operation request for the electronic device recorded in each record of the AOF file, and the second check field is a value accumulation value in the memory calculated according to the operation request for the electronic device.

[0009] In a possible implementation of the first aspect, the first check field is a crc function value of the value of the operation request for the electronic device recorded in each record of the AOF file, and the second check field is a crc function value of the value in the memory calculated according to the operation request for the electronic device.

[0010] The second aspect of the present application discloses a system for checking failure of an electronic device, the system comprising: a restart module configured to load each record of an AOF file and obtain a second check field in the case of restarting the electronic device; a writing module configured to add a first check field in the AOF file, the first check field being a number field of an operation request for the electronic device in each record of the AOF file; and a checking module configured to report a failure in the case that the first check field and the second check field are inconsistent.

[0011] The third aspect of the present application discloses an electronic device for checking failure of an electronic device, comprising a memory storing computer executable instructions and a processor; when the instructions are executed by the processor, the device implements the failure checking method of the electronic device of the first aspect of the present application.

[0012] The third aspect of the present application discloses a computer readable storage medium storing one or more computer programs, the one or more computer programs being executed by one or more processors, so that the processor executes the method of the above-mentioned first aspect embodiment.

[0013] The present application provides a failure checking method, system, device and medium of an electronic device, by adding a first check field when writing an AOF file, loading an AOF file to obtain a second check field, and verifying data synchronization by comparing the first check field and the second check field, not only can the program bug and abnormal write disorder of the in-memory database be checked, but also the problem of AOF file asynchronization caused by partial tampering, covering or disorder of the AOF file can be solved. In addition, the method of the present application does not need additional file record state, reducing the complexity and maintenance difficulty of the server. BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 Flowchart of the failure checking method of the electronic device in an embodiment of the present application;

[0015] Figure 2 A module diagram of a user equipment according to an embodiment of the present application;

[0016] Figure 3 A structure diagram of a user equipment according to an embodiment of the present application; DETAILED DESCRIPTION

[0017] The present application will be further described by the following specific embodiments and drawings. It can be understood that the illustrative embodiments of the present disclosure include, but are not limited to, a fault detection method, system, device and medium of an electronic device, and the specific embodiments described herein are only for the purpose of explaining the present application, but not limiting the present application. In addition, for the purpose of description, only the parts related to the present application are shown in the drawings, not all the structures or processes.

[0018] The specific embodiments of the present application are described below by referring to specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the specification. Although the description of the present application will be introduced by combining the preferred embodiments, it does not mean that the features of the present application are limited to the embodiments. On the contrary, the purpose of introducing the present application by combining the embodiments is to cover other options or modifications that can be extended based on the claims of the present application. In order to provide a deep understanding of the present application, many specific details will be included in the following description. The present application can also be implemented without using these details. In addition, in order to avoid confusion or obscure the focus of the present application, some specific details will be omitted in the description. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0019] In addition, various operations will be described as multiple discrete operations; however, the order of description is not to be construed as implying that these operations are necessarily dependent on the order. In particular, these operations need not be performed in the order presented.

[0020] Unless otherwise defined, the terms "comprising", "having", and "including" are synonymous. The phrase "A / B" means "A or B". The phrase "A and / or B" means "(A and B) or (A or B)".

[0021] As used herein, the terms "module" or "unit" can refer to, be or include: an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated, or group) processor and / or memory executing one or more software or firmware programs, a combinational logic circuit, and / or other suitable components providing the described functionality.

[0022] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on a transitory or non-transitory machine-readable (e.g., computer-readable) medium, which can be read and executed by one or more processors. For example, the instructions can be distributed over the network or by way of other computer readable media to cause a variety of computing systems or machines to perform the tasks outlined herein. Thus, the machine-readable medium includes any mechanism that provides (i.e., stores and / or transmits) information in a form accessible by a machine (e.g., computing device, computing system, etc.), but is not to be construed as being limited to solid-state memories and tangible transmission mechanisms (e.g., optical, electrical, etc.). The instructions can be executed by one or more processors to cause a machine to perform any one or more of the methods or computer based functions as described in the detailed description section of the specification.

[0023] In the drawings, some of the structural or methodological acts can be shown in a particular arrangement and / or order. However, it should be understood that the particular

[0024] It should be understood that although the terms "first" and "second" and the like can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element without departing from the scope of example embodiments.

[0025] It should be noted that in the description of the application, like numbers in two or more figures represent similar elements, and further, that in the description of examples of the application, a process or method occurring before one figure can be combined with a process or method occurring after that figure.

[0026] In order to make the purposes, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0027] Redis(Remote Dictionary Server) is an open source key-value pair storage memory database, which belongs to a kind of non-relational database. The data set of Redis is a dictionary composed of key-value pairs, and the type of value in Redis is not only a string, but also a string list, an unordered set, an ordered set and a hash value type, which is different from other non-relational databases.

[0028] Generally, Redis stores all data in memory, but Redis also provides two kinds of persistence mechanisms to save data to disk. One way is to write the entire data set from memory into the RDB file on disk in an asynchronous manner through snapshot, and the other way is to write all write operation statements of the database into the AOF file on disk. After the server is restarted after a crash, the AOF file is reloaded to restore the memory data of the server.

[0029] The problem of Redis using AOF to realize memory data backup at present is synchronization. Specifically, because the server generally crashes and restarts less frequently, and the AOF file is continuously written, after the data reaching a certain capacity or number in the AOF file, the AOF file is compressed and reduced, and the AOF file may change in this process; in addition, if hard disk damage, human damage or program bug occurs, the data backed up in the AOF is not the latest, which will cause the data to be out of synchronization and cause the loss of part of the updated data.

[0030] Reference Figure 1 , Figure 1 A flowchart of the method of memory data backup of the present application is shown, which can solve the problem of out-of-synchronization of database backup.

[0031] In S100, the memory server receives an operation request.

[0032] After the memory server is started, it can receive one or more operation requests, and modify the memory data according to the operation request. The operation request can be one or more of the following commands: ADD request command, DEL request command, MOD request command. The ADD request is to add a key to the memory, the DEL request is to delete a key from the memory, and the MOD request is to modify the key.

[0033] In S110, according to the operation request, the operation is written in each line of the AOF file and a first check field is added.

[0034] Specifically, for each operation request, the command and parameters corresponding to the operation request are written into the AOF file in a format, and a first check field is added to each line. The first check field is a retained number field representing the operation request for the electronic device recorded in each record of the AOF file.

[0035] In S120, the server is restarted, the AOF file is loaded into the memory, and a second check field is generated.

[0036] After the server is restarted, the AOF file is loaded into the memory, that is, the content of each line in the AOF file is read out, that is, according to the operation request of each line, the corresponding operation is performed on the memory. For example, ADD adds key to the memory, and DEL deletes key from the memory. After the AOF file is loaded, the second check field is generated. The second check field is a number field calculated according to the operation request for the electronic device.

[0037] In S130, the first check field and the second check field are compared.

[0038] If the first check field and the second check field are inconsistent, a fault is reported to indicate that the check is abnormal.

[0039] In some embodiments, the first check field can be the number of retained keys, that is, key_num, recorded in each record in the AOF file. For example, multiple operations written into the AOF file can be:

[0040] ADD[key1][value1][key_num1]

[0041] ADD[key2][value2][key_num2]

[0042] ADD[key3][value3][key_num3]

[0043] MOD[key2][value4][key_num4]

[0044] ADD[key5][value5][key_num5]

[0045] DEL[key1][key_num6]

[0046] ADD[key7][value7][key_num7]

[0047] ADD[key8][value8][key_num8] ...

[0049] In the above example, the first to third lines are all ADD request commands, the first check field of the ADD operation recorded in the first line is [key_num1], [key_num1] = 1, and so on, the first check field of the second line is [key_num2], [key_num2] = 2, and the first check field of the third line is [key_num3] = 3. The fourth line is a MOD request command, which requests to modify [key2], and modifies the value corresponding to [key2] from the original [value2] to [value4], so the first check field [key_num4] of the fourth line is still 3. The fifth line is an ADD request command, and the first check field of this line is [key_num5] = 4. The sixth line is a DEL request command, which requests to delete [key1], so the first check field [key_num6] of the sixth line is 4-1 = 3. The seventh line is an ADD request command, and the first check field of this line is [key_num7] = 3+1 = 4. The eighth line is an ADD request command, and the first check field of this line is [key_num8] = 4+1 = 5.

[0050] In these embodiments, the second check field is the number of keys in the memory calculated according to the operation request of the electronic device after the AOF file is loaded. The second check field is obtained by counting the number of keys in the memory after the AOF file is loaded. Comparing the first check field and the second check field is to compare whether the last key_num recorded in the AOF file and the actual number of keys in the memory after the AOF file is loaded into the memory are equal. In the above example, the last key_num recorded in the AOF file is 5, and if the actual number of keys in the memory after the AOF file is loaded into the memory is not 5, a fault is reported.

[0051] In some other embodiments, the first check field can be the value accumulation value recorded in each record in the AOF file, and the second check field is the value accumulation value calculated according to the operation request of the electronic device after the AOF file is loaded. For example, the multiple operations written into the AOF file can be:

[0052] ADD[key1][value1, value1 = 10][value_sum1]

[0053] ADD[key2][value2, value2 = 20][value_sum2]

[0054] ADD[key3][value3, value3 = 20][value_sum3]

[0055] MOD[key2][value4, value4=30][value_sum4]

[0056] DEL[key1][value_sum5]

[0057] ADD[key6][value6, value6=50][value_sum6] ...

[0059] In the above example, for simplicity, the value in each operation is replaced by a simple natural number, i.e. the first check field of the ADD operation in the first row is [value_sum1], [value_sum1]=10, and so on. The first check field of the second row is [value_sum2], [value_sum2]=10+20=30, and the first check field of the third row is [value_sum3], [value_sum3]=10+20+20=50. The fourth row is a MOD request command, which requests to modify [key2] to 30 from the original 20, so the first check field of the fourth row is [key_num4]=50+30=80. The fifth row is a DEL request command, which requests to delete [key1], so the first check field of the fifth row is [value_sum4]=80-10=70. The sixth row is an ADD request command, and the first check field of the sixth row is [value_sum6]=70+50=120.

[0060] In these embodiments, the second check field is the value accumulation value calculated according to the operation requests to the electronic device after the AOF file is loaded. The second check field is obtained by counting the value accumulation value in the memory after the AOF file is loaded. The first check field and the second check field are compared to determine whether the last value accumulation value recorded in the AOF file is equal to the actual value accumulation value in the memory after the AOF file is loaded. In the above example, the last value accumulation value recorded in the AOF file is 120, and if the actual value accumulation value in the memory after the AOF file is loaded is not 120, a fault is reported.

[0061] In some other embodiments, the first check field can be the crc function value of the value recorded in each record in the AOF file, and the second check field is the crc function value of the value calculated according to the operation requests to the electronic device after the AOF file is loaded. For example, the multiple operations written into the AOF file can be:

[0062] ADD[keyl] [value 1, value 1=10] [crc(value 1)]

[0063] ADD[key2] [value 2, value 2=20] [crc(value 2)]

[0064] ADD[key3] [value 3, value 3=20] [crc(value 3)]

[0065] MOD[key2] [value 4, value 4=30] [crc(value 4)]

[0066] DEL[keyl]

[0067] ADD[key6] [value 6, value 6=50] [crc(value 6)] ...

[0069] In the above example, for simplicity, the result of crc(value) in each operation is replaced by xxxvalue, i.e. the first check field recorded in the ADD operation of the first line is [crc(value 1)], since value 1=10, the result of crc(value 1) is xxx10, and so on. The first check field of the second line is [crc(value 2)], the result of crc(value 2) is xxx20, the first check field of the third line is [crc(value 3)], the result of crc(value 3) is xxx20. The fourth line is a MOD request command, the first check field of the fourth line is [crc(value 4)], the result of crc(value 4) is xxx30.

[0070] The fifth line is a DEL request command, which requests to delete [keyl], so the first check field of the fifth line can be empty. The sixth line is an ADD request command, the first check field of the sixth line is [crc(value 6)], the result of crc(value 6) is xxx50.

[0071] In these embodiments, the second check field is a crc function value of the value calculated according to the operation request of the electronic device after the AOF file is loaded completely, and the crc function value of the value in the memory after the AOF file is loaded completely is obtained. The first check field and the second check field are compared, and whether the crc function value of the last value recorded in the AOF file is equal to the actual crc function value of the value after the AOF file is loaded into the memory is compared. In the above example, the crc function value of the last value recorded in the AOF file is xxx50, and if the actual crc function value of the value after the AOF file is loaded into the memory is not xxx50, a fault is reported.

[0072] In some embodiments, if the first check field and the second check field are inconsistent, the server can alarm or crash, indicating that the AOF file is abnormal.

[0073] In some embodiments, if the AOF file is detected to be abnormal, the in-memory database can be restored by manual processing or other methods.

[0074] According to the method of the present application Figure 1 , when writing the AOF file, the first check field for checking synchronization is recorded under each entry of each line when the current command is recorded, and in the process of restoring the AOF file content to the memory after the server is restarted, for each operation corresponding to each line, the generated second check field can be compared with the first check field corresponding to the line, and the function of checking the AOF file is realized. This method not only can detect the program bug of the in-memory database and the abnormality of the write disorder program, but also can solve the problem of AOF file asynchronization caused by partial tampering, covering or disorder of the AOF file. The checking process of the present application can quickly find and report errors, can promptly troubleshoot and alarm, and can avoid the case that the data has been lost, but the server cannot be perceived and still restarts normally.

[0075] In addition, compared with related technologies, the method of the present application does not need additional file recording states, reduces the complexity and maintenance difficulty of the server, for example, in the related technology, in the mysql database, an additional index file needs to be added to check the log file. Specifically, after the binlog is started, a host-bin.n file is produced in the data directory to record the specific binlog information file, and a host-bin.index index file is added to record the binlog file list, and the host-bin.index index file is used to check the file name and number of the binlog. The host-bin.index index file is relatively easy to be damaged or maliciously modified, which can cause the data checking to be untrustworthy.

[0076] ReferenceFigure 2 The application provides an in-memory database backup device 200, the in-memory database backup device 200 comprising:

[0077] A write module 210 is configured to add a first check field in each record of the AOF file, the first check field being a retention quantity field representing an operation request for the electronic device recorded in each record of the AOF file;

[0078] A restart module 220 is configured to load each record of the AOF file in the case of restarting the electronic device, and obtain a second check field, the second check field being a quantity field calculated according to the operation request for the electronic device;

[0079] A check module 230 is configured to report a fault in the case that the first check field and the second check field are inconsistent.

[0080] Reference is now made to Figure 3 , which shows a block diagram of an electronic device 300 according to one embodiment of the application. The electronic device 300 can include one or more processors 302, system control logic 308 connected to at least one of the processors 302, system memory 304 connected to the system control logic 308, non-volatile memory (NVM) 306 connected to the system control logic 308, and a network interface 310 connected to the system control logic 308.

[0081] The processor 302 can include one or more single-core or multi-core processors. The processor 302 can include any combination of general-purpose processors and dedicated processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments herein, the processor 302 can be configured to perform one or more embodiments in accordance with various embodiments as shown in Figure 2 .

[0082] In some embodiments, the system control logic 308 can include any suitable interface controllers to provide any suitable interface to at least one of the processors 302 and / or any suitable device or component in communication with the system control logic 308.

[0083] In some embodiments, the system control logic 308 can include one or more memory controllers to provide an interface to connect to the system memory 304. The system memory 304 can be used to load and store data and / or instructions. In some embodiments, the memory 304 of the device 300 can include any suitable volatile memory, such as suitable dynamic random access memory (DRAM).

[0084] The NVM / storage 306 can include one or more tangible, non-transitory computer-readable media for storage of data and / or instructions. In some embodiments, the NVM / storage 306 can include any suitable non-volatile memory and / or any suitable non-volatile storage device such as at least one of a flash memory, an HDD (Hard Disk Drive), a CD (Compact Disc) drive, and a DVD (Digital Versatile Disc) drive.

[0085] The NVM / storage 306 can include a portion of the storage resources installed on the apparatus of the device 300, or it can be accessed by the device but not necessarily part of the device. For example, the NVM / storage 306 can be accessed over a network via the network interface 310.

[0086] In particular, the system memory 304 and the NVM / storage 306 can include, respectively, a temporary copy and a permanent copy of the instructions 320. The instructions 320 can include instructions that, when executed by at least one of the processors 302, cause the device 300 to implement one or more embodiments as shown in the method of Figure 1 In some embodiments, the instructions 320, hardware, firmware, and / or software components thereof can additionally / alternatively be placed in the system control logic 308, the network interface 310, and / or the processors 302.

[0087] The network interface 310 can include a transceiver to provide a radio interface for the device 300 to communicate with any other suitable device (e.g., a front-end module, an antenna, etc.) over one or more networks. In some embodiments, the network interface 310 can be integrated with other components of the device 300. For example, the network interface 310 can be integrated with at least one of the processors 302, the system memory 304, the NVM / storage 306, and firmware having instructions that, when executed by at least one of the processors 302, cause the device 300 to implement one or more embodiments as shown in the method of Figure 1

[0088] The network interface 310 can further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 310 can be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0089] ​In one embodiment, at least one of the processors 302 can be packaged together with logic for one or more controllers of the system control logic 308 in a system in a package (SiP). In one embodiment, at least one of the processors 302 can be integrated on the same die with logic for one or more controllers of the system control logic 308 to form a system on a chip (SoC).

[0090] The device 300 can further include an input / output (I / O) device 312. The I / O device 312 can include a user interface that enables a user to interact with the device 300; a peripheral component interface that enables peripheral components to interact with the device 300.

[0091] In some embodiments, the user interface can include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., a light emitting diode flash), and a keypad.

[0092] In some embodiments, the peripheral component interface can include, but is not limited to, a non-volatile memory port, an audio jack, and a power supply interface.

[0093] The method embodiments of the application can be implemented in software, firmware, hardware, etc.

[0094] The program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices, which can be known in the art. For the purposes of this application, a processing system includes any system that has a processor, such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0095] The program code can be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code can be implemented in assembly or machine language, if desired. In fact, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language can be a compiled or interpreted language.

[0096] One or more aspects of at least one embodiment can be implemented by representative instructions stored on a machine-readable storage medium which represents various logic within the processor, which when read by a machine causes the machine to fabricate logic to perform the techniques described herein. Such representations, known as "IP cores" can be stored on a tangible, machine readable media and supplied to the manufacturing facility, which loads the same into the fabrication machines that actually make the logic or processor.

Claims

1. A failure inspection method of an electronic device, characterized by, The method comprises: In case of restarting of the electronic device, loading each record of the AOF file to obtain a second check field, each record containing a first check field; Comparing the last first check field and the second check field, and reporting a fault if they are inconsistent; The first check field is the number of keys retained in each record of the AOF file for operation requests of the electronic device, and the second check field is the number of keys in the memory calculated according to the operation requests of the electronic device after the AOF file is loaded.

2. The failure inspection method of an electronic device according to claim 1, wherein The operation request comprises one or more of the following: ADD request, DEL request and MOD request.

3. The failure inspection method of an electronic device according to claim 1 or 2, characterized by, The first check field is the value accumulation value of the operation request of the electronic device recorded in each record of the AOF file, and the second check field is the value accumulation value in the memory calculated according to the operation request of the electronic device.

4. The failure inspection method of an electronic device according to claim 1 or 2, characterized in that, The first check field is the crc function value of the value of the operation request of the electronic device recorded in each record of the AOF file, and the second check field is the crc function value of the value in the memory calculated according to the operation request of the electronic device.

5. A system for verifying electronic device malfunctions, characterized by, The system comprises: A writing module for adding a first check field in each record of the AOF file, the first check field being the number of keys retained in each record of the AOF file for operation requests of the electronic device; A restarting module for loading each record of the AOF file in case of restarting of the electronic device to obtain a second check field, the second check field being the number of keys in the memory calculated according to the operation requests of the electronic device after the AOF file is loaded; A check module for comparing the last first check field and the second check field, and reporting a fault if they are inconsistent.

6. An electronic device, comprising: The electronic device comprises a memory storing computer executable instructions and a processor; When the instructions are executed by the processor, the electronic device implements the fault checking method of the electronic device according to any one of claims 1 to 4.

7. A computer readable medium characterized by The computer readable medium stores one or more programs executable by one or more processors to implement the fault checking method of the electronic device according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Interlocking monitoring data storage method and system

    CN111737255A

  • Data verification method and device, storage medium and computer equipment

    CN113312205A