Shared storage node state confirmation method, apparatus, device, and storage medium

By generating feedback character bits and hash values ​​on the primary storage node, the sharding index relationship of the shared storage node is found, and the status of the shared storage node is determined by comparing the character bits. This solves the problem of data modification and errors on the shared storage node, ensuring data integrity and the reliability of cloud storage.

CN115982105BActive Publication Date: 2025-11-18CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211666604.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2025-11-18
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

Shared storage nodes are not controlled by cloud storage service providers, making it impossible to determine whether data has been modified or exists in an abnormal state such as data errors.

Method used

The system randomly obtains file fragments from the primary storage node, generates feedback character bits, acquires the target hash value, finds the fragment index relationship, sends it to the target shared storage node to read the character to be verified, and compares the standard character with the character to be verified to determine the status of the shared storage node.

Benefits of technology

It enables effective verification of the status of shared storage nodes, ensuring data integrity, preventing data modification and errors, and improving the reliability of cloud storage services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115982105B_ABST
    Figure CN115982105B_ABST
Patent Text Reader

Abstract

The application provides a shared storage node state confirmation method and device, equipment and a storage medium, and belongs to the technical field of data storage. The method comprises the following steps: randomly obtaining any file and any shard, generating a feedback character bit according to the shard, obtaining a target hash value corresponding to the shard, finding a pre-stored shard index relationship corresponding to the shard to obtain a target shared storage node, sending the target hash value and the feedback character bit to the target shared storage node, so that the target shared storage node finds a shard corresponding to the target hash value and reads a to-be-verified character of the feedback character bit in the shard corresponding to the target hash value, receiving the to-be-verified character sent by the target shared storage node, reading a standard character of the feedback character bit in any shard, and determining whether the state of the target shared storage node is normal according to the standard character and the to-be-verified character. The method solves the problem that it is unable to determine whether a shared storage node has an abnormal state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and in particular to a method, apparatus, device, and storage medium for confirming the status of a shared storage node. Background Technology

[0002] With the continuous development of internet technology, more and more technologies can be realized through the internet. In the field of data storage, there has been a gradual shift from traditional local storage to cloud storage.

[0003] Currently, in existing technologies, cloud storage can either be provided by the cloud storage service provider itself, or the cloud storage service provider can requisition scattered shared storage nodes and store files in the form of fragments on the shared storage nodes.

[0004] However, the inventors have discovered that the existing technology has at least the following technical problems: the shared storage nodes are not controlled by the cloud storage service provider, which may lead to the problem that it is impossible to determine whether the shared storage nodes have abnormal states such as data modification or data errors. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for confirming the status of a shared storage node, in order to solve the problem of being unable to determine whether data has been modified or whether the data is incorrect.

[0006] Firstly, this application provides a method for addressing invalid storage, applied to a primary storage node, comprising: randomly obtaining any fragment of any file and generating a feedback character bit based on the fragment; obtaining a target hash value corresponding to the fragment; searching a pre-stored fragment index relationship based on the fragment to obtain a corresponding target shared storage node, wherein the fragment index relationship stores the correspondence between fragments and shared storage nodes; sending the target hash value and the feedback character bit to the target shared storage node, so that the target shared storage node searches for the fragment corresponding to the target hash value and reads the unverified character of the feedback character bit in the fragment corresponding to the target hash value; receiving the unverified character sent by the target shared storage node; reading the standard character of the feedback character bit in any fragment; and determining whether the status of the target shared storage node is normal based on the standard character and the unverified character.

[0007] In one possible implementation, generating a feedback character bit based on any slice includes: obtaining the number of characters in any slice; and generating a feedback character bit based on the number of characters.

[0008] In one possible implementation, generating a feedback character position based on the number of characters includes: generating a first random number that is greater than a preset value and less than or equal to the number of characters, and determining the first random number as the feedback character position.

[0009] In one possible implementation, generating a feedback character position based on the number of characters includes: generating a first random number and a second random number that are greater than a preset value and less than or equal to the number of characters; determining the smaller of the first random number and the second random number as the starting position of the feedback character position; and determining the larger of the first random number and the second random number as the ending position of the feedback character position, thereby obtaining the feedback character position.

[0010] In one possible implementation, the state of the target shared storage node is determined based on the standard character and the character to be verified, including: if the standard character and the character to be verified are the same, the state of the target shared storage node is determined to be normal; if the standard character and the character to be verified are different, the state of the target shared storage node is determined to be abnormal.

[0011] In one possible implementation, there are at least two target shared storage nodes; accordingly, after receiving the character to be verified sent by the target shared storage nodes, the method further includes: if the characters to be verified sent by all target shared storage nodes are the same, then the status of all target shared storage nodes is determined to be normal; if the character to be verified sent by any target shared storage node is different from the characters to be verified sent by the remaining target shared storage nodes, then the step of determining whether the status of any target shared storage node is normal is performed based on the character to be verified sent by any target shared storage node and the standard character.

[0012] In one possible implementation, after determining whether the target shared storage node is in a normal state, the method further includes: obtaining the target account corresponding to the target shared storage node, the last state confirmation time of the target account, and the current time; if the target shared storage node is in a normal state, then issuing the reward corresponding to the last state confirmation time up to the current time to the target account; if the target shared storage node is in an abnormal state, then not issuing the reward corresponding to the last state confirmation time up to the current time to the target account.

[0013] Secondly, this application provides a method for addressing invalid storage, applied to a target shared storage node. The target shared storage node is obtained by the primary storage node randomly acquiring any fragment of any file and searching a pre-stored fragment index relationship based on that fragment. The fragment index relationship stores the correspondence between fragments and shared storage nodes. The method includes: receiving a target hash value and a feedback character bit sent by the primary storage node, wherein the target hash value is acquired by the primary storage node and corresponds to any fragment, and the feedback character bit is generated by the primary storage node based on any fragment; searching for the fragment corresponding to the target hash value; reading the character to be verified from the feedback character bit in the fragment corresponding to the target hash value; and sending the character to be verified to the primary storage node, so that the primary storage node reads the standard character from the feedback character bit in any fragment, and determines whether the status of the target shared storage node is normal based on the standard character and the character to be verified.

[0014] Thirdly, this application provides a shared storage node status confirmation device, comprising: a character bit generation module, used to randomly obtain any fragment of any file and generate a feedback character bit based on any fragment; a hash value acquisition module, used to obtain a target hash value corresponding to any fragment; a node acquisition module, used to find the corresponding pre-stored fragment index relationship based on any fragment to obtain the corresponding target shared storage node, wherein the fragment index relationship stores the correspondence between fragments and shared storage nodes; a data sending module, used to send the target hash value and the feedback character bit to the target shared storage node, so that the target shared storage node can find the fragment corresponding to the target hash value and read the unverified character of the feedback character bit in the fragment corresponding to the target hash value; a character receiving module, used to receive the unverified character sent by the target shared storage node; a standard character reading module, used to read the standard character of the feedback character bit in any fragment; and a status determination module, used to determine whether the status of the target shared storage node is normal based on the standard character and the unverified character.

[0015] Fourthly, this application provides a shared storage node status confirmation device, comprising: a character bit receiving module, used to receive a target hash value and a feedback character bit sent by a master storage node, wherein the target hash value is obtained by the master storage node and corresponds to any shard, and the feedback character bit is generated by the master storage node based on any shard, wherein any shard is any shard of any file randomly obtained by the master storage node; a shard lookup module, used to look up the shard corresponding to the target hash value; a character to be verified reading module, used to read the character to be verified in the feedback character bit of the shard corresponding to the target hash value; and a character to be verified sending module, used to send the character to be verified to the master storage node, so that the master storage node reads the standard character of the feedback character bit in any shard, and determines whether the status of the target shared storage node is normal based on the standard character and the character to be verified, wherein the target shared storage node is obtained by the master storage node by looking up the corresponding pre-stored shard index relationship based on any shard, and the shard index relationship stores the correspondence between shards and shared storage nodes.

[0016] Fifthly, this application provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to execute the shared storage node status confirmation method as described in the first or second aspect.

[0017] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the shared storage node status confirmation method as described in the first or second aspect.

[0018] The shared storage node status verification method, apparatus, device, and storage medium provided in this application obtain a fragment and, based on the fragment acoustic field feedback character bit, obtain the target hash value corresponding to the fragment. They then search the fragment index relationship to find the target shared storage node corresponding to any fragment, and send the target hash value and feedback character bit to the target shared storage node. The target shared storage node finds the fragment corresponding to the target hash value and the character to be verified corresponding to the feedback character bit in that fragment. The main storage node receives the character to be verified, compares it with the standard character corresponding to the feedback character bit stored in its own memory, and determines whether the status of the target shared storage node is normal based on the standard character and the character to be verified. This process verifies the shared storage node status by comparing the standard character of the fragment stored in the main storage node with the character to be verified of the fragment stored in the target shared storage node to determine whether the fragment has been modified. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] Figure 1 A schematic diagram illustrating an application scenario for the shared storage node status confirmation method provided in this embodiment of the application;

[0021] Figure 2 A flowchart illustrating the shared storage node status confirmation method provided in this application embodiment. Figure One ;

[0022] Figure 3 A flowchart illustrating the shared storage node status confirmation method provided in this application embodiment. Figure Two ;

[0023] Figure 4 A schematic diagram of the interaction flow of the shared storage node status confirmation method provided in the embodiments of this application;

[0024] Figure 5 Schematic diagram of the shared storage node status verification device provided in the embodiments of this application Figure One ;

[0025] Figure 6 Schematic diagram of the shared storage node status verification device provided in the embodiments of this application Figure Two ;

[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0027] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0028] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0029] With the gradual development of internet technology, data storage is increasingly shifting from local hardware to cloud storage. Currently, cloud storage can be centralized in storage space provided by cloud storage service providers, or it can be stored on scattered shared storage nodes requisitioned by cloud storage service providers.

[0030] Scattered shared storage nodes can be users' mobile phones, computers, etc., and are not controlled by cloud storage service providers. Although clients may be installed on scattered shared storage nodes, the clients may be tampered with, or data may be changed due to hardware failures or other issues, causing the originally stored data to be altered and losing its meaning, thus rendering the shared storage nodes invalid.

[0031] This application is applied to scenarios involving the confirmation of the status of shared storage nodes. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0032] Figure 1 This is a schematic diagram illustrating an application scenario for the shared storage node status confirmation method provided in this application embodiment. For example... Figure 1 In this scenario, the nodes include: primary storage node 101 and shared storage node 102.

[0033] In the specific implementation process, the main storage node 101 can be a separate database or a separate server, or it can be implemented using a cluster of one or more servers with more powerful processing capabilities and higher security. Where possible, the server can also be connected to the database as a whole to increase storage capacity.

[0034] Shared storage node 102 may include computers, servers, tablets, mobile phones, PDAs (Personal Digital Assistants), and laptops, etc., which can perform data transmission and storage. In one possible implementation, shared storage node 102 may also be a database. There may be multiple shared storage nodes 102. The connection between the primary storage node 101 and shared storage node 102 can be via a wired network or a wireless network.

[0035] The primary storage node 101 is used to obtain a fragment of any file, obtain the hash value of the fragment, generate a feedback character bit, and send the hash value and feedback character bit to the target shared storage node that stores the fragment in all shared storage nodes 101. The target shared storage node finds the corresponding fragment based on the hash value, reads the character in the feedback character bit of the fragment, and sends the character in the feedback character bit to the primary storage node 101. The primary storage node 101 reads the character in the feedback character bit from the fragment it stores, and combines it with the character sent by the target shared storage node to determine whether the status of the target shared storage node is normal.

[0036] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the shared storage node status confirmation method. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here. Figure 1 The scenario shown can be implemented by hardware, software, or a combination of both.

[0037] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0038] Figure 2 A flowchart illustrating the shared storage node status confirmation method provided in this application embodiment. Figure One The execution entity of this application embodiment can be Figure 1The primary storage node 101 can also be a database, etc., and this embodiment does not impose any particular restrictions on it. Figure 2 As shown, the method includes:

[0039] S201: Randomly obtain any fragment of any file, and generate feedback character bits based on any fragment.

[0040] In this step, the process could involve responding to a confirmation status command input or sent by a staff member, randomly acquiring any fragment of any file, periodically acquiring any fragment of any file, or identifying an account to be confirmed and acquiring a fragment of any file assigned to that account. Based on any fragment, a feedback character is generated. This can be done by inputting the total number of bytes in the fragment into a preset program or script, where the feedback character can be less than the total number of bytes in the fragment.

[0041] For example, if there are files 1, 2, and 3, file 1 is divided into fragments F11 and F12, file 2 is divided into fragments F21, F22, and F23, and file 3 is divided into fragments F31, F32, F33, and F34, you can select any fragment of any file.

[0042] For example, if it's necessary to periodically check the status of shared storage nodes corresponding to all accounts, then the accounts corresponding to unchecked shared storage nodes are identified as accounts to be checked. The correspondence between the accounts to be checked and the storage file fragments is found, resulting in all fragments corresponding to the accounts to be checked. Any fragment is then selected from these fragments. The correspondence between the accounts to be checked and the storage file fragments can be established and stored during file storage. Specifically, for example, if account A to be checked stores fragment 1 of file a, fragment 3 of file b, and fragments 1 and 3 of file c, then one fragment is randomly selected.

[0043] S202: Get the target hash value corresponding to any shard.

[0044] In this step, the target hash value can be obtained by either finding the pre-stored correspondence between any shard and its hash value, or by calculating the target hash value corresponding to any shard.

[0045] The correspondence between shards and hash values ​​can be stored in the form of tables, dictionaries, key-value pairs, etc.

[0046] S203: Based on any shard, find the corresponding pre-stored shard index relationship to obtain the corresponding target shared storage node, wherein the shard index relationship stores the correspondence between shards and shared storage nodes.

[0047] In this step, the shard index relationship can also be stored in the form of tables, dictionaries, key-value pairs, etc.

[0048] In one possible implementation, the shard index relationship in this step and the correspondence between shards and hash values ​​in step S202 can be stored in the form of the same shard index relationship table, as shown in Table 1. The number of shards and shared storage nodes in Table 1 can be more or less, and this application embodiment does not impose any restrictions on this.

[0049] Table 1. Slice Index Relationship Table (Illustrative)

[0050] File 1 SS1 SS2 SS3 SS4 F1 Hash1 Hash1 F2 Hash2 Hash2 F3 Hash3 Hash3

[0051] As shown in Table 1, "File 1" in the upper left corner indicates which file corresponds to this shard index table. F1, F2, and F3 represent three different shards, each corresponding to three hash values: Hash1, Hash2, and Hash3. The shared storage node SS1 stores Hash2 and Hash3 corresponding to F2 and F3, the shared storage node SS2 stores Hash1 and Hash3, the shared storage node SS3 stores Hash2, and the shared storage node SS4 stores Hash1. To find the shared storage node corresponding to a shard, for example, if F2 corresponds to Hash2, and shared storage nodes SS1 and SS3 have Hash2 values, then SS1 and SS3 are the shared storage nodes corresponding to F2. Other cases follow the same logic.

[0052] The above index relationship can be established when storing files. For example, when storing files, if the F4 shard is stored in the SS2 shared storage node, then the hash value Hash4 of F4 is calculated and stored in the cell corresponding to the row of shard F4 and the corresponding column of shared storage node SS2.

[0053] S204: Send the target hash value and feedback character bit to the target shared storage node so that the target shared storage node can find the fragment corresponding to the target hash value and read the unverified character bit of the feedback character bit in the fragment corresponding to the target hash value.

[0054] In this step, the feedback character can be sent via a wired network or a wireless network. The wireless network connection can include various types of wired and wireless networks, such as, but not limited to: the Internet, local area network, Wireless Fidelity (WIFI), Wireless Local Area Networks (WLAN), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), 2G / 3G / 4G / 5G cellular networks, satellite communication networks, etc.

[0055] S205: Receive the verification character sent by the target shared storage node.

[0056] In this step, the character to be verified can be received via a wired or wireless network as described in step S204 above. The character to be verified can be one character or multiple characters. If the feedback character position is one character, then the character to be verified is one character; if the feedback character position is at least two character positions, then the character to be verified is at least two corresponding characters.

[0057] S206: Read the standard character of the feedback character position in any slice.

[0058] In this step, the character located at the feedback character position in any of the above segments can be determined as the standard character.

[0059] For example, if the feedback character position is the 7562nd position, then the 7562nd character in any of the above segments is determined as a standard character. If the 7562nd character is 'f', then 'f' is determined as a standard character. If the feedback character position is the 7562nd position, then characters from the 7562nd to the 7672nd position in any of the above segments are determined as standard characters. If characters from the 7562nd to the 7672nd position are 'fysigTH124t', then 'fysigTH124t' is determined as a standard character. This application does not limit the specific value of the feedback character position in its embodiments.

[0060] S207: Determine whether the target shared storage node is in normal condition based on the standard characters and the characters to be verified.

[0061] In this step, the status of the target shared storage node can be determined by whether the standard characters and the characters to be verified are the same.

[0062] In one possible implementation, this step involves determining whether the target shared storage node is in a normal state based on the standard character and the character to be verified, including:

[0063] S207A: If the standard character is the same as the character to be verified, then the target shared storage node is determined to be in a normal state.

[0064] In this step, for example, if both the standard character and the character to be verified are 'A', then the target shared storage node is determined to be in a normal state. As another example, if both the standard character and the character to be verified are 'af72c', then the target shared storage node is determined to be in a normal state.

[0065] S207B: If the standard character is different from the character to be verified, the state of the target shared storage node is determined to be abnormal.

[0066] In this step, for example, if the standard character is 761fg and the character to be verified is 761cv, then the target shared storage node's status is abnormal. Similarly, if the standard character is 7 and the character to be verified is 1, then the target shared storage node's status is abnormal.

[0067] This application does not limit the specific content of the standard characters and the characters to be verified in the embodiments.

[0068] As described in the above embodiments, this application embodiment obtains a fragment and, based on the fragment's sound field feedback character bit, obtains the target hash value corresponding to the fragment. It then searches the fragment index relationship to obtain the target shared storage node corresponding to any fragment, and sends the target hash value and feedback character bit to the target shared storage node. The target shared storage node then finds the fragment corresponding to the target hash value and the character to be verified corresponding to the feedback character bit in that fragment. The main storage node receives the character to be verified, compares it with the standard character corresponding to the feedback character bit stored in its own memory, and determines whether the state of the target shared storage node is normal based on the standard character and the character to be verified. This process achieves the verification of the shared storage node's state by comparing the standard character of the fragment stored in the main storage node with the character to be verified of the fragment stored in the target shared storage node to determine whether the fragment has been modified, thereby judging whether the state of the target shared storage node is normal.

[0069] In one possible implementation, in step S201 above, generating feedback character bits based on any fragment includes:

[0070] S2011: Get the number of characters in any slice.

[0071] In this step, any segment can be input into a preset character counting script or program to obtain the character count of that segment. This script or program can be pre-set by the operator. Alternatively, a preset command can be used to obtain the character count of any segment. The character count can be the total number of characters in the segment.

[0072] S2012: Generate feedback character positions based on the number of characters.

[0073] In this step, a feedback character position less than the number of characters can be generated. This feedback character position can be a single character or a range of characters. Alternatively, the number of characters can be multiplied by a fixed value and rounded down to obtain the feedback character position, where the fixed value is preset by the staff.

[0074] For example, if any of the above segments contains 65930 characters, then a number less than or equal to 65930 will be generated as the feedback character position. As another example, if any of the above segments contains 574 characters, then a range of numbers less than 574 will be generated as the feedback character position. Alternatively, a character position less than the number of characters can be selected from a preset set of character positions as the feedback character position. For yet another example, multiplying the segment's character count of 4757 by a fixed value of 0.5 and rounding down yields 2379, which will be determined as the feedback character position.

[0075] In one possible implementation, step S2012 above, generating the feedback character position based on the number of characters, includes:

[0076] S2012A: Generate a first random number that is greater than a preset value and less than or equal to the number of characters, and determine the first random number as the feedback character position.

[0077] In this step, the random number can be generated by inputting a number of characters into a preset script. The preset value can be 0, 1, or any value pre-set by the operator. For example, if the number of characters is 8709 and the preset value is 1, then a random number greater than 1 and less than 8709 will be generated as the feedback character. As another example, if the number of characters is 5463 and the preset value is 0, then a random number greater than 0 and less than 5463 will be generated as the feedback character. And so on. This embodiment of the application does not impose specific limitations on the number of characters or the preset value.

[0078] In one possible implementation, the feedback character bits are generated based on the number of characters, including:

[0079] S2012B: Generate a first random number and a second random number that are greater than a preset value and less than or equal to the number of characters. Determine the smaller of the first random number and the second random number as the starting position of the feedback character position, and determine the larger of the first random number and the second random number as the ending position of the feedback character position to obtain the feedback character position.

[0080] In this step, the method for generating random numbers is similar to that in step S2012A above, and will not be repeated here. In this step, two random numbers are generated. If the two random numbers are the same, then the content of step S2012A above can be executed.

[0081] For example, if the number of characters is 57219, and two random numbers 746 and 937, which are less than or equal to 57219, are generated, then 746 is determined as the starting position of the feedback character position, and 937 is determined as the ending position of the feedback character position. The feedback character position is from position 746 to position 937. This application does not limit the specific number of bits in the feedback character position.

[0082] As described in the above embodiments, this application's embodiments obtain the number of characters in any fragment and generate feedback character positions based on that number. This ensures that feedback character positions are generated within a certain range, allowing subsequent target shared storage nodes to extract characters from the feedback character positions as characters to be verified. Furthermore, by generating a random number, the feedback character positions become unpredictable, increasing security. By generating two random numbers to form an interval as the feedback character positions, the characters extracted by the target shared storage node from the feedback character positions are less likely to be the same as the standard characters extracted by the primary storage node, increasing the accuracy of verification.

[0083] In one possible implementation, there are at least two target shared storage nodes.

[0084] Accordingly, after receiving the character to be verified sent by the target shared storage node in step S205 above, the method further includes:

[0085] S210: If the characters to be verified sent by all target shared storage nodes are the same, then the status of all target shared storage nodes is determined to be normal.

[0086] In this step, there are at least two target storage nodes, so there are at least two characters to be verified. At this time, we compare whether these at least two characters to be verified are the same. If they are the same, then the status of all target shared storage nodes is normal.

[0087] For example, if the current target storage nodes are SS1, SS2, SS3, and SS4, and the characters to be verified sent by these four target storage nodes are all "sbif8s", then the status of these four target storage nodes is determined to be normal.

[0088] S211: If the character to be verified sent by any target shared storage node is different from the characters to be verified sent by the remaining target shared storage nodes, then the step of determining whether the status of any target shared storage node is normal is executed based on the character to be verified and the standard character sent by any target shared storage node.

[0089] In this step, the character to be verified sent by any target shared storage node is different from the characters to be verified sent by the remaining target shared storage nodes, including: the character to be verified sent by any target shared storage node is different from the characters to be verified sent by the remaining target shared storage nodes, and the character to be verified sent by any target shared storage node is different from the characters to be verified sent by any remaining target shared storage node.

[0090] The step of determining whether the status of any target shared storage node is normal based on the verification character and standard character sent by any target shared storage node can be steps S206 and S207 above, and the above target shared storage node is used as the target shared storage node in steps S206 and S207, thereby determining whether the status of any target shared storage node is normal.

[0091] For example, if the current target storage nodes are SS1, SS2, SS3, and SS4, and the characters to be verified sent by these four target storage nodes are "sbif8s", "sbif8d", "sbef8s", and "sbef8s" respectively, then the characters to be verified for SS1 and SS2 are different from those of the other shared storage nodes, while the characters to be verified for SS3 and SS4 are the same. Based on the characters to be verified for SS1, SS2, and SS3 respectively, and the standard character, the status of SS1, SS2, and SS3 can be determined as normal or abnormal. If any one is normal, the remaining two are abnormal. Alternatively, based on the characters to be verified for SS1, SS2, and SS4 respectively, and the standard character, the status of SS1, SS2, and SS4 can be determined as normal or abnormal. If any one is normal, the remaining two are abnormal. Alternatively, the status of the two target shared storage nodes, SS3 and SS4, which return the same characters to be verified, can be assumed to be normal, while the status of the two shared storage nodes, SS1 and SS2, whose characters to be verified are different from those of the other target shared storage nodes, can be determined to be abnormal.

[0092] For example, if the current target storage nodes are SS1 and SS2, and the characters to be verified sent by these two target storage nodes are "1" and "0" respectively, then the status of SS1 is determined based on the standard character and the character to be verified "1", and the status of SS2 is determined based on the standard character and the character to be verified "0".

[0093] As can be seen from the description of the above embodiments, the embodiments of this application, after receiving the characters to be verified sent by at least two target shared storage nodes, determine that the state of the target shared storage node is normal by comparing and determining that the characters to be verified are the same. If the characters to be verified are different, the state of the target shared storage node is determined by comparing the characters to be verified with the standard characters. By comparing the characters to be verified sent by the target shared storage nodes, the comparison between the characters to be verified and the standard characters can be reduced, which reduces the process of obtaining the standard characters and reduces the amount of computation.

[0094] In one possible implementation, after determining whether the target shared storage node is in a normal state in step S207 above, the method further includes:

[0095] S212: Obtain the target account corresponding to the target shared storage node, the last status confirmation time of the target account, and the current time.

[0096] In this step, obtaining the target account corresponding to the target shared storage node can be done by searching for the target account in a pre-defined mapping between shared storage nodes and accounts. This mapping can be established when the account is created or when data is stored on the shared storage node. The last status confirmation time can be the timestamp obtained and stored after the last status confirmation of the target shared storage node. The current time can be obtained by retrieving the timestamp.

[0097] S213: If the target shared storage node is in normal status, then issue the reward corresponding to the time from the last status confirmation to the current time to the target account.

[0098] In this step, the reward can be distributed by modifying the data corresponding to the target account. The reward value can be obtained by inputting a preset program or script based on the time difference between the last status confirmation time and the current time, or it can be obtained based on the correspondence between the time difference and the reward.

[0099] For example, if the target shared storage node A is in a normal state and the last status confirmation time was 5 days ago, then the reward value is obtained based on the preset script input 5 days ago, or the reward value corresponding to 5 days is found in the correspondence between time difference and reward, and the reward value is added to the target account.

[0100] S214: If the target shared storage node is in an abnormal state, the reward corresponding to the time from the last status confirmation to the current time will not be issued to the target account.

[0101] In this step, no data will be changed in the target account if no reward is issued.

[0102] As can be seen from the description of the above embodiments, the embodiments of this application obtain the target account corresponding to the target shared storage node, the last status confirmation time of the target account, and the current time. The target account corresponding to the target shared storage node with a normal status is given a reward from the last status confirmation time to the current time, while the target account corresponding to the target shared storage node with an abnormal status is not given a reward from the last status confirmation time to the current time. This realizes the incentive for the target shared storage node account and increases the stability of the target shared storage node.

[0103] In one possible implementation, the primary storage node randomly finds a fragment corresponding to a file, such as fragment F2 of File1. It then generates a random number N (N ≤ the number of bytes in the fragment), finds the shared storage nodes SS1 and SS3 corresponding to F2 in the fragment index table, and sends the hash value Hash2 of F2 and the random number N to the socially distributed shared storage nodes SS1 and SS2. Upon receiving the hash value, shared storage nodes SS1 and SS3 search their stored hash values ​​to find F2 corresponding to Hash2, and retrieve the Nth byte of data from F2, returning it to the primary storage node. The primary storage node compares the two data returned by shared storage nodes SS1 and SS3. If they match, it proves that both shared storage nodes have stored the correct data, and the process ends. If they do not match, it indicates that at least one socially distributed shared storage node has a problem. The primary storage node then retrieves fragment 2 from its stored complete File1 data and compares the Nth byte with the data returned by the two socially distributed shared storage nodes. If inconsistent, fragmented shared storage nodes are not verified, they will be considered invalid online and no corresponding reward will be given.

[0104] In one possible implementation, the primary storage node randomly selects a socially dispersed shared storage node, such as shared storage node SS3, and queries the shard index table for the stored shard, such as F2. It then randomly selects a random number N (N ≤ the number of bytes in the shard) and sends the hash value Hash2 of F2 and the random number N to shared storage node SS3. Shared storage node SS3 finds the F2 shard based on the hash value Hash2 and returns the Nth byte of data from the F2 shard to the primary storage node. The primary storage node compares the returned data with the Nth byte of data from F2 that it has stored. If they match, the socially dispersed shared storage node SS3 is considered validly online (normal status) for this period; otherwise, it is considered invalidly online (abnormal status). If validly online, a corresponding reward is given from the last judgment time to the current period; otherwise, no reward is given.

[0105] In summary, this application's embodiment primarily involves the cloud storage service provider randomly requesting a specific byte of data from a file fragment belonging to a user from the primary storage node. After the data is returned, the cloud storage service provider can compare it with its own stored data, or multiple shared storage nodes storing the same fragment can compare it. If they are inconsistent, the data is then compared with the data stored on the primary storage node. This ensures the correctness of data storage regardless of the client used by the shared storage nodes. If an error occurs, all storage revenue for the current period is deducted. Using this patented method, the effectiveness of scattered shared storage nodes requisitioned by the cloud storage service provider in being online (whether data has changed, whether the status is abnormal) can be quickly determined, which is beneficial to the application and development of cloud storage services.

[0106] Figure 3 A flowchart illustrating the shared storage node status confirmation method provided in this application embodiment. Figure Two The execution entity of this application embodiment may be in Figure 1 The target shared storage node is selected from the shared storage nodes in the system. The target shared storage node is obtained by randomly obtaining any fragment of any file from the primary storage node and looking up the corresponding pre-stored fragment index relationship based on that fragment. The fragment index relationship stores the correspondence between fragments and shared storage nodes. The method includes:

[0107] S301: Receive the target hash value and feedback character bits sent by the primary storage node, wherein the target hash value is obtained by the primary storage node and corresponds to any shard, and the feedback character bits are generated by the primary storage node based on any shard.

[0108] In this step, reception can be achieved via a wired or wireless network.

[0109] S302: Find the shard corresponding to the target hash value.

[0110] In this step, a preset program or script can be used to find the shard corresponding to the target hash value. Alternatively, the mapping between hash values ​​and shards can be found based on the target hash value to obtain the shard corresponding to the target hash value. Alternatively, a preset command can be used to read the shard corresponding to the target hash value. The preset program or script, the mapping between hash values ​​and shards, and the preset command can all be system-provided, pre-set by staff, or pre-generated.

[0111] S303: Read the character to be verified from the feedback character position in the slice corresponding to the target hash value.

[0112] This step is similar to step S206 above, and will not be repeated here.

[0113] S304: Send the character to be verified to the primary storage node so that the primary storage node can read the standard character of the feedback character position in any fragment, and determine whether the status of the target shared storage node is normal based on the standard character and the character to be verified.

[0114] In this step, the character to be verified can be sent either via wired or wireless means.

[0115] As can be seen from the description of the above embodiments, the embodiments of this application receive the target hash value and feedback character bit sent by the main storage node, thereby finding the fragment corresponding to the target hash value, reading the character to be verified in the feedback character bit of the fragment corresponding to the target hash value, and sending the character to be verified to the main storage node. This enables the main storage node to determine whether the status of the target storage node is normal based on the standard character and the character to be verified, thus completing the verification of the status of the shared storage node and avoiding invalid storage such as data modification.

[0116] Figure 4 This is a schematic diagram of the interaction flow of the shared storage node status confirmation method provided in an embodiment of this application. Figure 4 As shown, the method includes:

[0117] S401: The primary storage node randomly obtains any fragment of any file and generates a feedback character bit based on any fragment.

[0118] S402: The primary storage node retrieves the target hash value corresponding to any shard.

[0119] S403: The primary storage node finds the corresponding pre-stored shard index relationship based on any shard to obtain the corresponding target shared storage node, wherein the shard index relationship stores the correspondence between shards and shared storage nodes.

[0120] S404: The primary storage node sends the target hash value and feedback character bits to the target shared storage node.

[0121] S405: The target shared storage node finds the shard corresponding to the target hash value and reads the character to be verified from the feedback character position in the shard corresponding to the target hash value.

[0122] S406: The target shared storage node sends the character to be verified to the primary storage node.

[0123] S407: The primary storage node reads the standard character from any shard, which is the feedback character bit.

[0124] S408: The primary storage node determines whether the target shared storage node is in normal condition based on the standard characters and the characters to be verified.

[0125] Figure 5Schematic diagram of the shared storage node status verification device provided in the embodiments of this application Figure One .like Figure 5 As shown, the shared storage node status confirmation device 500 includes: a character bit generation module 501, a hash value acquisition module 502, a node acquisition module 503, a data sending module 504, a character receiving module 505, a standard character reading module 506, and a status determination module 507.

[0126] The character bit generation module 501 is used to randomly obtain any segment of any file and generate feedback character bits based on any segment.

[0127] The hash value acquisition module 502 is used to obtain the target hash value corresponding to any shard.

[0128] The node acquisition module 503 is used to find the corresponding pre-stored shard index relationship based on any shard to obtain the corresponding target shared storage node, wherein the shard index relationship stores the correspondence between shards and shared storage nodes.

[0129] The data sending module 504 is used to send the target hash value and the feedback character bit to the target shared storage node, so that the target shared storage node can find the fragment corresponding to the target hash value and read the unverified character bit of the feedback character bit in the fragment corresponding to the target hash value.

[0130] The character receiving module 505 is used to receive the characters to be verified sent by the target shared storage node.

[0131] The standard character reading module 506 is used to read the standard character of the feedback character position in any slice.

[0132] The status determination module 507 is used to determine whether the status of the target shared storage node is normal based on the standard characters and the characters to be verified.

[0133] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0134] In one possible implementation, the character bit generation module 501 is specifically used to obtain the number of characters in any slice. Feedback character bits are then generated based on the character count.

[0135] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0136] In one possible implementation, the character bit generation module 501 is specifically used to generate a first random number that is greater than a preset value and less than or equal to the number of characters, and to determine the first random number as the feedback character bit.

[0137] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0138] In one possible implementation, the character position generation module 501 is specifically used to generate a first random number and a second random number that are greater than a preset value and less than or equal to the number of characters, determine the smaller of the first random number and the second random number as the starting position of the feedback character position, and determine the larger of the first random number and the second random number as the ending position of the feedback character position, thereby obtaining the feedback character position.

[0139] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0140] In one possible implementation, the state determination module 507 is specifically used to determine that the state of the target shared storage node is normal if the standard character is the same as the character to be verified, and to determine that the state of the target shared storage node is abnormal if the standard character is different from the character to be verified.

[0141] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0142] In one possible implementation, there are at least two target shared storage nodes. The shared storage node status verification device 500 also includes a lateral comparison module 508.

[0143] The horizontal comparison module 508 is used to determine that the status of all target shared storage nodes is normal if the characters to be verified sent by all target shared storage nodes are the same. If the characters to be verified sent by any target shared storage node are different from the characters to be verified sent by the remaining target shared storage nodes, then the step of determining whether the status of any target shared storage node is normal is executed based on the characters to be verified sent by any target shared storage node and the standard characters.

[0144] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0145] In one possible implementation, the shared storage node status confirmation device 500 further includes a reward distribution module 509.

[0146] The reward distribution module 509 is used to obtain the target account corresponding to the target shared storage node, the target account's last status confirmation time, and the current time. If the target shared storage node is in a normal state, the reward corresponding to the period from the last status confirmation time to the current time is distributed to the target account. If the target shared storage node is in an abnormal state, the reward corresponding to the period from the last status confirmation time to the current time is not distributed to the target account.

[0147] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0148] Figure 6 Schematic diagram of the shared storage node status verification device provided in the embodiments of this application Figure Two .like Figure 6 As shown, the shared storage node status confirmation device 600 includes: a character bit receiving module 601, a fragment search module 602, a character to be verified reading module 603, and a character to be verified sending module 604.

[0149] The character bit receiving module 601 is used to receive the target hash value and feedback character bit sent by the main storage node. The target hash value is obtained by the main storage node and corresponds to any fragment. The feedback character bit is generated by the main storage node based on any fragment. Any fragment is any fragment of any file randomly obtained by the main storage node.

[0150] The shard lookup module 602 is used to find the shard corresponding to the target hash value.

[0151] The unverified character reading module 603 is used to read the unverified character from the feedback character position in the slice corresponding to the target hash value.

[0152] The character to be verified sending module 604 is used to send the character to be verified to the main storage node so that the main storage node can read the standard character of the feedback character position in any fragment and determine whether the status of the target shared storage node is normal based on the standard character and the character to be verified. The target shared storage node is obtained by the main storage node by looking up the corresponding pre-stored fragment index relationship according to any fragment. The fragment index relationship stores the correspondence between fragments and shared storage nodes.

[0153] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.

[0154] To implement the above embodiments, this application also provides an electronic device.

[0155] refer to Figure 7The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of this application. The electronic device 700 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0156] like Figure 7 As shown, the electronic device 700 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 701 and a memory 702 communicatively connected to the processor. The memory 702 may be a read-only memory (ROM). The processor 701 can perform various appropriate actions and processes according to programs stored in the memory 702, computer-executed instructions, or programs loaded from the storage device 708 into the random access memory (RAM) 703, thereby implementing the shared storage node status confirmation method in any of the above embodiments. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing device 701, the memory 702, and the RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0157] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0158] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from memory 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this application.

[0159] It should be noted that the computer-readable storage medium described above in this application can be a computer-readable signal medium or a computer storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0160] The aforementioned computer-readable storage medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0161] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0162] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0163] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0164] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the units do not necessarily limit the module itself; for example, a character receiving module can also be described as a "character receiving module to be verified".

[0165] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0166] This application also provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the technical solution of the shared storage node status confirmation method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the shared storage node status confirmation method, and can be found in the implementation principle and beneficial effects of the shared storage node status confirmation method, which will not be repeated here.

[0167] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0168] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the technical solution of the shared storage node status confirmation method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the shared storage node status confirmation method, and can be found in the implementation principle and beneficial effects of the shared storage node status confirmation method, which will not be repeated here.

[0169] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

[0170] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0171] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for confirming the status of a shared storage node, characterized in that, Applied to primary storage nodes, including: Randomly obtain any fragment of any file, and generate feedback character bits based on the random fragment; Obtain the target hash value corresponding to any of the aforementioned fragments; Based on any of the fragments, the corresponding pre-stored fragment index relationship is found to obtain the corresponding target shared storage node, wherein the fragment index relationship stores the correspondence between fragments and shared storage nodes; The target hash value and the feedback character bit are sent to the target shared storage node so that the target shared storage node can find the fragment corresponding to the target hash value and read the unverified character bit of the feedback character bit in the fragment corresponding to the target hash value; Receive the character to be verified sent by the target shared storage node; Read the standard character of the feedback character position in any of the slices; Based on the standard characters and the characters to be verified, determine whether the status of the target shared storage node is normal.

2. The method according to claim 1, characterized in that, The step of generating feedback character bits based on any of the fragments includes: Get the number of characters in any of the segments; The feedback character position is generated based on the number of characters.

3. The method according to claim 2, characterized in that, The step of generating the feedback character position based on the number of characters includes: Generate a first random number that is greater than a preset value and less than or equal to the number of characters, and determine the first random number as the feedback character position.

4. The method according to claim 2, characterized in that, The step of generating the feedback character position based on the number of characters includes: Generate a first random number and a second random number that are greater than a preset value and less than or equal to the number of characters. Determine the smaller of the first random number and the second random number as the start position of the feedback character position, and determine the larger of the first random number and the second random number as the end position of the feedback character position, thereby obtaining the feedback character position.

5. The method according to claim 1, characterized in that, The step of determining whether the status of the target shared storage node is normal based on the standard character and the character to be verified includes: If the standard character is the same as the character to be verified, then the status of the target shared storage node is determined to be normal. If the standard character is different from the character to be verified, then the state of the target shared storage node is determined to be abnormal.

6. The method according to any one of claims 1 to 5, characterized in that, There are at least two target shared storage nodes; Accordingly, after receiving the character to be verified sent by the target shared storage node, the method further includes: If all target shared storage nodes send the same character to be verified, then the status of all target shared storage nodes is determined to be normal. If the character to be verified sent by any target shared storage node is different from the characters to be verified sent by the remaining target shared storage nodes, then the step of determining whether the status of any target shared storage node is normal is executed based on the character to be verified sent by the target shared storage node and the standard character.

7. The method according to any one of claims 1 to 5, characterized in that, After determining whether the target shared storage node is in a normal state, the method further includes: Obtain the target account corresponding to the target shared storage node, the last status confirmation time of the target account, and the current time; If the target shared storage node is in a normal state, then the reward corresponding to the time from the last status confirmation to the current time is issued to the target account. If the target shared storage node is in an abnormal state, the reward corresponding to the time from the last status confirmation to the current time will not be issued to the target account.

8. A method for confirming the status of a shared storage node, characterized in that, The method, applied to a target shared storage node, wherein the target shared storage node is obtained by randomly obtaining any fragment of any file from the primary storage node and looking up the corresponding pre-stored fragment index relationship based on the fragment, wherein the fragment index relationship stores the correspondence between fragments and shared storage nodes, includes: The system receives a target hash value and a feedback character bit sent by the primary storage node, wherein the target hash value is obtained by the primary storage node and corresponds to any of the shards, and the feedback character bit is generated by the primary storage node based on any of the shards. Find the fragment corresponding to the target hash value; Read the character to be verified from the feedback character position in the slice corresponding to the target hash value; The character to be verified is sent to the primary storage node, so that the primary storage node reads the standard character of the feedback character position in any of the shards, and determines whether the status of the target shared storage node is normal based on the standard character and the character to be verified.

9. A shared storage node status confirmation device, characterized in that, include: The character bit generation module is used to randomly obtain any segment of any file and generate feedback character bits based on the given segment; The hash value acquisition module is used to acquire the target hash value corresponding to any of the fragments; The node acquisition module is used to find the corresponding pre-stored shard index relationship based on any shard to obtain the corresponding target shared storage node, wherein the shard index relationship stores the correspondence between shards and shared storage nodes; The data sending module is used to send the target hash value and the feedback character bit to the target shared storage node, so that the target shared storage node can find the fragment corresponding to the target hash value and read the unverified character of the feedback character bit in the fragment corresponding to the target hash value; A character receiving module is used to receive the character to be verified sent by the target shared storage node; The standard character reading module is used to read the standard character of the feedback character position in any of the slices; The status determination module is used to determine whether the status of the target shared storage node is normal based on the standard character and the character to be verified.

10. A shared storage node status confirmation device, characterized in that, include: The character bit receiving module is used to receive the target hash value and feedback character bit sent by the main storage node, wherein the target hash value is obtained by the main storage node and corresponds to any fragment, and the feedback character bit is generated by the main storage node based on the any fragment, wherein the any fragment is any fragment of any file randomly obtained by the main storage node. The shard lookup module is used to find the shard corresponding to the target hash value; The unverified character reading module is used to read the unverified character in the feedback character position of the slice corresponding to the target hash value; The verification character sending module is used to send the verification character to the main storage node, so that the main storage node reads the standard character of the feedback character position in any shard, and determines whether the status of the target shared storage node is normal based on the standard character and the verification character. The target shared storage node is obtained by the main storage node by looking up the corresponding pre-stored shard index relationship according to any shard. The shard index relationship stores the correspondence between shards and shared storage nodes.

11. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the shared storage node status confirmation method as described in any one of claims 1 to 7 or 8.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the shared storage node status confirmation method as described in any one of claims 1 to 7 or 8.

Citation Information

Patent Citations

  • File checking and repairing method in HDFS storage platform

    CN111782623A

  • Identity authentication method and system based on UDP (User Datagram Protocol)

    CN115022099A