A data access method and electronic device

By obtaining and updating the client's version number in a heterogeneous computing architecture and performing consistency and causality checks when writing and reading data slices, the problems of inconsistent data versions and disordered causal order are solved, achieving semantic correctness and efficient consistency of cross-domain data access.

CN123067922APending Publication Date: 2026-11-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611489399.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In heterogeneous computing architectures and distributed edge computing systems, data is scattered across multiple physical memory domains or computing nodes. When the write process is interrupted, some shards may have been updated to the new version while the rest remain on the old version, resulting in inconsistent data versions and disordered causal order, which in turn leads to semantic errors.

Method used

By obtaining the data write request and the client's current version sequence number, the client's version sequence number is updated. The data causal state identifier is determined according to the consistency mode of the data write request. The version sequence number and causal state identifier are embedded when writing data slices. Consistency and causal verification are performed when reading to ensure that data slices are sent to the client only after version consistency and causal order verification are passed.

Benefits of technology

It achieves semantic correctness in cross-domain data access, avoids version tearing and causal reversal, reduces read latency, and improves system throughput and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067922A_ABST
    Figure CN123067922A_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer technology and discloses a data access method and electronic device. After obtaining a data write request, the current version number of the client is updated to determine the data version sequence number. A data causal state identifier is determined based on the consistency mode represented by the data write request. Multiple data slices are written to their corresponding storage locations based on the data version sequence number, the data causal state identifier, and the consistency mode. In response to a data read request, consistency verification is first performed based on the data version sequence number of each data slice, and then causal verification is performed based on the data causal state identifier and the client's current causal state identifier. If both the version consistency verification result and the causal verification result are passed, multiple data slices are sent to the client. The data version sequence number avoids version tearing between multiple data slices, and the causal order verification using the data causal state identifier ensures that the client reads data that conforms to the causal order, thus achieving semantically correct and consistent access.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a data access method and an electronic device. Background Technology

[0002] In heterogeneous computing architectures and distributed edge computing systems, data is scattered across multiple physical memory domains or computing nodes. If the write process is interrupted, such as due to node failure, network timeout, or power failure, some shards may have been updated to the new version while the rest remain on the old version. Furthermore, in distributed systems, different operations are dependent on each other, meaning that some operations can only occur after other operations are completed. When responding to data read requests and pulling data shards from multiple nodes in parallel, the retrieved data may suffer from version tearing and causal inversion, where the result of the later operation is obtained before the result of the earlier operation, resulting in inconsistent data versions and disordered causal order, leading to semantic errors in the data read by the client. Summary of the Invention

[0003] This application provides a data access method and electronic device to at least solve the problems of inconsistent data versions and disordered causal order in the related art, which lead to semantic errors.

[0004] Firstly, this application provides a data access method, including: Get the data write request and the client's current version number; Update the current version number of the client and use the updated current version number as the data version number; Based on the consistency pattern represented by the data write request, determine the data causal state identifier; The data write request is responded to based on the data version number, data causal state identifier, and consistency mode of the data write request, so as to store the corresponding multiple data slices to the corresponding storage location. In response to a data read request sent by the client, multiple data slices are read from the storage location; Perform consistency checks on the data version sequence numbers of multiple read data slices to obtain the version consistency check results; Perform causality verification on the causal status identifiers of the multiple data slices read and the current causal status identifier of the client represented by the data read request, and obtain the causality verification result; If both the version consistency check and the causality check result are passed, the read data fragments will be sent to the client. In this process, after receiving multiple data slices, the client updates the current causal state identifier based on the data causal state identifiers of the multiple data slices.

[0005] Secondly, this application also provides a data access device, comprising: The acquisition module is used to obtain the data write request and the current version number of the client; The update module is used to update the current version number of the client and use the updated current version number as the data version number. The first determining module is used to determine the data causal state identifier based on the consistency pattern represented by the data write request; The write module is used to respond to data write requests based on the data version number, data causal status identifier, and consistency mode of the data write request, so as to store the corresponding multiple data slices to the corresponding storage locations. The read module is used to read multiple data slices from the storage location in response to data read requests sent by the client; The first verification module is used to perform consistency verification on the data version sequence numbers of multiple data slices read, and obtain the version consistency verification result; The second verification module is used to perform causal verification on the causal status identifiers of the multiple data slices read and the current causal status identifier of the client represented by the data read request, and obtain the causal verification result. The sending module is used to send multiple data fragments to the client if both the version consistency check result and the causality check result are passed. In this process, after receiving multiple data slices, the client updates the current causal state identifier based on the data causal state identifiers of the multiple data slices.

[0006] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described data access methods when executing the computer program.

[0007] Thirdly, this application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described data access methods.

[0008] Fourthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described data access methods.

[0009] Fifthly, through this application, after obtaining a data write request, the client's current version number is updated to determine the data version sequence number. The data causal state identifier is determined according to the consistency mode represented by the data write request. Based on the data version sequence number, the data causal state identifier, and the consistency mode, multiple data slices are written to the corresponding storage locations. In response to a data read request, consistency verification is first performed based on the data version sequence number of each data slice, and then causal verification is performed based on the data causal state identifier and the client's current causal state identifier. When both the version consistency verification result and the causal verification result are passed, multiple data slices are sent to the client. The data version sequence number avoids version tearing between multiple data slices, and the causal order verification is performed through the data causal state identifier to ensure that the client reads data that conforms to the causal order, thus achieving semantically correct consistent access. Attached Figure Description

[0010] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a schematic diagram of the structure of the data access system on which the embodiments of this application are based; Figure 2 A flowchart illustrating the data access method provided in an embodiment of this application; Figure 3 A flowchart illustrating an exemplary data writing method provided in an embodiment of this application; Figure 4 A flowchart illustrating an exemplary data slice metadata writing method provided in an embodiment of this application; Figure 5 A flowchart illustrating an exemplary data reading method provided in an embodiment of this application; Figure 6 A flowchart illustrating an exemplary multi-level verification method provided in this application embodiment; Figure 7 A schematic diagram of the structure of the data access device provided in the embodiments of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0013] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0014] With the rapid development of heterogeneous computing architectures, such as Compute Express Link (CXL) memory pools, Persistent Memory (PMem), GPU memory direct connection, and distributed edge computing systems, application data is increasingly scattered across multiple physical memory domains or computing nodes. How to efficiently and consistently access cross-domain related data has become crucial for ensuring semantic correctness and user experience.

[0015] In related technologies, while traditional strong consistency protocols can ensure data atomicity and global ordering, their high communication overhead and latency make it difficult to match the capabilities of low-latency, high-bandwidth hardware such as Remote Direct Memory Access (RDMA) and CXL, severely limiting system performance. On the other hand, while eventual consistency models have good scalability and low latency advantages, they cannot avoid version tearing, i.e., reading mixed data from different write versions or causal inversion, such as seeing a comment before the original post, which are semantic errors affecting the correctness of business logic and user experience. It is impossible to simultaneously ensure the consistency of multi-domain data versions and the causal order of operations, while also possessing lightweight, lock-free, and hardware-friendly characteristics, thus failing to achieve truly semantically complete consistent reading in heterogeneous memory and distributed edge environments.

[0016] To address the aforementioned technical problems, this application provides a data access method and electronic device. The method includes: acquiring a data write request and the current version number of the client; updating the current version number of the client and using the updated current version number as the data version number; determining a data causal state identifier based on the consistency mode represented by the data write request; responding to the data write request based on the data version number, the data causal state identifier, and the consistency mode of the data write request to store multiple corresponding data slices in corresponding storage locations; responding to a data read request sent by the client to read multiple data slices from the storage location; performing consistency verification on the data version number of the read multiple data slices to obtain a version consistency verification result; performing causal verification on the data causal state identifier of the read multiple data slices and the current causal state identifier of the client represented by the data read request to obtain a causal verification result; and sending the read multiple data slices to the client if both the version consistency verification result and the causal verification result are successful. The client, upon receiving the multiple data slices, updates its current causal state identifier based on the data causal state identifiers of the multiple data slices. The method provided by the above scheme updates the client's current version number after obtaining the data write request to determine the data version sequence number, determines the data causal state identifier based on the consistency mode represented by the data write request, and writes multiple data slices to the corresponding storage locations based on the data version sequence number, the data causal state identifier, and the consistency mode. In response to the data read request, consistency verification is first performed based on the data version sequence number of each data slice, and then causal verification is performed based on the data causal state identifier and the client's current causal state identifier. When both the version consistency verification result and the causal verification result are passed, multiple data slices are sent to the client. The data version sequence number avoids version tearing between multiple data slices, and the causal order verification is performed based on the data causal state identifier to ensure that the client reads data that conforms to the causal order, thus achieving semantically correct consistent access.

[0017] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] The specific application environment architecture or specific hardware architecture on which the execution of the data access method depends is described here.

[0019] First, the structure of the data access system upon which this application is based will be described: The data access method, apparatus, electronic device, and storage medium provided in the embodiments of this application are suitable for consistent access to cross-domain data, such as... Figure 1The diagram shows the structure of the data access system based on the embodiments of this application, mainly including cross-domain data to be read, a data acquisition device, and a data access device. The data acquisition device is used to obtain data write requests, data read requests, and the current version number of the client. The data access device is used to perform consistent access to the cross-domain data based on the data access method provided in the embodiments of this application.

[0020] This application provides a data access method for consistent access to cross-domain data. The execution subject of this application embodiment is an electronic device, such as a server, desktop computer, laptop computer, tablet computer, and other electronic devices that can be used for data access.

[0021] like Figure 2 The diagram shown is a flowchart illustrating a data access method provided in an embodiment of this application. The method includes: Step 201: Obtain the data write request and the current version number of the client.

[0022] Specifically, the server node receives a data write request from the client. The data to be written in the data write request is composite data, which consists of multiple data slices stored in multiple memory domains. The data slices can be metadata slices, index slices, and main content slices.

[0023] Step 202: Update the current version number of the client and use the updated current version number as the data version number.

[0024] Specifically, the client's current version number is the global version token. The global version token is monotonically incremented by the server based on the previous version number for each write operation. The data to be written corresponding to a data write request can be divided into multiple data slices. Multiple data slices corresponding to a data write request are assigned the same global version token, which serves as the data version number of the data slice, indicating that multiple data slices belong to the same logical version.

[0025] Accordingly, version consistency among multi-domain data slices is enforced by assigning a unified global version token to multiple data slices corresponding to data write requests.

[0026] Step 203: Determine the causal state identifier of the data based on the consistency pattern represented by the data write request.

[0027] Specifically, the server has a pre-configured policy table to record the consistency patterns of data entities or operations corresponding to data write requests. Operations can be divided into critical operations and regular operations. Critical operations involve system security, permission changes, and state recovery, requiring causal dependencies. For critical operations, a full causal context vector (CCV) must be used to ensure semantic correctness. For regular operations, causal summaries are allowed to reduce system overhead. The policy configuration table includes fields for an object id or operation type. The object id can be a critical file data entity, such as a system core configuration file, a user permission change table, or an anomaly recovery status record. The operation type can be a specific operation, such as initial boot, anomaly recovery, and permission changes. It also includes a consistency pattern identifier (require full CCV) corresponding to the object id or operation type. If true, the full causal context vector (CCV) is forced; otherwise, a causal summary (CS) is allowed. The data to be written in a data write request corresponds to multiple data slices. Based on the consistency pattern of the data write request, the causal state identifier for each data slice is determined. The causal state identifier includes a data context vector and a data causal summary.

[0028] Accordingly, a hierarchical management of consistency modes is achieved through a policy configuration table. Different consistency modes are selected based on the identified object or operation type. While ensuring data consistency, the storage overhead of routine operations is reduced and the system throughput is improved by replacing the complete causal context vector with a causal summary for routine operations.

[0029] Step 204: Respond to the data write request according to the data version number, data causal state identifier and the consistency mode of the data write request, so as to store the corresponding multiple data slices to the corresponding storage location.

[0030] Specifically, the data version number, data causal state identifier, and data write request consistency mode are added to each data slice, and each data slice is stored in the corresponding storage location, which includes at least one of DRAM, persistent memory, GPU memory, or remote RDMA node. Different data slices may be distributed in different memory domains.

[0031] Step 205: In response to the data read request sent by the client, read multiple data slices from the storage location.

[0032] Specifically, based on the data read request, the client determines the metadata index of multiple data slices corresponding to the data to be read, determines the memory domain where all data slices are located, and pulls the complete data slices of each slice in parallel through direct connection protocols such as RDMA and CXL.

[0033] Step 206: Perform consistency verification on the data version sequence numbers of the multiple data slices read, and obtain the version consistency verification result.

[0034] Specifically, the data version number of each data slice is extracted, and a consistency check is performed on all data version numbers to obtain the consistency check result.

[0035] Step 207: Perform causal verification on the causal state identifiers of the multiple data slices read and the current causal state identifier of the client represented by the data read request, and obtain the causal verification result.

[0036] Specifically, the data read request carries the client's current causal state identifier, including the client's causal context vector and causal summary. The client's current causal state identifier represents the causal state of the data that the client has successfully read. By comparing the data causal state identifiers of the data slices, it is determined whether the data read this time is later than or equal to the client's known historical causal state in terms of causal time sequence.

[0037] Step 208: If both the version consistency check and the causality check result are passed, the read data fragments are sent to the client. Upon receiving the data fragments, the client updates the current causality status identifier based on the data causality status identifiers of the data fragments.

[0038] Specifically, if both version consistency and causality checks pass, the data fragments are assembled into a complete composite data object and returned to the client. Based on the causal state identifier of the latest read data, the client's current causal state identifier is updated to ensure that subsequent read and write operations continue the correct causal chain and version context, and can be used for the next cache pre-check.

[0039] Accordingly, by performing consistency checks on the data version sequence numbers of all data shards, it is ensured that all shards belong to the same version, avoiding version tearing and thus preventing data semantic errors caused by version tearing. By comparing the data causal state identifier with the client's current causal state identifier, it is ensured that the read data is the successor to the read data, satisfying causal dependencies, thereby ensuring that the data semantically satisfies causal order constraints and avoiding semantic logic errors caused by causal inversion. Furthermore, in cross-domain access application scenarios, compared to relying on a central coordinator for multiple rounds of communication negotiation and log synchronization through strong consistency schemes, this application does not require coordination of communication and log synchronization, but only needs to read data shards in parallel across memory domains, reducing read latency and improving system throughput.

[0040] For example, such as Figure 3The diagram shows a flowchart of an exemplary data writing method provided in this application embodiment. The method involves receiving a data write request and the client's current version number; determining a consistency mode based on the data write request and a policy configuration table; determining a data version number based on the client's current version number; determining a data causal state identifier based on the client's causal state identifier carried in the data write request; adding the data version number, data causal state identifier, and consistency mode to each data slice; storing each data slice in parallel to its corresponding storage location; and updating the server's local clock vector after successful writing.

[0041] Based on the above embodiments, as one implementable approach, in one embodiment, determining the data causal state identifier according to the consistency pattern represented by the data write request includes: Step 2031: When the consistency mode of the data write request is context mode, obtain the client's causal context vector and the local causal context vector. Step 2032: Determine the data context vector based on the client's causal context vector and the local causal context vector.

[0042] The data causal state identifier includes a data context vector, and the client's current causal state identifier includes the client's causal context vector.

[0043] Specifically, in data writing scenarios, the data write request carries the causal state identifier currently held by the client, i.e., the client's current causal state identifier. This causal state identifier can be a causal context vector (CCV client) representing the data write request, determined based on the data context vector saved after the client's last successful read, used for critical operations; or it can be a causal summary (CS client) representing the data write request, determined based on the data causal summary saved after the client's last successful read, used for routine operations. The local causal context vector is determined based on the local vector clock maintained by the server. The local vector clock is a multi-dimensional vector, with the number of dimensions matching the number of nodes in the distributed system. Data in each dimension records the number of write operations performed on that node. After each dimension completes its write operation, the local vector clock is updated, monotonically increasing. Based on the data write request operation or the data to be written, the strategy configuration table is queried. If a match is found and the consistency mode identifier is true, the consistency mode of the data write request is determined to be context mode (mode=FULL); otherwise, the consistency mode of the data write request is determined to be summary mode (mode=SUMMARY).

[0044] When the consistency mode of the data write request is context mode, the data context vector (CCV new) of the data to be written is determined based on the local causal context vector (local clock) maintained locally on the server and the client's causal context vector (CCVclient) carried in the data write request. For the value of each dimension in the data context vector, the maximum value of that dimension is taken from the client's causal context vector and the local causal context vector. CCV new = merge(CCV client, local clock), where merge means that the maximum value of each dimension's data is taken and merged to determine the dimension data corresponding to the node to be written.

[0045] Accordingly, the causal context state of the client and the causal context state of the server are merged, so that the data context vector contains both the causal order information known to the client and the causal order information known to the server. This allows the data context vector to be determined based on the prior information, forming a continuous causal chain, which provides a basis for judging the causal dependencies between data in the subsequent reading process.

[0046] Specifically, in one embodiment, when the consistency mode of the data write request is digest mode, a local causal context vector is obtained; a data context vector is determined based on the local causal context vector; the data context vector is compressed to obtain a data causal digest; wherein, the data causal state identifier includes the data causal digest.

[0047] Specifically, when the consistency mode for the data write request is digest mode, the data context vector (CCV new) of the data to be written is determined based on the local causal context vector (local clock) maintained locally on the server. CCV new = (local clock, inc(self)), where inc(self) represents the dimension data corresponding to the node to be written. An increment operation is performed, that is, in the local causal context vector, the value of the dimension corresponding to the node to be written is incremented by one, while the values ​​of other dimensions remain unchanged. The data context vector is then compressed, for example, using a hash algorithm, to obtain the data causal digest (CS new).

[0048] Specifically, in one embodiment, when the consistency mode is either context mode or digest mode, the server stores the generated complete data context vector in the local LRU cache, determines it as a local causal complete vector (CCVfull), and optionally writes it to the lightweight log for anomaly recovery.

[0049] Accordingly, by storing the complete data context vector in a local cache, the server can trace the complete causal dependencies of the data as needed.

[0050] Based on the above embodiments, as an implementable approach, in one embodiment, a data write request is responded to according to the data version sequence number, data causal state identifier, and consistency mode of the data write request, so as to store the corresponding multiple data slices to the corresponding storage location, including: Step 2041: Based on the data write request, determine at least one data slice to be processed; Step 2042: For any data slice to be processed, determine the first check code and the second check code according to the data version number; Step 2043: Add the first check code to the beginning of the data slice to be processed, and add the second check code to the end of the data slice to be processed to obtain the data slice to be converted. Step 2044: Convert the data fragment to be converted into a data fragment based on the first check code, the second check code, the data causal status identifier, the data version sequence number, and the consistency mode of the data write request. Step 2045: Store the data slice to the corresponding storage location according to the storage location information represented by the data slice.

[0051] Specifically, based on the data write request, the data to be written is determined. According to the preset storage strategy, the data to be written can be divided into one or more data slices to be processed. Each data slice to be processed may be stored in different memory domains such as DRAM, PMem, GPU memory and remote RDMA node.

[0052] For any data slice to be processed, an atomic write process is executed. First, a first checksum is set. Based on the allocated global version token, the first checksum is determined and added to the header of the data slice to be processed. Then, the data content of the data slice to be processed is written, updating the data fields. Next, a second checksum is set. Based on the allocated global version token, the second checksum is determined and added to the tail of the data slice to be processed, resulting in the data slice to be transformed. Consistency metadata is embedded in the data slice to be transformed. If it is a context mode, the data context vector is written to the metadata area of ​​the data slice to be processed. If it is a digest mode, the compressed causal digest of the data is written to the metadata area of ​​the data slice to be processed. According to the consistency mode of the data write request, a consistency mode flag is written, where 0 represents context mode and 1 represents digest mode, so that the client can identify it. Based on the first checksum, the second checksum, the data causal status identifier, the data version sequence number, and the consistency mode of the data write request, the data slice to be transformed is converted into a data slice. According to the storage location information represented by the data slice, the data slice is stored in the corresponding storage location.

[0053] For example, such as Figure 4 The diagram shows an exemplary data slice metadata writing method provided in this application embodiment. Based on a data write request, at least one data slice to be processed is determined. For any data slice to be processed, a first checksum and a second checksum are determined based on the data version number. The first checksum is added to the header of the data slice to be processed, and the second checksum is added to the tail of the data slice to be processed, resulting in a data slice to be converted. Based on the first checksum, the second checksum, the data causal state identifier, the data version number, and the consistency mode of the data write request, the data slice to be converted is converted into a data slice. Based on the storage location information represented by the data slice, the data slice is stored in the corresponding storage location.

[0054] Accordingly, this application is applicable to heterogeneous memory, supports mixed storage of multiple memory domains such as DRAM, persistent memory (PMem), GPU memory and remote RDMA nodes, with transparent access, parallel direct connection reading using RDMA or CXL protocol, simple read and write path, high throughput and low latency.

[0055] Based on the above embodiments, as an implementable approach, in one embodiment, a consistency check is performed on the data version sequence numbers of multiple read data slices to obtain a version consistency check result, including: Step 2061: For any data slice, determine the first check code and the second check code based on the data slice; Step 2062: Compare the first check code and the second check code to obtain the local check result; Step 2063: If the local verification result indicates that the first check code and the second check code are inconsistent, discard the data fragment. Step 2064: If the local verification result represents the first check code and the second check code, compare the data version sequence number represented by at least one data slice to obtain the global verification result. Step 2065: Determine the consistency check result based on the local check result and the global check result.

[0056] Specifically, in the application scenario of data reading, when the client reads for the first time or when there is no valid cache state, it initializes the client's current version number (GVT local), GVT local=0, and initializes the client's causal state identifier used for data read requests, including the client's causal context vector (CCV local) and causal summary (CS local).

[0057] It should be noted that the client's causal context vector (CCV client) carried in the data write request and the client's causal context vector (CCV local) carried in the data read request are both causal context vectors stored locally on the client, and are essentially the same. This causal context vector is obtained by the client after each successful data read, based on the data causal context vector in the read data slice. When the client initiates a write request, it uses its currently held causal context vector to inform the server of the known causal history position upon which this write is based, ensuring that each write is based on the causal understanding determined by the previous read. The server combines the client's causal understanding and its local causal understanding, i.e., the local vector clock, to determine the data causal context vector.

[0058] If it is an incremental read, that is, there is a previous successful read record, then the current version number of the client is determined according to the data version number of the previous successful read, and the causal context vector (CCV local) of the client is determined according to the data context vector (CCV snapshot), or the causal summary (CS local) of the client is determined according to the data causal summary (CS snapshot).

[0059] Based on the data read request, the client determines the metadata index of multiple data slices corresponding to the data to be read, determines the memory domain where all data slices are located, and pulls the complete data slices of each slice in parallel through direct connection protocols such as RDMA and CXL. Each data slice contains a first checksum (seq start), a second checksum (seq end), a data version number (GVTsnapshot), a consistency mode flag, a data causal state identifier, which may be a data context vector (CCV snapshot) or a data causal digest (CS snapshot), as well as the data content.

[0060] First, for any data segment, a partial check is performed on the data segment based on its first and second check codes. If seq start ≠ seq end, the data segment is determined to be in an intermediate write state, discarded, and a retry mechanism is triggered. If seq start = seq end, the partial check of the data segment is considered to have passed, meaning the first and second check codes match.

[0061] If all data slices pass local verification, a global version verification is performed by comparing the data version numbers of all data slices. If the data version numbers of all data slices are consistent, the global verification result is considered passed. If the data version numbers of data slices are inconsistent, it indicates a version tear in the data. The client regenerates the data read request based on the latest current version number, and then re-fetches all data slices from multiple memory domains according to the data read request. If the retry fails after multiple attempts, an error message is returned to the client. If both the local and global verification results are passed, the consistency verification result is considered passed.

[0062] For example, such as Figure 5 The diagram illustrates an exemplary data reading method provided in this application. Before the initial read, the client's causal state identifier is initialized. First, the client's local cache is checked to see if the data slice corresponding to the data read request exists. After the cache check, the remaining data slices are read in parallel from multiple memory domains. Local, global, and causal checks are performed on the data slices. If both version consistency and causal checks pass, the read data slices are sent to the client. Furthermore, after receiving the multiple data slices, the client updates its causal state identifier based on the data causal check identifiers and data causal state identifiers of the multiple data slices.

[0063] Correspondingly, in cross-domain write scenarios, multiple fragments of data to be written in a data write request may be written to different memory domains in parallel. If an interruption occurs during the write process, such as node failure, network timeout, or power failure, some fragments may have been updated to the new version while the remaining fragments remain on the old version. By performing local verification based on the first and second checksums, it is ensured that the data fragments are not in an intermediate write state, thus ensuring that the data content of the data fragments is of a unified version. Through global verification, it is avoided that the data fragments are in different versions, ensuring that the data fragments are of a unified version. Furthermore, this application supports cold start in an empty state; the first read only requires one round trip to read the data fragment, and subsequent read / write causal status markers are automatically updated, making state management lightweight and reliable.

[0064] Based on the above embodiments, as an implementable approach, in one embodiment, causal verification is performed on the data causal state identifiers of the read multiple data slices and the current causal state identifier of the client represented by the data read request to obtain the causal verification result, including: Step 2071: Determine the corresponding consistency mode based on the data slices; Step 2072: When the consistency mode is context mode, determine the client's causal context vector based on the data read request; Step 2073: Determine the data context vector based on the data slice; Step 2074: If the data context vector is not greater than the client's causal context vector, determine that the causal verification result is passed.

[0065] Specifically, for any data slice, the corresponding consistency mode is determined based on the data slice. If the consistency mode is marked as 0, it indicates that the consistency mode of the data slice is the context mode. Then, the data context vector (CCVsnapshot) is extracted from the data slice.

[0066] Based on the data read request, determine the causal context vector (CCV local) of the client making the data read request. Then, determine if the client's causal context vector and the data context vector satisfy a partial order relation, i.e., CCV local ≤ CCVsnapshot. If true, it indicates that the client is aware of the preceding causal information of the data, the data semantics are complete, and it can be used safely. If not true, delay processing or wait for synchronization.

[0067] Accordingly, by embedding the data context vector or data causal summary into each data fragment during the writing phase and performing causal verification through partial order relation comparison during the reading phase, it is possible to determine whether there is causal inversion in the read data fragment. When the comparison result is true, the client knows the preceding causal information representing the current data, the data semantics are complete, and data semantic errors caused by causal inversion are effectively avoided.

[0068] Specifically, in one embodiment, when the consistency mode is digest mode, a client causal digest is determined based on the data read request; a data causal digest is determined based on the data slice; and if the data causal digest is equal to the client causal digest, the causal verification result is determined to be passed.

[0069] Specifically, in one embodiment, if the data causal digest is not equal to the client causal digest, the causal verification result is determined to be unsuccessful; based on the data fragment, a data augmentation read request is obtained; based on the data augmentation read request, a local causal integrity vector is determined; wherein, the local causal integrity vector is determined based on the data context vector; if the data causal digest is not greater than the causal integrity vector, the causal verification result is determined to be successful.

[0070] Specifically, if the consistency mode is marked as 1, the consistency mode of the data slice is the summary mode, and a data causal summary (CS snapshot) is extracted from the data slice.

[0071] Based on the data read request, the causal digest (CS local) of the client making the data read request is determined. It is then determined whether the client's causal digest and the data digest satisfy the relationship that CS local = CS snapshot. If true, it indicates that the client is aware of the preceding causal information of the data and it can be used safely. If CS local ≠ CS snapshot, the causal relationship cannot be accurately determined, triggering the second-stage read. The client initiates a data augmentation read request to the server, including the client's current version number and the unique identifier of the data to be read. The server returns the local causal complete vector corresponding to the data to be read. Further, it is determined whether the local causal complete vector and the client's causal context vector satisfy a partial order relationship. If so, it indicates that the client is aware of all the preceding dependencies of the data, the data semantics are complete, and it can be used safely.

[0072] For example, such as Figure 6 The diagram shown is a flowchart illustrating an exemplary multi-level verification method provided in this application embodiment. The multi-level verification includes local verification, global verification, and causal verification.

[0073] Correspondingly, by using causal summarization, metadata space is saved compared to a complete causal context vector.

[0074] Based on the above embodiments, as one implementable approach, in one embodiment, before reading multiple data slices from the storage location in response to a data read request sent by the client, the process includes: In response to a data read request from the client, read the local data slice and the current version number from the client's local cache; for any local data slice, determine the corresponding data version number based on the local data slice; compare the data version number with the client's current version number to determine the version consistency check result; if the version consistency check result fails, in response to a data read request from the client, read multiple data slices from the storage location.

[0075] Specifically, part of the data slices exist in the local cache of the client. Before extracting data slices from multiple memory domains in parallel, it is first determined according to the data read request whether the corresponding data slices exist in the local cache of the client. If they exist, the data slices are further verified. The data version number (GVT cache) of the data slice in the local cache is extracted, and the data version number of the data slice in the local cache is compared with the current version number (GVT local) of the client. If GVT cache = GVT local, the data slice in the local cache is valid, the data slice is directly used, and remote pulling is skipped; if GVT cache < GVT local, the cache has expired, and the data slice needs to be read from multiple memory domains; if GVT cache > GVT local, it is regarded as an abnormal state, the cache is discarded and the data slice is read from multiple memory domains.

[0076] If there is no data slice in the local cache of the client, the data slice is directly read from multiple memory domains.

[0077] Correspondingly, by prioritizing the use of local cache data before parallel reading across memory domains, blind reading of data from memory domains is avoided. If the cache is hit, the local cache data can be directly used, which reduces the number of data reads from the memory domains and lowers the traffic overhead caused by remote cross-memory-domain data reading.

[0078] Specifically, in an embodiment, the BMC system is processing two concurrent data write requests. Request A is a critical operation, where the Redfish client issues a power limit policy modification. The data needs to be stored across domains, with DRAM storing configurations and PMem storing persistent logs. The policy configuration table hits require full CCV=true, and the consistency mode is determined to be the context mode. Request B is a conventional operation, where the Host OS reports the real-time CPU temperature. The data is small and is entirely stored in DRAM. The policy configuration table hits require full CCV=false, and the consistency mode is determined to be the summary mode. The current global state of the system is as follows: the causal context vector of the client CCVlocal=[5, 2], which indicates that the client is aware that 5 events have occurred at node 1 and 2 events have occurred at node 2; GVT=99; the local vector clock of the server local clock=[5,2], which indicates that the server has currently recorded 5 events at node 1 and 2 events at node 2.

[0079] For the server-side writing process: Request A is a critical operation, and the data write request carries the client's causal context vector CCV local=[5, 2] and local clock vector local clock=[5, 2]. Request B is a regular operation, and the data write request carries the client's causal digest CS local=Hash(5,2).

[0080] The consistency mode is determined based on the policy configuration table, the power policy corresponds to the context mode, and the temperature data corresponds to the summary mode.

[0081] Request A (FULL) to allocate GVT=100, merge client states, and generate CCV new= [6, 2], indicating that the 6th event occurred on node 1. Request B (SUMMARY) to allocate GVT=101, generate the complete CCV new=[5, 3], but immediately compress it into a causal digest CS new=Hash(5,3).

[0082] The server stores the complete CCV new=[6, 2] and [5, 3] in the local LRU cache for the client to use in subsequent "two-phase read".

[0083] The server splits the data into multiple shards and writes them to different memory domains in parallel.

[0084] For request A (power policy, FULL mode, cross-domain sharding), shard 1 is the metadata, written to DRAM. For shard 1, write seq start=100, write the policy configuration content, write seq end=100, write the data version number to GVT=100, the consistency mode is FULL, and the data causal context vector CCV snapshot=[6, 2]. For shard 2 is the persistent log, written to PMem. For shard 2, write seq start=100, write the log content, write seq end=100, write the data version number to GVT=100, the consistency mode is FULL, and the data causal context vector CCV snapshot=[6, 2].

[0085] For request B (temperature data, SUMMARY mode, single-domain fragment), fragment 1 is temperature data, written to DRAM, write seq start=101, write temperature value 85℃, write seq end=101, write data version number to GVT=101, consistency mode is SUMMARY, data causal digest CS snapshot=Hash(5,3).

[0086] Regarding the server-side reading process: Upon receiving a data read request from the client, the request requires the latest power policy and the latest temperature.

[0087] The client uses the state from the last successful read: GVT local=99, CCV local=[5, 2], CS local=Hash(5,2).

[0088] First, a cache preflight is performed. The client checks its local cache and, if the target data is not found or the cached GVT is less than the expected value, decides to read from the remote memory domain. A multi-domain parallel read request is initiated. The client uses RDMA or CXL protocols to pull all relevant fragments from DRAM and PMem in parallel, including the data body, first checksum, second checksum, data version number, and consistency mode of the data fragment.

[0089] Multi-level consistency checks are performed. After the client reads all shards, the checks begin.

[0090] First, verify the local integrity of the fragments by checking whether the seq start of each fragment is equal to the seq end.

[0091] If, when retrieving the PMem fragment for the power policy, seq start=100 but seq end=99 is found, it indicates that a power outage or interruption occurred during the writing of PMem, and the data was only partially written. In this case, the fragment should be discarded and a retry should be triggered. If they are equal, such as DRAM fragment seq start=100 and seq end=100, then the fragment should be retained.

[0092] If all data slices pass local verification, global version consistency is checked by verifying whether the data version sequence numbers of all data slices are exactly the same. If the power policy's DRAM slice GVT snapshot=100, but the PMem slice GVTsnapshot=101, it indicates that a new write has occurred, indicating a version tear, and the data does not belong to the same logical version. If all are the same, such as all being 100, then the client's read version sequence number GVT consistent=100 is recorded.

[0093] If the version consistency check passes, a causal check is performed. For the power policy (FULL mode), CCV snapshot = [6, 2] is extracted from the data slice. It is then checked whether the client's CCV local [5, 2] ≤ CCV snapshot [6, 2] is true. The result is 5 ≤ ​​6, 2 ≤ 2, which is true, indicating that the client has not missed any prerequisites and the data semantics are complete, so it is safe to pass. For temperature data (SUMMARY mode), CS snapshot = Hash(5,3) is extracted from the data slice. It is then checked whether the client's CS local Hash(5,2) = CS snapshot Hash(5,3) is true. The result is false, indicating that the data has changed. Phase 2 is triggered, and the client sends a data augmentation read request to the server, carrying GVT=101. The server returns the complete CCV full = [5, 3] from the LRU cache. A precise check is performed, and the client checks whether CCV local [5, 2] ≤ CCV full [5,3]. The result is 5 ≤ ​​5, 2 ≤ 3, which is true, so it is safe to pass.

[0094] The client assembles the fragments in DRAM and PMem into a complete power policy object, parses the fragments in DRAM into CPU temperature objects, and returns them to the upper-layer application. Simultaneously, it updates the local state, setting CCV local to [6,3] and CSlocal to Hash(6,3).

[0095] Specifically, in one embodiment, the policy configuration table can adopt a hash index structure, with the hash value identifying the object or operation type as the key and the corresponding consistency mode identifier as the value, constructing key-value pairs. Through the hash index, the server can quickly determine the corresponding consistency mode after receiving a data write request.

[0096] The data access method provided in this application includes: obtaining a data write request and the current version number of the client; updating the current version number of the client and using the updated current version number as the data version number; determining a data causal state identifier based on the consistency mode represented by the data write request; responding to the data write request based on the data version number, the data causal state identifier, and the consistency mode of the data write request to store multiple corresponding data slices in corresponding storage locations; responding to a data read request sent by the client to read multiple data slices from the storage location; performing consistency verification on the data version number of the read multiple data slices to obtain a version consistency verification result; performing causal verification on the data causal state identifier of the read multiple data slices and the current causal state identifier of the client represented by the data read request to obtain a causal verification result; and sending the read multiple data slices to the client if both the version consistency verification result and the causal verification result are passed; wherein, after receiving multiple data slices, the client updates its current causal state identifier based on the data causal state identifier of the multiple data slices. The method provided by the above scheme updates the client's current version number after obtaining the data write request to determine the data version sequence number, determines the data causal state identifier based on the consistency mode represented by the data write request, and writes multiple data slices to the corresponding storage locations based on the data version sequence number, the data causal state identifier, and the consistency mode. In response to the data read request, consistency verification is first performed based on the data version sequence number of each data slice, and then causal verification is performed based on the data causal state identifier and the client's current causal state identifier. When both the version consistency verification result and the causal verification result are passed, multiple data slices are sent to the client. The data version sequence number avoids version tearing between multiple data slices, and the causal order verification is performed based on the data causal state identifier to ensure that the client reads data that conforms to the causal order, thus achieving semantically correct consistent access.

[0097] Furthermore, by assigning a unified global version token to multiple data slices corresponding to data write requests, version consistency across multiple domain data slices is enforced. A hierarchical management of consistency modes is implemented through a policy configuration table. Different consistency modes are selected based on the identified object or operation type. While ensuring data consistency, the storage overhead of routine operations is reduced and system throughput is improved by replacing complete causal context vectors with causal summaries for routine operations. Consistency verification of the data version sequence numbers of all data slices ensures that all slices belong to the same version, avoiding version tearing and thus preventing semantic errors caused by version tearing. By comparing the data causal state identifier with the client's current causal state identifier, it is ensured that the read data is a successor to the read data, satisfying causal dependencies and ensuring that the data semantically satisfies causal order constraints, avoiding semantic logic errors caused by causal inversion. Moreover, in cross-domain access scenarios, compared to strong consistency schemes that rely on a central coordinator for multiple rounds of communication negotiation and log synchronization, this application eliminates the need for coordination communication and log synchronization, requiring only parallel reading of data slices across memory domains, reducing read latency and improving system throughput. By merging the causal context state of the client and the causal context state of the server, the data context vector contains both the causal order information known to the client and the causal order information known to the server. This allows the data context vector to be determined based on the prior information, forming a continuous causal chain, which provides a basis for judging the causal dependencies between data during subsequent reading.

[0098] By storing the complete data context vector in a local cache, the server can trace the complete causal dependencies of data according to needs. This application is applicable to heterogeneous memory, supporting mixed storage of multiple memory domains such as DRAM, persistent memory (PMem), GPU memory, and remote RDMA nodes. Access is transparent, utilizing RDMA or CXL protocols for parallel direct connection reading, resulting in a simple read / write path, high throughput, and low latency. In cross-domain write scenarios, multiple fragments of data to be written in a data write request may be written in parallel to different memory domains. If an interruption occurs during the write process, such as node failure, network timeout, or power failure, some fragments may be updated to the new version while others remain on the old version. By performing local verification based on the first and second checksums, it is ensured that the data fragment is not in an intermediate write state, thus ensuring that the data content of the data fragment is of a unified version. Global verification avoids data fragments being on different versions, ensuring that the data fragments are of a unified version. Furthermore, this application supports cold start in an empty state; the first read only requires one round trip to read the data fragment, and subsequent read / write causal state identifiers are automatically updated, making state management lightweight and reliable. By embedding data context vectors or causal summaries into each data shard during the write phase and performing causal verification through partial order comparison during the read phase, the system effectively determines whether causal inversion exists in the read data shards. When the comparison result is true, the client knows the preceding causal information representing the current data, ensuring complete data semantics and effectively avoiding semantic errors caused by causal inversion. Compared to complete causal context vectors, using causal summaries saves metadata space. By prioritizing the use of locally cached data before parallel reading across memory domains, the system avoids blindly reading data from the memory domain. If a cache hit occurs, locally cached data can be used directly, reducing the number of times data is read from the memory domain and lowering the bandwidth overhead caused by reading data from remote cross-memory domains.

[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0100] Embodiments of this application also provide a data access apparatus for executing the data access method provided in the above embodiments.

[0101] like Figure 7 The diagram shown is a structural schematic of a data access device provided in an embodiment of this application. The data access device 70 includes: an acquisition module 701, an update module 702, a first determination module 703, a writing module 704, a reading module 705, a first verification module 706, a second verification module 707, and a sending module 708.

[0102] The system comprises the following modules: an acquisition module for acquiring the data write request and the client's current version number; an update module for updating the client's current version number and using it as the data version number; a first determination module for determining the data causal state identifier based on the consistency mode represented by the data write request; a write module for responding to the data write request based on the data version number, the data causal state identifier, and the consistency mode of the data write request, storing the corresponding multiple data slices in their respective storage locations; a read module for responding to the data read request sent by the client and reading multiple data slices from the storage location; a first verification module for performing consistency verification on the data version number of the read multiple data slices to obtain a version consistency verification result; a second verification module for performing causal verification on the data causal state identifier of the read multiple data slices and the client's current causal state identifier represented by the data read request to obtain a causal verification result; and a send module for sending the read multiple data slices to the client if both the version consistency verification result and the causal verification result are passed. Upon receiving the multiple data slices, the client updates its current causal state identifier based on the data causal state identifiers of the multiple data slices.

[0103] Specifically, in one embodiment, the first determining module is specifically used for: When the consistency mode of the data causal summary data write request is context mode, obtain the client's causal context vector and local causal context vector; determine the data context vector based on the data causal summary client's causal context vector and local causal context vector; wherein, the data causal state identifier of the data causal summary includes the data context vector, and the current causal state identifier of the data causal summary client includes the client's causal context vector.

[0104] Specifically, in one embodiment, the first determining module is further configured to: When the consistency mode of the data write request is digest mode, obtain the local causal context vector; determine the data context vector based on the local causal context vector; compress the data context vector to obtain the data causal digest; wherein, the data causal state identifier includes the data causal digest.

[0105] Specifically, in one embodiment, the writing module is specifically used for: Based on the data write request, at least one data slice to be processed is identified; for any data slice to be processed, a first checksum and a second checksum are determined based on the data version number; the first checksum is added to the header of the data slice to be processed, and the second checksum is added to the tail of the data slice to be processed, thus obtaining the data slice to be converted; based on the first checksum, the second checksum, the data causal state identifier, the data version number, and the consistency mode of the data write request, the data slice to be converted is converted into a data slice; based on the storage location information represented by the data slice, the data slice is stored in the corresponding storage location.

[0106] Specifically, in one embodiment, the first verification module is specifically used for: For any data slice, determine a first checksum and a second checksum based on the data slice; compare the first checksum and the second checksum to obtain a local checksum result; if the local checksum result indicates that the first checksum and the second checksum are inconsistent, discard the data slice; if the local checksum result indicates that the first checksum and the second checksum are consistent, compare the data version sequence numbers represented by at least one data slice to obtain a global checksum result; determine the consistency checksum result based on the local checksum result and the global checksum result.

[0107] Specifically, in one embodiment, the second verification module is specifically used for: Based on the data slices, determine the corresponding consistency mode; if the consistency mode is context mode, determine the client's causal context vector based on the data read request; based on the data slices, determine the data context vector; if the data context vector is not greater than the client's causal context vector, determine the causal verification result as passed.

[0108] Specifically, in one embodiment, the second verification module is further configured to: When the consistency mode is digest mode, the client causal digest is determined based on the data read request; the data causal digest is determined based on the data slice; and if the data causal digest is equal to the client causal digest, the causal verification result is determined to be passed.

[0109] Specifically, in one embodiment, the second verification module is further configured to: If the data causal digest is not equal to the client causal digest, the causal verification result is determined to be unsuccessful; based on the data fragment, obtain the data augmentation read request; based on the data augmentation read request, determine the local causal complete vector; wherein, the local causal complete vector is determined based on the data context vector; if the data causal digest is not greater than the causal complete vector, the causal verification result is determined to be successful.

[0110] Specifically, in one embodiment, the data access device further includes: The cache preflight module is used to respond to data read requests sent by the client by reading local data fragments and the current version number from the client's local cache; for any local data fragment, it determines the corresponding data version number based on the local data fragment; it compares the data version number with the client's current version number to determine the version consistency check result; if the version consistency check result fails, it responds to data read requests sent by the client by reading multiple data fragments from the storage location.

[0111] For a description of the features in the embodiment corresponding to the data access device, please refer to the relevant description in the embodiment corresponding to the data access method, which will not be repeated here.

[0112] Embodiments of this application also provide an electronic device, such as... Figure 8 The diagram shown is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, including a processor 10 and a memory 20. The memory 20 stores a computer program, and the processor 10 is configured to run the computer program to perform the steps in any of the above-described data access method embodiments.

[0113] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described data access method embodiments at runtime.

[0114] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0115] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data access method embodiments.

[0116] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described data access method embodiments.

[0117] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0118] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0119] The data access method and electronic device provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A data access method, characterized in that, The method includes: Get the data write request and the client's current version number; Update the current version number of the client and use the updated current version number as the data version number; Based on the consistency pattern represented by the data write request, determine the data causal state identifier; The data write request is responded to based on the data version number, data causal state identifier, and consistency mode of the data write request, so as to store the corresponding multiple data slices to the corresponding storage location. In response to a data read request sent by the client, multiple data slices are read from the storage location; Perform consistency checks on the data version sequence numbers of multiple read data slices to obtain the version consistency check results; A causal verification is performed on the causal state identifiers of the multiple data slices read and the current causal state identifier of the client represented by the data read request, to obtain the causal verification result; If both the version consistency check result and the causality check result pass, the read data fragments will be sent to the client. After receiving multiple data slices, the client updates the current causal state identifier based on the data causal state identifiers of the multiple data slices.

2. The data access method according to claim 1, characterized in that, The step of determining the data causal state identifier based on the consistency pattern represented by the data write request includes: When the consistency mode of the data write request is context mode, obtain the client's causal context vector and the local causal context vector; The data context vector is determined based on the client's causal context vector and the local causal context vector; The data causal state identifier includes a data context vector, and the client's current causal state identifier includes the client's causal context vector.

3. The data access method according to claim 2, characterized in that, The method further includes: When the consistency mode of the data write request is digest mode, obtain the local causal context vector; Determine the data context vector based on the local causal context vector; The data context vector is compressed to obtain a data causal summary; The data causal state identifier includes a data causal summary.

4. The data access method according to claim 1, characterized in that, The step of responding to the data write request based on the data version number, data causal state identifier, and consistency mode of the data write request, to store the corresponding multiple data slices to the corresponding storage location, includes: Based on the data write request, at least one data slice to be processed is determined; For any data segment to be processed, determine the first check code and the second check code based on the data version number; Add the first check code to the beginning of the data slice to be processed, and add the second check code to the end of the data slice to be processed to obtain the data slice to be converted; Based on the first check code, the second check code, the data causal status identifier, the data version sequence number, and the consistency mode of the data write request, the data fragment to be converted is converted into the data fragment. Based on the storage location information represented by the data slice, the data slice is stored in the corresponding storage location.

5. The data access method according to claim 4, characterized in that, The process of performing a consistency check on the data version sequence numbers of multiple read data slices to obtain the version consistency check result includes: For any data segment, determine a first checksum and a second checksum based on the data segment; The first check code and the second check code are compared to obtain the local check result; If the local verification result indicates that the first check code and the second check code are inconsistent, the data fragment shall be discarded. If the local verification result represents the first check code and the second check code to be consistent, the data version sequence number represented by the at least one data slice is compared to obtain the global verification result; Based on the local and global verification results, the consistency verification result is determined.

6. The data access method according to claim 2, characterized in that, The causal verification is performed on the causal state identifiers of the multiple data slices read and the current causal state identifier of the client represented by the data read request, to obtain the causal verification result, including: Based on the data slices, determine the corresponding consistency mode; When the consistency mode is context mode, the client's causal context vector is determined based on the data read request; Based on the data slices, determine the data context vector; If the data context vector is not greater than the client's causal context vector, the causal verification result is determined to be passed.

7. The data access method according to claim 6, characterized in that, The method further includes: When the consistency mode is digest mode, a client causal digest is determined based on the data read request; Based on the data slices, determine the data causal summary; If the data causal digest is equal to the client causal digest, the causal verification result is determined to be passed.

8. The data access method according to claim 7, characterized in that, The method further includes: If the data causal digest is not equal to the client causal digest, the causal verification result is determined to be unsuccessful. Based on the data slice, obtain a data-enhanced read request; Based on the data augmentation read request, a local causal integrity vector is determined; wherein, the local causal integrity vector is determined based on the data context vector; If the causal summary of the data is not greater than the complete causal vector, the causal verification result is determined to be passed.

9. The data access method according to claim 1, characterized in that, Before reading multiple data slices from the storage location in response to a data read request sent by the client, the process includes: In response to a data read request sent by the client, read the local data fragment and the current version number from the client's local cache; For any local data slice, determine the corresponding data version number based on the local data slice; The data version number is compared with the current version number of the client to determine the version consistency verification result; If the version consistency check fails, multiple data slices are read from the storage location in response to a data read request sent by the client.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the data access method as described in any one of claims 1 to 9 when executing the computer program.