Distributed system, related verification method, product, equipment and medium
By deploying virtual machines and verification devices in a distributed system, and exchanging verification information using data blocks, the problem of data verification in a distributed storage system is solved, and the automated verification and exception judgment of process files is realized.
Patent Information
- Application Number
- CN202412000470.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
AI Technical Summary
Distributed storage systems have limitations in data integrity, and it is difficult to accurately verify data in distributed systems.
A plurality of virtual machines and verification devices are deployed in a distributed system. By storing process files and verification information in the preset data blocks, the verification information is exchanged using the first and second data blocks. The verification device determines whether there is an abnormality in the target process file based on the verification results.
It realizes automated data verification, can accurately judge the abnormal situations of process files in distributed systems, and improves data integrity and reliability.
Smart Images

Figure CN119806751A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data interaction, and in particular to a distributed system, a data verification method for a distributed system, a computer program product, an electronic device and a non-volatile computer-readable storage medium. Background Art
[0002] The combination of virtualization technology and distributed storage provides a powerful solution for computing environments that require high scalability, flexibility, and reliability. Although distributed storage systems offer many advantages, such as high availability, scalability, and fault tolerance, they also have some limitations in terms of data integrity. How to accurately verify data in a distributed system has become one of the issues that need to be addressed. Summary of the invention
[0003] In view of the above problems, a distributed system, a data verification method for a distributed system, a computer program product, an electronic device and a non-volatile computer-readable storage medium are proposed to overcome the above problems or at least partially solve the above problems, including:
[0004] A distributed system, wherein a plurality of virtual machines and a verification device are deployed in the distributed system, wherein a process file of the virtual machine is stored in a preset data block, wherein the data block stores verification information of the process file, and the data block includes at least a first data block and a second data block;
[0005] The first data block is used to determine first verification information in the first data block where the target process file is located when a verification event for the target process file is triggered; and send the first verification information to a second data block other than the first data block in the distributed system;
[0006] The second data block is used to send second verification information for the target process file in the second data block to the first data block;
[0007] The verification device is used to determine whether there is an abnormality in the target process file in the first data block according to the verification results of the first data block and the second data block according to the first verification information and the second verification information.
[0008] Optionally, the first data block further includes at least one of the following:
[0009] The machine slot number of the target virtual machine where the first data block is located, the data file number of the target process file in the target virtual machine, and the target process file.
[0010] Optionally, the verification device is further used to locate the target process file according to information in the first data block when it is determined that there is an abnormality in the target process file in the first data block.
[0011] Optionally, the first data block includes a machine slot number of a target virtual machine where the first data block is located;
[0012] The verification device is used to determine the target virtual machine where the target process file is located according to the machine slot number of the target virtual machine; and determine the target computing node where the target virtual machine is located.
[0013] Optionally, the verification result includes a verification result corresponding to each data block, and the verification result includes a correct verification result or an incorrect verification result;
[0014] The verification device is used to determine the number of correct verification results and error verification results; based on the number of correct verification results and the number of error verification results, determine whether there is an abnormality in the target process file in the first data block.
[0015] Optionally, the verification device is used to determine that there is an abnormality in the target process file in the first data block when the number of correct verification results exceeds half of the sum of the number of correct verification results and the number of incorrect verification results; and to determine that there is an abnormality in the target process file in the first data block when the number of correct verification results does not exceed half of the sum of the number of correct verification results and the number of incorrect verification results.
[0016] Optionally, the verification device is further used to determine that there is an abnormality in the target second data block when there is a target second data block that has not been verified in response to the first verification information.
[0017] Optionally, the verification device is also used to create a third data block for a new virtual machine when the distributed system creates the new virtual machine, and store the process file of the new virtual machine and the third verification information of the process file of the new virtual machine in the third data block; and broadcast the third verification information to other data blocks except the third data block.
[0018] Optionally, the verification device is further used to write the machine position number of the new virtual machine, the data file number of the process file of the new virtual machine in the new virtual machine, and the process file of the new virtual machine into the third data block.
[0019] Optionally, the first data block is further used to determine current fourth verification information for the target process file; and update the initial first verification information stored in the first data block according to the fourth verification information.
[0020] Optionally, the verification device is further used to send deletion information for the first data block to a second data block other than the first data block in the distributed system when the first data block is deleted.
[0021] Optionally, the first data block is used to compare the first verification information and the second verification information, and generate a verification result based on the comparison result.
[0022] Optionally, the verification device is further configured to issue an alarm for the first data block when it is determined that there is an abnormality in the target process file in the first data block.
[0023] Optionally, the verification device is further configured to collect and store relevant information of the target process file when it is determined that there is an abnormality in the target process file in the first data block.
[0024] Optionally, the verification device is further used to determine whether to trigger a verification event for the target process file when a preset period ends.
[0025] The embodiment of the present invention further provides a data verification method for a distributed system, which is applied to the first data block as described above; the method comprises:
[0026] When a verification event for a target process file is triggered, determining first verification information in a first data block where the target process file is located;
[0027] Sending the first verification information to a second data block other than the first data block in the distributed system; and receiving second verification information for the target process file sent by the second data block;
[0028] A verification result is generated according to the first verification information and the second verification information.
[0029] Optionally, the method further comprises:
[0030] Determining current fourth verification information for the target process file in the first data block;
[0031] The initial first verification information stored in the first data block is updated according to the fourth verification information.
[0032] An embodiment of the present invention further provides a computer program product, including computer instructions, which, when executed by a processor, implement the data verification method of the distributed system as described above.
[0033] An embodiment of the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the data verification method of the distributed system as described above when executed by the processor.
[0034] An embodiment of the present invention further provides a non-volatile computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the data verification method of the distributed system as described above is implemented.
[0035] In an embodiment of the present invention, a plurality of virtual machines and verification devices are deployed in a distributed system, and a process file of the virtual machine is stored in a preset data block, and verification information of the process file is stored in the data block, and the data block includes at least a first data block and a second data block; the first data block is used to determine the first verification information in the first data block where the target process file is located when a verification event for the target process file is triggered; the first verification information is sent to the second data block other than the first data block in the distributed system; the second data block is used to send the second verification information for the target process file in the second data block to the first data block; the verification device is used to determine whether there is an abnormality in the target process file in the first data block according to the verification results of the first data block and the second data block according to the first verification information and the second verification information. Through the embodiment of the present invention, the verification of the process file in the distributed system can be automatically completed based on the data block. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0037] Figure 1 is a schematic diagram of the structure of a distributed system according to an embodiment of the present invention;
[0038] Figure 2a is a schematic diagram of the structure of a data block according to an embodiment of the present invention;
[0039] Figure 2b is a process flow chart of data updating according to an embodiment of the present invention;
[0040] Figure 2c is a schematic diagram of creating a new virtual machine according to an embodiment of the present invention;
[0041] Figure 2d is a flowchart of data verification steps in an embodiment of the present invention;
[0042] Figure 3 It is a flow chart of the steps of a data verification method of a distributed system according to an embodiment of the present invention;
[0043] Figure 4 is a schematic diagram of the structure of a computer program product according to an embodiment of the present invention;
[0044] Figure 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
[0045] Figure 6 It is a structural schematic diagram of a non-volatile computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] In order to verify the data in the distributed system, the embodiment of the present invention proposes a distributed system, such as Figure 1 As shown: multiple virtual machines and verification devices 110 can be deployed in the distributed system 10; wherein, the process files of the virtual machines can be stored in a preset data block 120, and the data block 120 can store verification information of the process files; in an embodiment of the present invention, the data block 120 can include at least a first data block 121 and a second data block 122.
[0048] The first data block 121 is used to determine the first verification information in the first data block 121 where the target process file is located when a verification event for the target process file is triggered; and send the first verification information to the second data block 122 in the distributed system 10 except the first data block 121;
[0049] The second data block 122 is used to send the second verification information for the target process file in the second data block 122 to the first data block 121;
[0050] The verification device 110 is used to determine whether there is an abnormality in the target process file in the first data block 121 according to the verification results of the first data block 121 and the second data block 122 according to the first verification information and the second verification information.
[0051] In the embodiment of the present invention, the process file is data that needs to be verified; it can be a log file, process file, data file, etc. generated by a process in a virtual machine, and the embodiment of the present invention does not limit this.
[0052] Exemplarily, one virtual machine may correspond to multiple process files, one data block 120 may store one process file; and one virtual machine may store multiple data blocks 120 .
[0053] Data block 120 is the basic unit of blockchain technology. Each data block 120 usually contains the following key elements:
[0054] Data: The actual data stored in the block, which can be transaction records, contract codes, identity information, etc.
[0055] Block Header: Contains metadata of the block, such as timestamp, hash value of the previous block, hash value of the current block, etc. The block header is a key part of the blockchain to ensure data integrity and order.
[0056] Hash value: Each block has a unique hash value, which is calculated by encrypting the data in the block header. The hash value is used to ensure the integrity of the block content, and the hash value of the current block will contain the hash value of the previous block, thus forming a chain structure.
[0057] Nonce: In some blockchain systems, a random number is included in the block header for the proof-of-work mechanism. Participants continuously adjust the random number to find a hash value that meets specific conditions to complete the block generation process.
[0058] Transaction list: A block usually contains a set of transaction records, which are records of various operations that occur on the blockchain, such as transfers, contract executions, etc.
[0059] The data block 120 ensures the security, transparency and immutability of the blockchain through the combination of the above elements. The creation of each new block requires the consensus mechanism of the nodes in the network to ensure that all nodes reach a consensus on the state of the blockchain.
[0060] In actual applications, the first data block 121 can determine the first verification information of the target process file in the first data block 121 when a verification event for the target process file stored therein is triggered; the first verification information can be used to verify the target process file. Specifically, the first verification information can be information generated based on the target process file and used to characterize the target process file. When the target process file changes, the first verification information will also change; by comparing the initial first verification information and the new first verification information, it can be determined whether there is an abnormality in the target process file.
[0061] Exemplarily, after determining the first verification information, the first data block 121 can send the first verification information to other data blocks 120 (hereinafter referred to as the second data block 122 for the convenience of subsequent description) in the distributed system 10 except the first data block 121, so as to verify the target process file.
[0062] After receiving the first verification information, the second data block 122 can determine the second verification information for the target process file stored in the second data block 122; the second verification information can be the verification information that the first data block 121 distributes the initial verification information for the target process file to the second data block 122 when creating the first data block 121. The second verification information in the second data block 122 will not change due to changes in the target process file in the first data block 121, so it is always the initial verification information of the target process file.
[0063] After obtaining the first verification information, the second data block 122 can verify the target process file based on the first verification information and the second verification information stored in the second data block 122 , and generate a verification result to send to the verification device 110 .
[0064] After obtaining the second verification information, the first data block 121 may also verify the target process file based on the first verification information and the second verification information stored by itself, and generate a verification result to send to the verification device 110 .
[0065] After obtaining the verification results for the target process file sent by the first data block 121 and the second data block 122, the verification device 110 can determine whether there is an abnormality in the target process file in the first data block 121 based on these verification results; illustratively, it can be determined whether there is an abnormality in the target process file in the first data block 121 based on each verification result.
[0066] In the embodiment of the present invention, a plurality of virtual machines and a verification device 110 are deployed in the distributed system 10, and the process files of the virtual machines are stored in a preset data block 120, and the verification information of the process files is stored in the data block 120, and the data block 120 at least includes a first data block 121 and a second data block 122; the first data block 121 is used to determine the first verification information in the first data block 121 where the target process file is located when a verification event for the target process file is triggered; the first verification information is sent to the second data block 122 other than the first data block 121 in the distributed system 10; the second data block 122 is used to send the second verification information for the target process file in the second data block 122 to the first data block 121; the verification device 110 is used to determine whether there is an abnormality in the target process file in the first data block 121 according to the verification results of the first data block 121 and the second data block 122 according to the first verification information and the second verification information. Through the embodiment of the present invention, the verification of the process file in the distributed system 10 can be automatically completed based on the data block 120.
[0067] In one embodiment of the present invention, the first data block 121 further includes at least one of the following:
[0068] The machine slot number of the target virtual machine where the first data block 121 is located, the data file number of the target process file in the target virtual machine, and the target process file.
[0069] In some feasible embodiments, in addition to the first verification information, the first data block 121 may also store one or more of the following information: the machine position number of the target virtual machine where the first data block 121 is located, the data file number of the target process file in the target virtual machine, and the target process file.
[0070] The machine number of the target virtual machine where the first data block 121 is located may refer to the machine number of the target virtual machine stored in the first data block 121 , which is unique in the distributed system 10 .
[0071] The data file number of the target process file in the target virtual machine may refer to the data file number of the target process file in the target virtual machine where the target process file is stored, and the data file number is unique in the target virtual machine.
[0072] The first data block 121 may also store data of the target process file. Figure 2a As shown, the first data block 121 may include: the machine position number of the target virtual machine where the first data block 121 is located, the data file number of the target process file in the target virtual machine, the verification information of all files stored in the first data block 121, and the data corresponding to all files.
[0073] like Figure 2b As shown, after a new data block is created, the verification information therein may be packaged and broadcast to other data blocks for confirmation, and other data blocks may update the verification information stored locally based on the received verification information.
[0074] In an embodiment of the present invention, the verification device 110 is further configured to locate the target process file according to information in the first data block 121 when it is determined that the target process file in the first data block 121 is abnormal.
[0075] In some feasible embodiments, when the verification device 110 determines that there is no abnormality in the target process file in the first data block 121, it can continue to detect other process files; when it is determined that there is an abnormality in the target process file in the first data block 121, the verification device 110 can locate the target process file in the distributed system 10 according to the information in the first data block 121, so as to perform troubleshooting and fault handling.
[0076] In one embodiment of the present invention, the first data block 121 may include the machine position number of the target virtual machine where the first data block 121 is located; the verification device 110 is used to determine the target virtual machine where the target process file is located according to the machine position number of the target virtual machine; and determine the target computing node where the target virtual machine is located.
[0077] In some feasible embodiments, when the first data block 121 includes the machine number of the target virtual machine where the first data block 121 is located, the verification device 110 can locate the target virtual machine where the abnormal target process file is stored based on the machine number of the target virtual machine.
[0078] In addition, the verification device 110 may further determine the target computing node where the target virtual machine is located, so as to perform troubleshooting and fault processing on the target virtual machine and the target computing node, which is not limited in the embodiment of the present invention.
[0079] In one embodiment of the present invention, the verification result includes the verification result corresponding to each data block 120, and the verification result includes a correct verification result or an incorrect verification result;
[0080] The verification device 110 is used to determine the verification result as the number of correct verification results and error verification results; based on the number of correct verification results and the number of error verification results, determine whether there is an abnormality in the target process file in the first data block 121.
[0081] In some feasible embodiments, the check results generated by the first data block 121 and the second data block 122 only include correct check results or incorrect check results.
[0082] After obtaining the verification results of each data block 120 for the target process file, the verification device 110 can first count and determine the number of correct verification results and incorrect verification results; then, based on the number of correct verification results and the number of incorrect verification results, it can further determine whether there is an abnormality in the target process file in the first data block 121.
[0083] In one embodiment of the present invention, the verification device 110 is used to determine that there is an abnormality in the target process file in the first data block 121 when the number of correct verification results exceeds half of the sum of the number of correct verification results and the number of incorrect verification results; when the number of correct verification results does not exceed half of the sum of the number of correct verification results and the number of incorrect verification results, it is used to determine that there is an abnormality in the target process file in the first data block 121.
[0084] In some feasible embodiments, the verification device 110 may calculate the sum of the number of correct verification results and the number of incorrect verification results; then, when the number of correct verification results exceeds the sum, the verification device 110 may determine that there may be an abnormality in the target process file in the first data block 121; conversely, if the number of correct verification results does not exceed the sum, the verification device 110 may determine that there is no abnormality in the target process file in the first data block 121.
[0085] In an embodiment of the present invention, the verification device 110 is further configured to determine that an abnormality exists in the target second data block 122 when there is a target second data block 122 that has not been verified in response to the first verification information.
[0086] In some feasible embodiments, during the verification process, if there is a target second data block 122 that has not been verified in response to the first verification information, the verification device 110 may also determine that there is an abnormality in the target second data block 122; at this time, a prompt may be given for the target second data block 122.
[0087] In one embodiment of the present invention, the verification device 110 is also used to create a third data block 120 for a new virtual machine when the distributed system 10 creates a new virtual machine, and store the process file of the new virtual machine and the third verification information of the process file of the new virtual machine in the third data block 120; and broadcast the third verification information to other data blocks 120 except the third data block 120.
[0088] In some feasible embodiments, when the distributed system 10 creates a new virtual machine, the verification device 110 can create a third data block 120 for the new virtual machine, and store the process file of the new virtual machine and the third verification information of the process file of the new virtual machine in the third data block 120.
[0089] At the same time, the verification device 110 can also broadcast the third verification information to other data blocks 120 in the distributed system 10 except the third data block 120, so that other data blocks 120 can store the third verification information, so that when performing subsequent verification, the file can be verified based on the original verification information to determine whether there is an abnormality.
[0090] For example, Figure 2c As shown, the existing virtual machines include virtual machine 0001, virtual machine 0002, virtual machine 0003 and virtual machine 0004; virtual machine 0001, virtual machine 0002, virtual machine 0003 and virtual machine 0004 respectively store data blocks 120 corresponding to different process files (for example: file AAAA, file BBBB, file CCCC, file DDDD, file EEEE, file FFFF, file GGGG, file KKKK); after creating a new virtual machine 0005, the data block 120 of virtual machine 005 can broadcast the verification information of the process file (file MMMM) stored therein to the data blocks 120 in virtual machines 0001, virtual machine 0002, virtual machine 0003 and virtual machine 0004.
[0091] In one embodiment of the present invention, the verification device 110 is further configured to write the machine slot number of the new virtual machine, the data file number of the process file of the new virtual machine in the new virtual machine, and the process file of the new virtual machine into the third data block 120 .
[0092] In some feasible embodiments, after creating the third data block 120, the verification device 110 may also write the machine position number of the new virtual machine, the data file number of the process file of the new virtual machine in the new virtual machine, and the process file of the new virtual machine into the third data block 120, so that when it is subsequently determined that there is an abnormality in the process file stored in the third data block 120, the file can be located.
[0093] In one embodiment of the present invention, the first data block 121 is also used to determine the current fourth verification information for the target process file; and the initial first verification information stored in the first data block 121 is updated according to the fourth verification information.
[0094] In some feasible embodiments, when the target process file changes, only the verification information in the first data block 121 stored therein is updated, so that the target process file can be subsequently verified based on the verification information that may have changed in the first data block 121 and the verification information that has never changed in the other second data block 122.
[0095] Specifically, the first data block 121 may also determine current fourth verification information for the target process file. The fourth verification information may be verification information generated based on the current and latest target process file in the first target data block 120 .
[0096] Then, the first data block 121 can update the initial first verification information stored in the first data block 121 according to the fourth verification information. Exemplarily, when the target process file has not changed, the first verification information in the first data block 121 is always the original verification information; when the target process file has changed, the first verification information in the first data block 121 is no longer the original verification information.
[0097] In one embodiment of the present invention, the verification device 110 is further configured to send deletion information for the first data block 121 to a second data block 122 other than the first data block 121 in the distributed system 10 when the first data block 121 is deleted.
[0098] In some feasible embodiments, the verification device 110 can also be used to notify the second data block 122 in the distributed system 10 other than the first data block 121 when the first data block 121 is deleted, so that the second data block 122 deletes the verification information about the target process file stored therein.
[0099] Specifically, the verification device 110 is also used to send deletion information for the first data block 121 to the second data block 122 other than the first data block 121 in the distributed system 10 when the first data block 121 is deleted; after receiving the deletion information, the second data block 122 can delete the verification information stored therein about the target process file.
[0100] In an embodiment of the present invention, the first data block 121 is used to compare the first verification information and the second verification information, and generate a verification result based on the comparison result.
[0101] In some feasible embodiments, the first data block 121 can verify the target process file by comparing the first verification information and the second verification information; specifically, if the first verification information is the same as the second verification information, a correct verification result can be generated; conversely, if the first verification information is different from the second verification information, an incorrect verification result can be generated.
[0102] In an embodiment of the present invention, the verification device 110 is further configured to issue an alarm for the first data block 121 when it is determined that the target process file in the first data block 121 is abnormal.
[0103] In some feasible embodiments, the verification device 110 may also issue an alarm prompt for the first data block 121 when determining that there is an abnormality in the target process file in the first data block 121, so as to troubleshoot and handle the target process file. Wherein, when issuing an alarm prompt, the location information corresponding to the target process file may be output, for example: the machine position number of the target virtual machine where the first data block 121 of the target process file is located, the data file number of the target process file in the target virtual machine, etc., which is not limited in the embodiment of the present invention.
[0104] In an embodiment of the present invention, the verification device 110 is further configured to collect and store relevant information of the target process file when it is determined that the target process file in the first data block 121 is abnormal.
[0105] In some feasible embodiments, the verification device 110 may also be used to collect and store relevant information of the target process file when determining that the target process file in the first data block 121 is abnormal, so as to subsequently troubleshoot and handle the target process file. The relevant information of the target process file may include the modification record and modification time of the target process file, and may also include the log file of the operation of the process corresponding to the target process file, etc., which is not limited in the embodiment of the present invention.
[0106] In one embodiment of the present invention, the verification device 110 is further configured to determine a verification event for triggering the target process file when a preset period ends.
[0107] In some feasible embodiments, verification can be set to be performed according to a preset period; specifically, the verification device 110 can determine that a verification event for the target process file is triggered when the preset period ends. At this time, the verification device 110 can verify the target process file and other process files, and the embodiment of the present invention does not limit this.
[0108] For example, Figure 2dAs shown, the distributed system can periodically verify the process file; specifically, it can first broadcast the verification to each data block, and determine whether each data block responds; if there is no response, it is determined that the data block is abnormal.
[0109] If the data block responds, all process files in the data block can be verified; during the verification, if the verification results of each data block represent that the verification information is consistent, it can be determined that the process file is complete and normal; otherwise, if it is not completely consistent, the problematic process file can be located.
[0110] Based on the above distributed system, an embodiment of the present invention further provides a data verification method for a distributed system, which can be applied to the first data block in the above distributed system. Figure 3 ;like Figure 3 As shown, the method may include the following steps:
[0111] Step 301: When a verification event for a target process file is triggered, first verification information in a first data block where the target process file is located is determined.
[0112] In actual applications, the first data block can determine the first verification information of the target process file in the first data block when a verification event for the target process file stored therein is triggered; the first verification information can be used to verify the target process file. Specifically, the first verification information can be information generated based on the target process file and used to characterize the target process file. When the target process file changes, the first verification information will also change; by comparing the initial first verification information and the new first verification information, it can be determined whether there is an abnormality in the target process file.
[0113] Step 302: Send first verification information to a second data block other than the first data block in the distributed system; and receive second verification information for the target process file sent by the second data block.
[0114] Exemplarily, after determining the first verification information, the first data block can send the first verification information to other data blocks (hereinafter referred to as second data blocks for the convenience of subsequent description) in the distributed system except the first data block, so as to verify the target process file.
[0115] After receiving the first verification information, the second data block can determine the second verification information for the target process file stored in the second data block; the second verification information can be the verification information that the first data block distributes the initial verification information for the target process file to the second data block when creating the first data block. The second verification information in the second data block will not change due to the change of the target process file in the first data block, so it is always the initial verification information of the target process file.
[0116] After obtaining the first verification information, the second data block can verify the target process file based on the first verification information and the second verification information stored by itself, and generate a verification result to send to the verification device.
[0117] After obtaining the second verification information, the first data block can also verify the target process file based on the first verification information and the second verification information stored by itself, and generate a verification result to send to the verification device.
[0118] Step 303: Generate a verification result according to the first verification information and the second verification information.
[0119] After obtaining the verification results for the target process file sent by the first data block and the second data block, the verification device can determine whether there is an abnormality in the target process file in the first data block based on these verification results; illustratively, it can be determined whether there is an abnormality in the target process file in the first data block based on each verification result.
[0120] In an embodiment of the present invention, the above method may further include the following steps:
[0121] Determine the current fourth verification information for the target process file in the first data block; and update the initial first verification information stored in the first data block according to the fourth verification information.
[0122] In some feasible embodiments, when the target process file changes, only the verification information in the first data block stored therein is updated, so that the target process file can be subsequently verified based on the verification information that may have changed in the first data block, and then the verification information in the other second data blocks that has never changed.
[0123] Specifically, the first data block may also determine current fourth verification information for the target process file, and the fourth verification information may be verification information generated based on the current and latest target process file in the first target data block.
[0124] Then, the first data block can update the initial first verification information stored in the first data block according to the fourth verification information. Exemplarily, when the target process file has not changed, the first verification information in the first data block is always the original verification information; when the target process file has changed, the first verification information in the first data block is no longer the original verification information.
[0125] In the embodiment of the present invention, when a verification event for a target process file is triggered, first verification information in a first data block where the target process file is located is determined; the first verification information is sent to a second data block other than the first data block in a distributed system; and second verification information for the target process file sent by the second data block is received; and a verification result is generated based on the first verification information and the second verification information. Through the embodiment of the present invention, the verification of process files in a distributed system can be automatically completed based on data blocks.
[0126] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0127] The embodiment of the present invention also provides a computer program product, such as Figure 4 As shown, the computer program product 4 includes computer instructions 401, and when the computer instructions 401 are executed by a processor, the above-mentioned data verification method of the distributed system is implemented.
[0128] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, the electronic device 5 includes a processor 501, a memory 502, and a computer program stored in the memory 502 and capable of running on the processor. When the computer program is executed by the processor, the above-mentioned distributed system data verification method is implemented.
[0129] The embodiment of the present invention also provides a non-volatile computer-readable storage medium, such as Figure 6 As shown, the non-volatile computer-readable storage medium 6 stores a computer program 601, and when the computer program 601 is executed by a processor, the above-mentioned data verification method for the distributed system is implemented.
[0130] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0131] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0132] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0133] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0136] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0137] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0138] The above provides a detailed introduction to a distributed system, a data verification method for a distributed system, a computer program product, an electronic device and a non-volatile computer-readable storage medium. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a general technician in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A distributed system, characterized in that: The distributed system is deployed with multiple virtual machines and verification devices, the process files of the virtual machines are stored in preset data blocks, the data blocks store verification information of the process files, and the data blocks include at least a first data block and a second data block; The first data block is used to determine first verification information in the first data block where the target process file is located when a verification event for the target process file is triggered; and send the first verification information to a second data block other than the first data block in the distributed system; The second data block is used to send second verification information for the target process file in the second data block to the first data block; The verification device is used to determine whether there is an abnormality in the target process file in the first data block according to the verification results of the first data block and the second data block according to the first verification information and the second verification information.
2. The distributed system according to claim 1, characterized in that: The first data block further includes at least one of the following: The machine slot number of the target virtual machine where the first data block is located, the data file number of the target process file in the target virtual machine, and the target process file.
3. The distributed system according to claim 2, characterized in that: The verification device is further used to locate the target process file according to the information in the first data block when it is determined that there is an abnormality in the target process file in the first data block.
4. The distributed system according to claim 3, characterized in that: The first data block includes a machine slot number of a target virtual machine where the first data block is located; The verification device is used to determine the target virtual machine where the target process file is located according to the machine slot number of the target virtual machine; and determine the target computing node where the target virtual machine is located.
5. The distributed system according to claim 1, characterized in that: The verification result includes the verification result corresponding to each data block, and the verification result includes a correct verification result or an incorrect verification result; The verification device is used to determine the number of correct verification results and incorrect verification results as verification results; According to the number of correct check results and the number of error check results, it is determined whether there is an abnormality in the target process file in the first data block.
6. The distributed system according to claim 5, characterized in that: The verification device is used to determine that there is an abnormality in the target process file in the first data block when the number of correct verification results exceeds half of the sum of the number of correct verification results and the number of incorrect verification results; When the number of correct verification results does not exceed half of the sum of the number of correct verification results and the number of incorrect verification results, it is determined that an abnormality exists in the target process file in the first data block.
7. The distributed system according to claim 1, characterized in that: The verification device is further configured to determine that an abnormality exists in a target second data block when there is a target second data block that has not been verified in response to the first verification information.
8. The distributed system according to claim 1, characterized in that: The verification device is also used to create a third data block for a new virtual machine when the distributed system creates the new virtual machine, and store the process file of the new virtual machine and the third verification information of the process file of the new virtual machine in the third data block; and broadcast the third verification information to other data blocks except the third data block.
9. The distributed system according to claim 8, characterized in that: The verification device is further used to write the machine position number of the new virtual machine, the data file number of the process file of the new virtual machine in the new virtual machine, and the process file of the new virtual machine into the third data block.
10. The distributed system according to claim 1, characterized in that: The first data block is also used to determine current fourth verification information for the target process file; and update the initial first verification information stored in the first data block according to the fourth verification information.
11. The distributed system according to claim 1, characterized in that: The verification device is further configured to send deletion information for the first data block to a second data block other than the first data block in the distributed system when the first data block is deleted.
12. The distributed system according to claim 1, characterized in that: The first data block is used to compare the first verification information and the second verification information, and generate a verification result based on the comparison result.
13. The distributed system according to any one of claims 1 to 12, characterized in that: The verification device is also used to issue an alarm for the first data block when it is determined that there is an abnormality in the target process file in the first data block.
14. The distributed system according to claim 13, characterized in that: The verification device is further configured to collect and store relevant information of the target process file when it is determined that an abnormality exists in the target process file in the first data block.
15. The distributed system according to claim 1, characterized in that: The verification device is also used to determine and trigger a verification event for the target process file when a preset period ends.
16. A data verification method for a distributed system, characterized in that: Applied to the first data block as claimed in any one of claims 1 to 15; the method comprises: When a verification event for a target process file is triggered, determining first verification information in a first data block where the target process file is located; Sending the first verification information to a second data block other than the first data block in the distributed system; and receiving second verification information for the target process file sent by the second data block; A verification result is generated according to the first verification information and the second verification information.
17. The method according to claim 16, characterized in that The method further comprises: Determining current fourth verification information for the target process file in the first data block; The initial first verification information stored in the first data block is updated according to the fourth verification information.
18. A computer program product, characterized in that It comprises computer instructions, which, when executed by a processor, implement the data verification method of the distributed system as claimed in any one of claims 16 to 17.
19. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for verifying data in a distributed system as claimed in any one of claims 16 to 17 is implemented.
20. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data verification method of the distributed system as described in any one of claims 16 to 17 is implemented.