Memory inspection method, device, equipment and medium
By writing verification messages into real memory and building a virtual environment, the cloned system is used for detection, which solves the lag problem caused by frequent memory inspection operations. This allows for multiple inspections without affecting memory operation, ensuring the integrity and security of memory.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LIVEFAN INFORMATION TECH CO LTD
- Filing Date
- 2023-02-15
- Publication Date
- 2026-05-05
AI Technical Summary
Existing memory inspection methods require multiple operations, which can cause memory lag and cannot provide comprehensive detection, nor can they guarantee the integrity and security of the memory.
By writing pre-set verification messages into real memory, a virtual environment is constructed and a cloned system is created. The memory information of the cloned system is read using a mapping channel to verify the consistency between the clone verification messages and the real memory messages, enabling multiple checks without affecting the normal operation of the real memory.
This reduces the number of operations on physical memory, improves detection efficiency, and ensures the integrity and security of memory.
Smart Images

Figure CN116302622B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to memory inspection methods, apparatus, devices, and media. Background Technology
[0002] For a long time, memory testing has been required for equipment with high security requirements. For example, in highly confidential institutions or in safety-related equipment such as rail transit, it is necessary to test the memory of the equipment in advance. Routine inspection is also essential. The usual inspection method is to test the memory by writing data, reading data, and then comparing the results.
[0003] This method of comparing memory writes and reads is good for determining memory faults, but it only works once. Performing multiple checks would be extremely troublesome. Furthermore, if the memory is running during the read / write test, it can cause memory lag and other issues. Also, this method cannot perform a comprehensive inspection of the memory. Summary of the Invention
[0004] The main objective of this invention is to provide a memory inspection method, apparatus, device, and medium for solving the above-mentioned problems.
[0005] The first aspect of this invention provides a memory inspection method, the memory inspection method comprising:
[0006] Write the preset verification message into the preset real memory;
[0007] Build a virtual environment;
[0008] The currently running system is copied within the virtual environment to obtain a cloned system, wherein the copied content includes the information of the real memory and the verification message to obtain a clone verification message;
[0009] The memory information and clone verification message in the cloning system are read through the preset mapping channel.
[0010] Verify whether the cloned verification message and the real in-memory verification message are consistent.
[0011] Optionally, in a second implementation of the first aspect of the present invention, before writing the preset verification message into the preset real memory, the method further includes:
[0012] Write the address and verification bytes as message information;
[0013] The message information is asymmetrically encrypted to obtain a verification message.
[0014] Optionally, in a third implementation of the first aspect of the present invention, before copying the currently running system within the virtual environment to obtain a cloned system, the method further includes:
[0015] The integrity of the actual memory is checked.
[0016] Optionally, in a fourth implementation of the first aspect of the present invention, the mapping channel is a VPN-dedicated mapping channel.
[0017] Optionally, in a fifth implementation of the first aspect of the present invention, verifying whether the clone verification message and the real in-memory verification message are consistent includes:
[0018] Determine whether the initial write address of the cloned verification message is consistent with the initial write address of the verification message in the real memory;
[0019] If so, the memory in the cloning system is then checked;
[0020] If not, then the actual memory is determined to be in an abnormal state.
[0021] Optionally, in a sixth implementation of the first aspect of the present invention, the detection of memory in the cloning system includes:
[0022] The memory of the cloning system is divided into multiple detection zones;
[0023] Preset test data is written to each of the detection areas in the memory of the cloning system;
[0024] Reread the test data for each of the detection zones;
[0025] Determine whether the read test data is consistent with the test data before it was written;
[0026] If so, then the actual memory is determined to be in a normal state.
[0027] A second aspect of the present invention provides a memory inspection apparatus, comprising:
[0028] The preprocessing module is used to write the pre-set verification message into the pre-set real memory;
[0029] The virtual environment building module is used to build virtual environments;
[0030] The cloning module is used to copy the currently running system within the virtual environment to obtain a cloned system, wherein the copied content includes information from the real memory and the verification message to obtain a clone verification message.
[0031] The first verification module is used to read the memory information and clone verification message in the cloning system through a preset mapping channel;
[0032] The second verification module is used to verify whether the cloned verification message and the real in-memory verification message are consistent.
[0033] A third aspect of the present invention provides a memory inspection device, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a circuit; the at least one processor invokes the instructions in the memory to cause the memory inspection device to perform the memory inspection method described above.
[0034] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the memory inspection method described above.
[0035] In an embodiment of the present invention, a virtual environment is constructed by writing a preset verification message into a preset real memory. The currently running system is then copied within the virtual environment to obtain a cloned system. Through a preset mapping channel, memory information and clone verification messages in the cloned system are read to verify whether the clone verification message and the verification message in the real memory are consistent. The virtual system is used to perform detection on the real memory, reducing the number of times the real memory is operated on. At the same time, the real memory can be detected multiple times to ensure the integrity and security of the real memory to the greatest extent. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the first embodiment of the memory inspection method in this invention;
[0037] Figure 2 This is a schematic diagram of a second embodiment of the memory inspection method in this invention;
[0038] Figure 3 This is a schematic diagram of the third embodiment of the memory inspection method in this invention;
[0039] Figure 4 This is a schematic diagram of the fifth embodiment of the memory inspection method in this invention;
[0040] Figure 5 This is a schematic diagram of the sixth embodiment of the memory inspection method in this invention.
[0041] Figure 6 This is a schematic diagram of one embodiment of the memory inspection device in this invention;
[0042] Figure 7This is a schematic diagram of one embodiment of the memory inspection device in this invention. Detailed Implementation
[0043] This invention provides a memory inspection method, apparatus, device, and medium.
[0044] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this invention, are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0045] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 - Appendix Figure 5 One embodiment of the memory inspection method in this invention includes:
[0046] 101. Write the preset verification message into the preset real memory;
[0047] Furthermore, prior to step 101, the following steps are also included:
[0048] 1001. Write the address and verification bytes as message information;
[0049] 1002. Perform asymmetric encryption on the message information to obtain a verification message.
[0050] In steps 1001-1002, to ensure the accuracy and authenticity of subsequent verification of the real memory, the verification message information is written into the real memory in advance. The message information may be tampered with by external factors, which may cause the security and integrity of the real memory to be unable to be properly judged during subsequent verification. Therefore, the message information needs to be encrypted. In this embodiment, an asymmetric encryption algorithm is used to obtain the verification message. Of course, other encryption algorithms can also be used, such as the more complex elliptic cryptography algorithm. The specific complexity setting is customized according to the user's actual choice.
[0051] 102. Construct a virtual environment;
[0052] 103. Copy the currently running system within the virtual environment to obtain a cloned system, wherein the copied content includes the information of the real memory and the verification message to obtain a clone verification message;
[0053] Since the reception and decryption of verification messages are both performed within the cloning system, if the cloning system lacks firewall-like barriers, the verification messages can be intercepted and brute-forced to obtain the true message information. This can also obfuscate the memory state and interfere with normal memory inspection. Therefore, in this embodiment, while copying the currently running system in the virtual environment, encryption is also performed. The encryption algorithm used is selected by the user and is the same as the message encryption method described above. It is important to note that the cloning system also needs to have built-in user authentication methods, such as IP and MAC addresses, to ensure the security of user information accessing the cloning system and further enhance security.
[0054] Furthermore, prior to step 103, the following steps are also included:
[0055] 1021. Perform an integrity test on the actual memory.
[0056] In this embodiment, while copying the current running system, it is of course necessary to ensure the integrity of the real memory. If the real memory is not normal and has some hidden defects, then the subsequent verification method using the cloning system will be meaningless.
[0057] 104. Read the memory information and clone verification message in the cloning system through the preset mapping channel;
[0058] 105. Verify whether the clone verification message and the real memory verification message are consistent.
[0059] Furthermore, step 105 can be specifically performed as follows:
[0060] 1051. Determine whether the initial write address of the clone verification message is consistent with the initial write address of the verification message in the real memory;
[0061] 1052. If so, then the memory in the cloning system is checked;
[0062] Furthermore, in step 1052, the following can also be performed:
[0063] 10521. Divide the memory in the cloning system into multiple detection areas;
[0064] 10522. Write the preset test data into each of the detection areas in the memory of the cloning system;
[0065] 10523. Reread the test data for each of the detection areas;
[0066] 10524. Determine whether the read test data is consistent with the test data before it was written;
[0067] 10525. If so, then the actual memory is determined to be in a normal state.
[0068] In steps 10521-10525, since directly verifying the entire memory would consume a significant amount of resources, multi-threaded verification operations can be implemented by dividing the memory into multiple detection areas, thereby improving verification efficiency. The pre-prepared test data is written into multiple detection areas in the memory, and these written test data are reread and compared with the test data before they were written. If they are consistent, the memory is normal. Moreover, these verification operations are all completed within the cloned system, avoiding operations on the real memory of the real system, which can effectively reduce memory consumption and wear.
[0069] 1053. If not, then the actual memory is determined to be in an abnormal state.
[0070] In this embodiment, before verifying the memory of the cloned system, the verification message needs to be decrypted and verified. Here, the verification is performed by the write address. Since the write address is generally unique, if the message information is maliciously tampered with, the write address needs to be known in advance and the cloned system needs to be entered through the copy system operation. Otherwise, it cannot be changed, thus improving the security of the verification.
[0071] In an embodiment of the present invention, a virtual environment is constructed by writing a preset verification message into a preset real memory. The currently running system is then copied within the virtual environment to obtain a cloned system. Through a preset mapping channel, memory information and clone verification messages in the cloned system are read to verify whether the clone verification message and the verification message in the real memory are consistent. The virtual system is used to perform detection on the real memory, reducing the number of times the real memory is operated on. At the same time, the real memory can be detected multiple times to ensure the integrity and security of the real memory to the greatest extent.
[0072] The memory inspection method in the embodiments of the present invention has been described above. The memory inspection apparatus in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 5 One embodiment of the memory inspection device in this invention includes:
[0073] 201. Preprocessing module, used to write the preset verification message into the preset real memory;
[0074] 202. Virtual Environment Construction Module, used to build virtual environments;
[0075] 203. A cloning module, used to copy the currently running system within the virtual environment to obtain a cloned system, wherein the copied content includes information from the real memory and the verification message to obtain a clone verification message;
[0076] 204. The first verification module is used to read the memory information and clone verification message in the cloning system through a preset mapping channel;
[0077] 205. The second verification module is used to verify whether the clone verification message and the real memory verification message are consistent.
[0078] In an embodiment of the present invention, ...
[0079] Another embodiment of the memory inspection device in this invention includes:
[0080] 201. Preprocessing module, used to write the preset verification message into the preset real memory;
[0081] 202. Virtual Environment Construction Module, used to build virtual environments;
[0082] 203. A cloning module, used to copy the currently running system within the virtual environment to obtain a cloned system, wherein the copied content includes information from the real memory and the verification message to obtain a clone verification message;
[0083] 204. The first verification module is used to read the memory information and clone verification message in the cloning system through a preset mapping channel;
[0084] 205. The second verification module is used to verify whether the clone verification message and the real memory verification message are consistent.
[0085] Optionally, prior to preprocessing module 201, the following can also be executed:
[0086] Write the address and verification bytes as message information;
[0087] The message information is asymmetrically encrypted to obtain a verification message.
[0088] Optionally, before cloning module 203, the following can be executed:
[0089] The integrity of the actual memory is checked.
[0090] Optionally, the mapping channel is a VPN-dedicated mapping channel.
[0091] Optionally, the second verification module 205 can also be specifically used for:
[0092] Determine whether the initial write address of the cloned verification message is consistent with the initial write address of the verification message in the real memory;
[0093] If so, the memory in the cloning system is then checked;
[0094] If not, then the actual memory is determined to be in an abnormal state.
[0095] Optionally, the "detecting the memory in the cloned system" step can also specifically perform the following:
[0096] The memory of the cloning system is divided into multiple detection zones;
[0097] Preset test data is written to each of the detection areas in the memory of the cloning system;
[0098] Reread the test data for each of the detection zones;
[0099] Determine whether the read test data is consistent with the test data before it was written;
[0100] If so, then the actual memory is determined to be in a normal state.
[0101] In an embodiment of the present invention, a virtual environment is constructed by writing a preset verification message into a preset real memory. The currently running system is then copied within the virtual environment to obtain a cloned system. Through a preset mapping channel, memory information and clone verification messages in the cloned system are read to verify whether the clone verification message and the verification message in the real memory are consistent. The virtual system is used to perform detection on the real memory, reducing the number of times the real memory is operated on. At the same time, the real memory can be detected multiple times to ensure the integrity and security of the real memory to the greatest extent.
[0102] above Figure 6 The memory inspection device in this embodiment of the invention is described in detail from the perspective of modular functional entities. The memory inspection device in this embodiment of the invention is described in detail from the perspective of hardware processing.
[0103] Figure 7This is a schematic diagram of a memory inspection device 300 provided in an embodiment of the present invention. The memory inspection device 300 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs), such as CPU 310, one or more processors, and memory 320, and one or more storage media 330 for storing application programs 333 or data 332, such as one or more mass storage devices. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the memory inspection device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the memory inspection device 300.
[0104] The memory inspection-based device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 7 The illustrated memory inspection device structure does not constitute a limitation on memory inspection-based devices, which may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0105] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the memory inspection method.
[0106] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0107] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device, such as a personal computer, server, or network device, to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0108] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A memory inspection method, characterized in that, The memory inspection method includes: Write the preset verification message into the preset real memory; Build a virtual environment; The currently running system is copied within the virtual environment to obtain a cloned system, wherein the copied content includes the information of the real memory and the verification message to obtain a clone verification message; The memory information and clone verification message in the cloning system are read through the preset mapping channel. Verify whether the cloned verification message and the real in-memory verification message are consistent; Before writing the preset verification message into the preset real memory, the following steps are also included: Write the address and verification bytes as message information; The message information is asymmetrically encrypted to obtain a verification message; Before replicating the currently running system within the virtual environment to obtain a cloned system, the process also includes: The integrity of the actual memory is checked; The mapping channel is a VPN-dedicated mapping channel; The step of verifying whether the cloned verification message and the real in-memory verification message are consistent includes: Determine whether the initial write address of the cloned verification message is consistent with the initial write address of the verification message in the real memory; If so, the memory in the cloning system is then checked; If not, then the actual memory is determined to be in an abnormal state.
2. The memory inspection method according to claim 1, characterized in that, The memory detection in the cloning system includes: The memory of the cloning system is divided into multiple detection zones; Preset test data is written to each of the detection areas in the memory of the cloning system; Reread the test data for each of the detection zones; Determine whether the read test data is consistent with the test data before it was written; If so, then the actual memory is determined to be in a normal state.
3. A memory inspection device, characterized in that, The memory inspection device includes: The preprocessing module is used to write the pre-set verification message into the pre-set real memory; The virtual environment building module is used to build virtual environments; The cloning module is used to copy the currently running system within the virtual environment to obtain a cloned system, wherein the copied content includes information from the real memory and the verification message to obtain a clone verification message. The first verification module is used to read the memory information and clone verification message in the cloning system through a preset mapping channel; The second verification module is used to verify whether the clone verification message and the real memory verification message are consistent. The memory inspection device further includes a message information module, which is used for: The message information is asymmetrically encrypted to obtain a verification message; The memory inspection device further includes a detection module, which is used for: The integrity of the actual memory is checked; The memory inspection device further includes a mapping channel module, which is used for: The mapping channel is a VPN-dedicated mapping channel; The memory inspection device further includes a judgment module, which is used for: Determine whether the initial write address of the cloned verification message is consistent with the initial write address of the verification message in the real memory; If so, the memory in the cloning system is then checked; If not, then the actual memory is determined to be in an abnormal state.
4. A memory inspection device, characterized in that, The memory inspection device includes: a memory and at least one processor, wherein the memory stores instructions and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the device to perform the memory inspection method as described in any one of claims 1-2.
5. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the memory inspection method as described in any one of claims 1-2.
Citation Information
Patent Citations
Memory inspection method and system
CN110990187A
Memory monitoring method, device and system of electric energy meter and storage medium
CN112559298A