Data processing method and device, equipment and storage medium

By using blockchain to store and construct a directed acyclic graph (DAG) process connection graph, the problem of managing data in large and complex credit business processes has been solved, achieving data traceability and integrity, and improving the management efficiency and security of credit business process data.

CN116303784BActive Publication Date: 2026-06-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2023-03-16
Publication Date
2026-06-16

Smart Images

  • Figure CN116303784B_ABST
    Figure CN116303784B_ABST
Patent Text Reader

Abstract

The application belongs to the field of finance and the field of data processing, and particularly relates to a data processing method, device, equipment and storage medium. The application acquires flow information of a target flow of a target service; constructs flow data of the target flow according to the flow information, wherein the flow data comprises a flow identifier of the target flow, a flow identifier of a preceding flow and a transaction instruction; and saves the target flow and the flow data in a target block of a block chain according to the flow identifier of the target flow, wherein the flow identifier of the target flow comprises identification information of the target block. The application can effectively manage flow data of large and complex services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the financial field and the data processing field, and in particular to a data processing method, apparatus, device and storage medium. Background Technology

[0002] Credit business is a core business of banks, but its process is lengthy, generally consisting of three main stages: pre-loan, during-loan, and post-loan. During the loan process, it mainly involves investigation, investigation review, examination, examination review, deliberation, and approval. Depending on the type of credit business and the amount, approval processes may be required not only at the local branch but also at the head office or higher-level branches, meaning key processes may need to be repeated multiple times. Furthermore, before loan disbursement, further monitoring and control processes are required; after disbursement, the post-loan process begins, requiring regular or ad-hoc post-loan inspections, including application, review, examination, and approval. If non-performing loans are involved, a non-performing loan process must also be initiated. Therefore, managing the process data of credit business is quite complex.

[0003] In related technologies, to facilitate the management of credit business process data, database systems typically store process data using relational or key-value pair methods. The storage model for process data often mixes process information and snapshot information. However, this approach is only suitable for managing relatively simple process data and cannot effectively manage the process data of large and complex businesses. Summary of the Invention

[0004] This application provides a data processing method, apparatus, device, and storage medium for effectively managing process data of large and complex business operations.

[0005] In a first aspect, this application provides a data processing method, comprising: obtaining process information of a target process of a target business; constructing process data of the target process based on the process information, the process data including a process identifier of the target process, process identifiers of preceding processes, and transaction instructions; and storing the target process and process data in a target block of a blockchain based on the process identifier of the target process, the process identifier of the target process including the identifier information of the target block.

[0006] In one possible implementation, process data of the target process is constructed based on process information, including: constructing process data of the target process in a process connection diagram, which is used to represent the chain relationship between all processes of the target business.

[0007] In one possible implementation, the target process and process data are stored in a target block of the blockchain according to the process identifier of the target process, including: determining the preceding process referenced by the target process; in response to the preceding process not having a sub-process that meets a preset condition, determining whether the preceding process has a directly connected subsequent virtual process, the preset condition being used to indicate that the process is a persistently stored, multi-level, non-virtual process; in response to the preceding process not having a directly connected subsequent virtual process, the target process and process data are stored in the target block according to the process identifier of the target process.

[0008] In one possible implementation, the method further includes: determining whether the preceding process can be replaced if a subprocess that meets preset conditions exists in the preceding process; reconstructing the process data based on the process information if the preceding process can be replaced; and discarding the target process if the preceding process cannot be replaced.

[0009] In one possible implementation, the method further includes: in response to the existence of a directly connected subsequent virtual process in the preceding process, modifying the process data according to the preceding process and the subsequent virtual process; and storing the target process and process data in the target block of the blockchain according to the process identifier of the target process, including: storing the target process and the modified process data in the target block according to the process identifier of the target process.

[0010] In one possible implementation, after storing the target process and process data in the target block of the blockchain according to the process identifier of the target process, the method further includes: in response to the existence of sibling processes of the target process and the fact that the number of sibling processes of the target process does not increase, determining whether it is necessary to construct virtual sub-processes for the target process and the sibling processes of the target process; in response to the need to construct virtual sub-processes for the target process and the sibling processes of the target process, constructing virtual sub-processes; and storing the virtual sub-processes in the corresponding blocks in the blockchain.

[0011] In one possible implementation, the method further includes: in response to the target process and / or virtual subprocess being a snapshot process, constructing a business snapshot of the target process and / or virtual subprocess; and storing the business snapshot.

[0012] In one possible implementation, the method further includes: in response to receiving a request to obtain a business snapshot of a target process, determining a process connection graph of the target business, the process connection graph representing the relationships between all processes of the target business; based on the process connection graph, traversing upwards level by level from the target process, determining the snapshot process closest to the target process as the baseline snapshot process of the target process; determining the shortest path between the baseline snapshot process and the target process, the starting process of the shortest path being the baseline snapshot process, and the ending process of the shortest path being the target process; starting from the baseline snapshot process, sequentially calculating the transaction indications in the process data of each level of the shortest path to obtain a business snapshot of the target process.

[0013] In one possible implementation, the transaction indications in the process data of each level of the process are calculated sequentially along the shortest path, including: in response to the existence of a virtual process on the shortest path, ignoring the transaction indications in the process data of the next higher level process of the virtual process.

[0014] Secondly, this application provides a data processing apparatus, comprising: a process information acquisition module for acquiring process information of a target process of a target business; a process data construction module for constructing process data of the target process based on the process information, wherein the process data includes a process identifier of the target process, process identifiers of preceding processes, and transaction instructions; and a process data storage module for storing the target process and process data in a target block of a blockchain based on the process identifier of the target process, wherein the process identifier of the target process includes the identifier information of the target block.

[0015] Thirdly, this application provides an electronic device, including: a processor and a memory connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the data processing method of the first aspect.

[0016] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the data processing method as described in the first aspect.

[0017] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, implements the data processing method of the first aspect.

[0018] The data processing method, apparatus, equipment, and storage medium provided in this application can store and manage large and complex business process data through blockchain. Utilizing the inherent time-dimensional storage attribute of blockchain, traceable data storage can be achieved. That is, blocks on the blockchain are linked together sequentially along a time dimension, determining that the flow of data on the blockchain is unidirectional and single-chained based on time. Furthermore, by constructing a directed acyclic graph (DAG) process connection diagram, complex process data can be organized and managed. In addition, blockchain has the characteristic of immutability; once a block is generated and becomes a historical block, it cannot be modified, which helps maintain the integrity of process data in the face of attacks. 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 of the structure of a data processing system provided in an embodiment of this application;

[0021] Figure 2 A schematic diagram of the structure of a process information storage device provided in an embodiment of this application;

[0022] Figure 3 A schematic diagram of a flowchart computing device provided in an embodiment of this application;

[0023] Figure 4 A schematic diagram of a business snapshot management device provided in an embodiment of this application;

[0024] Figure 5 A flowchart illustrating the data processing method provided in the embodiments of this application;

[0025] Figure 6 A schematic diagram of the process data provided in the embodiments of this application;

[0026] Figure 7 A schematic diagram of the flow connection of all processes of the target business provided in the embodiments of this application;

[0027] Figure 8 A schematic diagram illustrating the snapshot determination process provided in an embodiment of this application;

[0028] Figure 9 A schematic diagram illustrating the shortest path of the process provided in the embodiments of this application;

[0029] Figure 10 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application;

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

[0031] The accompanying drawings have illustrated 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 concepts of this application to those skilled in the art through reference to specific embodiments. Other drawings can be obtained from these drawings by those skilled in the art without any inventive effort. Detailed Implementation

[0032] 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.

[0033] First, let me explain the terms used in this application:

[0034] Blockchain: A chain-like data structure that combines data blocks in chronological order, and is a distributed ledger that is cryptographically guaranteed to be immutable and unforgeable.

[0035] Snapshot: A fully usable copy of a specified set of data, which includes an image of the data at a point in time (the point at which the copy begins).

[0036] The related technologies provided in the background section have at least the following technical problems:

[0037] To facilitate the management of credit business process data, related technologies typically involve database systems storing process data in relational or key-value pair formats. The storage model often mixes process information and snapshot information. However, this approach is only suitable for managing relatively simple process data and cannot effectively manage large and complex business process data. Furthermore, the historical data stored in relational or key-value pair formats by database systems lacks tamper-proof features, potentially posing a risk of accidental deletion or alteration of critical process data.

[0038] To address the problems in related technologies, this application proposes a data processing method that utilizes blockchain to store and manage large and complex business process data. Leveraging the inherent time-dimensional storage attribute of blockchain, traceable data storage can be achieved. That is, blocks on the blockchain are linked together sequentially along a time dimension, determining that the flow of data on the blockchain is unidirectional and single-chained based on time. Furthermore, by constructing a directed acyclic graph (DAG) process connection diagram, complex process data can be organized and managed. In addition, blockchain possesses the characteristic of immutability; once a block is generated and becomes a historical block, it cannot be modified, which helps maintain the integrity of process data in the face of attacks.

[0039] In one embodiment, the data processing method can be applied in an application scenario. Figure 1 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application, such as... Figure 1 As shown, the data processing method can be applied to the data processing system, which may include a process information storage device, a process information graph calculation device, and a business snapshot management device. The process information storage device is connected to the process information graph calculation device, and the process information storage device and the process information graph calculation device are respectively connected to the business snapshot management device.

[0040] Specifically, the process information storage device is mainly used to construct process data suitable for storage on the blockchain and to store the process data on the blockchain. The data structure of the process data can be similar to a linked list structure, mainly including the current process identifier, the previous process identifier (there can be multiple previous process identifiers), and the transaction indication of the current process. The process data is stored on a block of the blockchain.

[0041] The process information storage device can be composed of, for example, Figure 2 As shown, Figure 2 This is a schematic diagram of a process information storage device provided in an embodiment of this application. Figure 2 In this system, the process information storage device may include a process identifier construction unit, a process data organization unit, and a process data storage unit. The process identifier construction unit is mainly used to construct process identifiers to facilitate process retrieval; the process data organization unit is mainly used to construct process data suitable for storage on the blockchain; and the process data storage unit is mainly used to store process data in the corresponding blocks of the blockchain.

[0042] Specifically, the blockchain maintains all the process data of the business, and the process information graph computing device is mainly used to construct a complete process connection graph through the chain relationship of blocks, the chain relationship of transactions, the chain relationship of processes, and the time dimension.

[0043] The components of the flowchart computing device can be as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of a flowchart computing device provided in an embodiment of this application. Figure 3 In this system, the process information diagram calculation device may include a process connection diagram generation unit and a process connection diagram calculation unit. The process connection diagram generation unit is mainly used to generate a process connection diagram in a directed acyclic graph manner based on the chain relationship formed by the preceding processes stored in each process; the process connection diagram calculation unit is mainly used to calculate a business snapshot of a certain process based on the constructed process connection diagram.

[0044] Specifically, the process data in the business changes after each process, so a business snapshot management device can save business snapshots at key processes. This allows for the subsequent acquisition of business snapshots for any process based on the process connection diagram and transaction instructions in the process data.

[0045] The business snapshot management device can be composed of, for example, as follows: Figure 4 As shown, Figure 4 This is a schematic diagram of a business snapshot management device provided in an embodiment of this application. Figure 4 In this system, the business snapshot management device may include a snapshot process selection unit, a snapshot data generation unit, and a snapshot data storage unit. The snapshot process selection unit is mainly used to select a snapshot process; the snapshot data generation unit is mainly used to calculate the business snapshot data for the selected snapshot process; and the snapshot data storage unit is mainly used to store the business snapshot data for the selected snapshot process.

[0046] Specifically, when storing the target process and its process data, the data processing system constructs the target process's process data by acquiring the target process's process information. Then, based on the block identifier information corresponding to the process identifier in the process data, it stores the target process and its process data in the corresponding block in the blockchain. This enables traceable storage and management of process data for large and complex businesses. Furthermore, the blockchain has the characteristic of being tamper-proof; once a block is generated and becomes a historical block, it cannot be modified, which helps maintain the integrity of process data in the face of attacks.

[0047] In light of the above scenarios, the technical solutions of this application and how they solve the aforementioned technical problems will be 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 repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0048] This application provides a data processing method. Figure 5 A flowchart of the data processing method provided in the embodiments of this application is shown below. Figure 5 As shown, the method includes the following steps:

[0049] S501: Obtain the process information of the target business process.

[0050] In this step, when executing the target business, multiple processes can be generated. Each process can include process execution time, the business number to which the process belongs, the block number of the blockchain to which the process can be stored, transaction instructions, the previous process and the next process, and other process information.

[0051] S502: Based on the process information, construct the process data of the target process. The process data includes the process identifier of the target process, the process identifier of the preceding process, and the transaction instruction.

[0052] In this step, after obtaining the process information of the target process for the target business, process data of the target process can be constructed based on this information. The data structure of this process data can be similar to a linked list to facilitate storage on the blockchain. The process data may include the process identifier of the target process, the process identifiers of the preceding processes, and transaction instructions.

[0053] Specifically, the process identifier (which can be called the target process ID) uniquely represents the target process, carries specific business meaning, and reflects a chain relationship for subsequent retrieval. The process identifier can be constructed as follows: block number + business number + transaction instruction digest hash value + timestamp, such as... Figure 6 As shown. Figure 6 This is a schematic diagram of the process data provided in the embodiments of this application. The blockchain includes multiple blocks, namely blocks 1 to n. Block 3 stores processes 1 to n, which belong to different businesses. For process 2, which is a process step of business with business number LC0001, it is stored in block 3 on the blockchain. According to the aforementioned process identifier composition rules, the ID of process 2 is 3LC0001 AAAA 20221201, where 3 is used to represent the number of block 3, LC0001 is used to represent the business number to which process 2 belongs, AAAA is used to represent the hash value of the transaction indication digest of process 2, and 20221201 is used to represent the timestamp of process 2.

[0054] Specifically, the process identifier of the preceding process is the ID of the preceding process of the target process. There can be multiple preceding processes, and correspondingly, there can also be multiple IDs for the preceding processes.

[0055] Specifically, the transaction instruction can serve as the execution benchmark for the target process. For example, for process 2 of the LC0001 business, the transaction instruction could be a = 2, that is, assigning the value 2 to a. The transaction instruction must support repeated execution and maintain consistent results; for example, the transaction instruction cannot be a random number assignment.

[0056] S503: Based on the process identifier of the target process, store the target process and process data in the target block of the blockchain.

[0057] In this step, the process identifier of the target process includes the identifier information of the target block.

[0058] Specifically, after the process data is constructed, the target process and its process data can be stored together in the target block according to the identification information of the target block corresponding to the process identifier in the process data, such as the block number of the target block.

[0059] The data processing method provided in this embodiment leverages the inherent time-dimensional storage attribute of blockchain when processing process data for a target business. By storing and managing the process data of the target business through blockchain, traceable data storage can be achieved. That is, blocks on the blockchain are linked together sequentially along a time dimension, determining that the flow of data on the blockchain is unidirectional and single-chained based on time. Furthermore, blockchain possesses the characteristic of immutability; once a block is generated and becomes a historical block, it cannot be modified, which helps maintain the integrity of process data in the face of attacks.

[0060] In one embodiment, constructing process data of a target process based on process information includes: constructing process data of the target process in a process connection diagram, wherein the process connection diagram is used to represent the chain relationship between all processes of the target business.

[0061] In this approach, all processes within the target business can follow the organizational principles outlined below:

[0062] (1) The process data consists of the process identifier of the target process, the process identifier of the preceding process, and the transaction instruction. Among them, there can be multiple process identifiers of the preceding process.

[0063] (2) The transaction instruction must support repeated execution and the execution result must be consistent. For example, it cannot be an assignment of a random number.

[0064] (3) Organize all processes in the target business using a directed acyclic graph.

[0065] (4) If multiple processes reference the same preceding process, these processes cannot simultaneously depend on and manipulate the same data field in the preceding process.

[0066] (5) Multiple processes reference the same preceding process. After these processes are completed, a virtual process is generated. The virtual process only reflects data changes, and the actual business processing cannot execute the transaction instructions of the virtual process.

[0067] (6) If the referenced process has a directly connected virtual process, then the virtual process must be referenced at the same time, and the data processing benchmark shall be based on the snapshot data corresponding to the virtual process.

[0068] (7) If a process already has multiple levels (≥2) of non-virtual successor processes, and the successor processes have been persistently stored on the blockchain, then the process is not allowed to be referenced.

[0069] (8) A process with an empty transaction instruction is allowed.

[0070] For example, such as Figure 7 As shown, Figure 7 This is a schematic diagram of the flow connection diagram of all processes of the target business provided in the embodiments of this application. In the initial case, the flow identifier of process 1 is identifier 1, there is no preceding process, that is, process 1 is the starting process, the transaction instruction is a=1, b=1, c=1, that is, process 1 sets the values ​​of a, b, and c to 1; the flow identifier of subsequent process 2 is identifier 2, the preceding process is identifier 1, the transaction instruction is a=2, that is, process 2 changes the value of a from 1 to 2; process 3 and process 2 are at the same level, the flow identifier of process 3 is identifier 3, the preceding process is identifier 1, the transaction instruction is b=3, that is, process 3 changes the value of b from 1 to 3. Since process 2 and process 3 have the same preceding process (process 1), process 2 and process 3 cannot operate on the same data field in process 1 at the same time. For example, process 3 cannot change the value of a, because process 2 has already operated on the variable, that is, the aforementioned principle (4);

[0071] Since processes 2 and 3 both reference the same preceding process (process 1), processes 2 and 3 need a common virtual successor process, namely virtual process 1. This virtual process reflects the data changes of processes 2 and 3, which is the aforementioned principle (5). Similarly, since processes 5 and 6 both reference the same preceding process (virtual process 1), processes 5 and 6 also need a virtual successor process, namely virtual process 2.

[0072] Process 5 is based on Process 2, meaning that Process 5 is a subprocess of Process 2. However, since Process 2 has a directly connected subsequent virtual process (virtual process 1), Process 5 needs to reference virtual process 1 at the same time, and the data base is based on the snapshot data corresponding to virtual process 1, which is the aforementioned principle (6). Similarly, Process 6 also needs to reference virtual process 1;

[0073] If the newly added process 7 wants to reference process 3, but process 5 (process 3 → virtual process 1 → process 5, satisfying multi-level conditions) has already been persistently saved on the blockchain, then process 3 cannot be referenced, which is the aforementioned principle (7). Similarly, process 1, process 2, process 5, process 6 and virtual process 1 cannot be referenced by the newly added process 7. Figure 7 The reason why process 1 is referenced by both process 2 and process 3 is that when process 3 is being constructed, although process 2 already exists, process 2 is a first-level child node of process 1 (process 1 → process 2), and subsequent processes such as process 5 do not yet exist. Therefore, process 1 can be referenced by process 3 again.

[0074] Process 3 cannot reference process 5. If process 3 references process 5, then there is a cycle such as process 3 → virtual process 1 → process 5 → process 3, which is a non-directed acyclic graph, i.e., the aforementioned principle (3).

[0075] The transaction instruction for process 6 is empty. One purpose of an empty process is to ensure that the subsequent business of a certain sub-transaction can be processed, which is the aforementioned principle (8). For example, if process 2 and process 3 represent two sub-transactions respectively, when process 5 already exists, process 3 cannot be referenced, which is the aforementioned principle (7). This means that the sub-business represented by process 3 cannot be processed. By referencing process 6 with an empty instruction, the branch flow of the process can be satisfied while ensuring the one-way single-chain maintenance of actual business data.

[0076] Specifically, all processes in the target business are organized using a directed acyclic graph (DAG). That is, based on the chain relationships formed by the preceding processes stored in each process, a process connection graph is generated using a DAG. The process with no preceding processes is the starting process, such as... Figure 7 As shown, the process connection graph formed by the chain relationship of the processes cannot contain loops. This requires that the identifier of a later process cannot appear in an existing process (this principle is guaranteed by the immutability of blockchain, because the preceding processes are stored in historical blocks, and data in historical blocks cannot be modified). Organizing all processes in the target business through the process connection graph facilitates subsequent process retrieval and improves the efficiency of determining a business snapshot of a certain process.

[0077] In one embodiment, storing the target process and process data in a target block of the blockchain according to the process identifier of the target process includes: determining the preceding process referenced by the target process; in response to the preceding process not having a sub-process that meets a preset condition, determining whether the preceding process has a directly connected subsequent virtual process, the preset condition being used to indicate that the process is a persistently stored, multi-level, non-virtual process; in response to the preceding process not having a directly connected subsequent virtual process, storing the target process and process data in the target block according to the process identifier of the target process.

[0078] In this scheme, when storing the target process and process data in the target block of the blockchain according to the process identifier of the target process, the target process can be judged according to the above rules first.

[0079] Specifically, it can be determined whether the preceding process referenced by the target process has a sub-process that meets the preset conditions. If the preceding process does not have a sub-process that meets the preset conditions, that is, the preceding process does not have a persistent, multi-level, non-virtual sub-process, then it can be determined whether the preceding process has a directly connected subsequent virtual process. If the preceding process does not have a directly connected subsequent virtual process, the target process and process data are stored in the target block according to the process identifier of the target process. This enables the storage and management of the process data of the target business through blockchain, achieving traceable data storage and maintaining the integrity of the process data.

[0080] Alternatively, storing process data in a blockchain can achieve persistent storage of process data.

[0081] Alternatively, the target process can also be referred to as a subprocess of the preceding process.

[0082] In one embodiment, the method further includes: determining whether the preceding process can be replaced if a sub-process that meets preset conditions exists in the preceding process; reconstructing the process data based on the process information if the preceding process can be replaced; and discarding the target process if the preceding process cannot be replaced.

[0083] In this scheme, when judging the target process according to the aforementioned rules, if the target process's preceding process has a sub-process that meets the preset conditions, that is, if the preceding process has a persistently stored, multi-level, non-virtual sub-process, then it is determined whether the target process's preceding process can be replaced by the persistently stored, multi-level, non-virtual sub-process of that preceding process. If the target process's preceding process can be replaced, then the target process's process information is re-determined based on the preceding process to be replaced, and the target process's process data is reconstructed based on the re-determined process information. The reconstructed target process's process data is then stored in the target block in the blockchain.

[0084] Specifically, if the preceding process of the target process has a sub-process that meets preset conditions, and the preceding process of the target process cannot be replaced, then in order to ensure that the process data of all processes of the target business is error-free, the target process needs to be discarded. This allows for the storage and management of the target business's process data through blockchain, achieving traceable data storage and maintaining the integrity of the process data.

[0085] In one embodiment, the method further includes: in response to the existence of a directly connected subsequent virtual process in the preceding process, modifying the process data according to the preceding process and the subsequent virtual process; and storing the target process and process data in a target block of the blockchain according to the process identifier of the target process, including: storing the target process and the modified process data in the target block according to the process identifier of the target process.

[0086] In this scheme, when judging the target process according to the aforementioned rules, if the target process has a directly connected subsequent virtual process as its predecessor, then to ensure the accuracy of the target process's process data and the integrity of the target business's process data, the current process data of the target process can be modified based on the predecessor and subsequent virtual processes. After modification, the target process and the modified process data are stored together in the target block. This enables the storage and management of the target business's process data through blockchain, achieving traceable data storage and maintaining the integrity of the process data.

[0087] In one embodiment, after storing the target process and process data in the target block of the blockchain according to the process identifier of the target process, the method further includes: in response to the existence of sibling processes of the target process and the number of sibling processes of the target process not increasing, determining whether it is necessary to construct virtual sub-processes for the target process and the sibling processes of the target process; in response to the need to construct virtual sub-processes for the target process and the sibling processes of the target process, constructing virtual sub-processes; and storing the virtual sub-processes in the corresponding blocks in the blockchain.

[0088] In this scheme, after storing the target process and the constructed process data, or the target process and the modified process data, in the blockchain, to ensure the integrity of the target business process and facilitate the calculation of a business snapshot of a subsequent process, it can be determined whether the target process has a sibling process. If the target process has a sibling process and no new sibling processes will be added, then virtual sub-processes can be constructed for the target process and its sibling processes, for example... Figure 7 Virtual process 1 and virtual process 2 in the example.

[0089] Specifically, if virtual sub-processes are constructed for the target process and its peer processes, the constructed virtual sub-processes can be stored in the corresponding blocks in the blockchain for persistent storage. This enables the storage and management of the target business process data through the blockchain, achieving traceable data storage and maintaining the integrity of the process data.

[0090] Optionally, when storing processes and process data in a blockchain, for the same business transaction, different processes are generally stored in different blocks, but subsequent processes that reference the same preceding process can be stored in the same block. For example... Figure 7 In this example, processes 2 and 3 share a common prerequisite process (process 1), therefore, processes 2 and 3 can be stored in the same block. Similarly, processes 5 and 6 can also be stored in the same block. However, processes with a clear sequential relationship cannot be stored in the same block; for example, processes 1 and 2 cannot be stored in the same block, nor can processes 2 and virtual processes 1 be stored in the same block.

[0091] In one embodiment, the method further includes: constructing a business snapshot of the target process and / or virtual subprocess in response to the target process and / or virtual subprocess being a snapshot process; and storing the business snapshot.

[0092] In this scheme, creating snapshots of the process can improve the efficiency of subsequently calculating business snapshots of a particular process. After constructing the target process and / or virtual sub-process, it can be determined whether the target process and / or virtual sub-process are snapshot processes. If the target process and / or virtual sub-process are snapshot processes, then the business snapshots of the target process and / or virtual sub-process need to be persistently saved. Therefore, business snapshots can be constructed for the target process and / or virtual sub-process, and the constructed business snapshots can be saved in the corresponding blocks in the blockchain.

[0093] Specifically, when determining whether a process is a snapshot process, the following principles can be followed:

[0094] (1) The initial process is a snapshot process;

[0095] (2) A process with a directly connected successor virtual process cannot be used as a snapshot process;

[0096] (3) A snapshot process can be a virtual process, but a virtual process is not necessarily a snapshot process;

[0097] (4) Select the appropriate process as the snapshot process in a timely manner, without having to generate a snapshot for each process.

[0098] The snapshot process determined according to the above principles forms a data chain that propagates unidirectionally and in a single chain in the direction of time, which can prevent inconsistencies and dirty data in the business process data.

[0099] For example, such as Figure 8 As shown, Figure 8 This is a schematic diagram of the snapshot determination process provided in the embodiments of this application. Process 1, as the initial process, needs to save the corresponding business snapshot; Processes 2, 3, and 4, since they do not have directly connected virtual processes after them, can all be candidate processes for snapshot processes, and whether to select them as snapshot processes can be based on business needs; Processes 5, 6, 7, 9, and 10, since they all have directly connected virtual processes after them, cannot be selected as snapshot processes; Processes 8 and 11, as virtual processes, can be selected as snapshot processes.

[0100] In one embodiment, the method further includes: in response to receiving a request to obtain a business snapshot of a target process, determining a process connection graph of the target business, the process connection graph representing the relationship between all processes of the target business; based on the process connection graph, traversing upwards level by level from the target process, determining the snapshot process closest to the target process as the baseline snapshot process of the target process; determining the shortest path between the baseline snapshot process and the target process, the starting process of the shortest path being the baseline snapshot process, and the ending process of the shortest path being the target process; starting from the baseline snapshot process, sequentially calculating the transaction indications in the process data of each level of the shortest path to obtain a business snapshot of the target process.

[0101] In this scheme, when calculating a business snapshot of a process stored on the blockchain, such as a target process, the process connection diagram of the target business can be determined first, for example... Figure 8 Then, graph traversal, shortest path, minimum spanning tree, and graph matching can be used to determine the business snapshot of the target process in the process connection graph. For example, a shortest path that meets certain conditions can be found starting from a specified process in the graph and ending at the target process to determine the baseline snapshot process and perform subsequent snapshot calculations; or graph traversal can be used to determine whether a specified process has a subprocess that meets certain conditions to determine whether the specified process can be referenced.

[0102] Specifically, when determining the business snapshot of a target process, the target process can be used as the starting point, traversing the parent nodes of each level upwards to construct the shortest path. The snapshot process closest to the target process is then found and used as the baseline snapshot process, which is also the starting point of the shortest path. Then, starting from this baseline snapshot process, the transaction instructions of each process are executed level by level along the shortest path, following the process propagation direction, until all transaction instructions of the target process have been executed, thus obtaining the business snapshot of the target process. By constructing business snapshots for processes, the efficiency of subsequently calculating the business snapshot of a particular process can be improved.

[0103] For example, such as Figure 8 As shown, process 1 is a snapshot process. When obtaining the business snapshot corresponding to process 4, process 1 is first found as the baseline snapshot process by tracing upwards level by level. The shortest path is constructed, which is process 1 → process 2 → process 3 → process 4. The business snapshot corresponding to process 4 is obtained according to the transaction instructions of process 1 → process 2 → process 3 → process 4.

[0104] In one embodiment, the transaction indications in the process data of each level of the process are calculated sequentially along the shortest path, including: in response to the existence of a virtual process on the shortest path, ignoring the transaction indications in the process data of the next level process of the virtual process.

[0105] In this scheme, if a process on the shortest path has a directly connected virtual process, the transaction instructions of the virtual process are executed directly. By building business snapshots for processes, the efficiency of subsequently calculating business snapshots for a process can be improved.

[0106] For example, such as Figure 8 As shown, processes 1 and 3 are snapshot processes. When obtaining the business snapshot corresponding to process 9, process 3 is first found as the baseline snapshot process by tracing upwards level by level, and the shortest path is constructed, as follows: Figure 9 As shown, Figure 9 This is a schematic diagram of the shortest path of the process provided in the embodiment of this application. The shortest path is process 3 → process 4 → process 5 → process 9. Since process 5 has a directly connected virtual process, namely process 8, the transaction instruction of process 8 can be directly calculated and the transaction instruction of process 5 can be skipped. Therefore, when determining the business snapshot corresponding to process 9 according to the shortest path, the business snapshot corresponding to process 9 is obtained according to the transaction instruction of process 3 → process 4 → process 8 → process 9.

[0107] Optionally, the data of the business snapshot corresponding to the snapshot process can be stored in the same block as the snapshot process, or the data of the business snapshot can be stored elsewhere (it can be stored in any type of database), with only the summary (hash) of the business snapshot data and the snapshot process stored in the same block. The specific storage method adopted depends on storage costs and business needs.

[0108] Alternatively, in a process connection diagram, a process can also be referred to as a process node, or node.

[0109] In one embodiment, when determining the business snapshot of the target process, in addition to calculating the transaction indication of each process sequentially according to the shortest path, it can also be determined in the following manner:

[0110] In the shortest path (starting from the baseline snapshot process and ending at the target process), a sub-process of the baseline snapshot process is selected. If multiple sub-processes exist, a non-virtual process is selected as the currently processed process. It is then determined whether the selected sub-process has a directly connected virtual process. If the sub-process has a directly connected virtual process, the sub-process is skipped, the transaction instruction of the virtual process is calculated, the business snapshot of the selected sub-process is obtained, and the virtual process is used as the currently processed process. If the sub-process does not have a directly connected virtual process or is itself a virtual process, the transaction instruction of the process is directly calculated, and the business snapshot of the selected sub-process is obtained.

[0111] The process determines whether the currently processed sub-process (selected sub-process) is the target process. If it is, a business snapshot of the currently processed process is output; otherwise, the process continues to select sub-processes of the currently processed process in the shortest path, iterating until the target process is matched, and then the business snapshot of the target process is output, ending the processing. This completes the calculation and acquisition of the business snapshot corresponding to a process. By constructing a business snapshot for a process, the efficiency of subsequently calculating the business snapshot of a process can be improved.

[0112] The data processing method provided in this embodiment utilizes blockchain to store and manage process data for complex businesses. Because blockchain blocks are linked together sequentially along a time dimension, the data flow is unidirectional and single-chained based on time. Therefore, the process data is updated gradually in chronological order, making it suitable for storing and managing complex business process data. Furthermore, blockchain's immutability—once a block is generated and becomes a historical block—prevents modification, thus maintaining the integrity of process data in the face of attacks.

[0113] In general, the technical solution provided in this application is a solution that can both store and manage large and complex business process data, and also help maintain the integrity of process data when facing attacks.

[0114] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0115] This application also provides a data processing apparatus. Figure 10 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application, such as... Figure 10 As shown, the data processing device 1000 includes:

[0116] The process information acquisition module 1001 is used to acquire the process information of the target process of the target business.

[0117] The process data construction module 1002 is used to construct the process data of the target process based on the process information. The process data includes the process identifier of the target process, the process identifier of the preceding process, and the transaction instruction.

[0118] The process data storage module 1003 is used to store the target process and process data in the target block of the blockchain according to the process identifier of the target process. The process identifier of the target process includes the identifier information of the target block.

[0119] Optionally, when constructing the process data of the target process based on the process information, the process data construction module 1002 is specifically used to: construct the process data of the target process in the process connection diagram, which is used to represent the chain relationship between all processes of the target business.

[0120] Optionally, when the process data storage module 1003 stores the target process and process data in the target block of the blockchain according to the process identifier of the target process, it is specifically used to: determine the preceding process referenced by the target process; in response to the preceding process not having a sub-process that meets the preset conditions, determine whether the preceding process has a directly connected subsequent virtual process, the preset conditions being used to indicate that the process is a persistently stored, multi-level, non-virtual process; in response to the preceding process not having a directly connected subsequent virtual process, store the target process and process data in the target block according to the process identifier of the target process.

[0121] Optionally, the data processing device 1000 further includes a processing module (not shown), which is used to: determine whether the preceding process can be replaced in response to the existence of a sub-process that meets preset conditions in the preceding process; reconstruct the process data according to the process information in response to the fact that the preceding process can be replaced; and discard the target process in response to the fact that the preceding process cannot be replaced.

[0122] Optionally, the processing module is also used to: in response to the existence of a directly connected subsequent virtual process in the preceding process, modify the process data according to the preceding process and the subsequent virtual process; correspondingly, when the process data storage module 1003 saves the target process and process data in the target block of the blockchain according to the process identifier of the target process, it is specifically used to: save the target process and the modified process data in the target block according to the process identifier of the target process.

[0123] Optionally, the processing module is further configured to: after storing the target process and process data in the target block of the blockchain according to the process identifier of the target process, in response to the existence of sibling processes of the target process and the fact that the number of sibling processes of the target process does not increase, determine whether it is necessary to construct virtual sub-processes for the target process and its sibling processes; in response to the need to construct virtual sub-processes for the target process and its sibling processes, construct the virtual sub-processes; and store the virtual sub-processes in the corresponding blocks of the blockchain.

[0124] Optionally, the processing module is also used to: construct a business snapshot of the target process and / or virtual sub-process in response to the target process and / or virtual sub-process being a snapshot process; and store the business snapshot.

[0125] Optionally, the processing module is further configured to: in response to receiving a request to obtain a business snapshot of the target process, determine the process connection diagram of the target business, the process connection diagram being used to represent the relationship between all processes of the target business; based on the process connection diagram, traverse upwards level by level starting from the target process, and determine the snapshot process closest to the target process as the baseline snapshot process of the target process; determine the shortest path between the baseline snapshot process and the target process, the starting process of the shortest path being the baseline snapshot process, and the ending process of the shortest path being the target process; starting from the baseline snapshot process, sequentially calculate the transaction indications in the process data of each level of the shortest path to obtain the business snapshot of the target process.

[0126] Optionally, when the processing module calculates the transaction indications in the process data of each level of the process sequentially along the shortest path, it is specifically used to: in response to the existence of a virtual process on the shortest path, ignore the transaction indications in the process data of the next level process of the virtual process.

[0127] The data processing device provided in this embodiment is used to execute the technical solution of the data processing method in the aforementioned method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0128] This application also provides an electronic device. Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 11 As shown, the electronic device 1100 includes:

[0129] The processor 1111, the memory 1112 connected to the processor 1111, and the interaction interface 1113;

[0130] The memory 1112 is used to store computer-executable instructions that can be executed by the processor 1111;

[0131] The processor 1111 is configured to execute computer instructions stored in the execution memory 1112 to implement the above-mentioned data processing method.

[0132] In the aforementioned electronic device 1100, the memory 1112, processor 1111, and interaction interface 1113 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines, such as bus connections. The memory 1112 stores computer-executable instructions for implementing data processing methods, including at least one software functional module that can be stored in the memory in the form of software or firmware. The processor 1111 executes various functional applications and data processing by running the software programs and modules stored in the memory 1112.

[0133] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM). The memory stores programs, which are then executed by the processor upon receiving execution instructions. Furthermore, the software programs and modules within the memory may include an operating system, which can include various software components and / or drivers for managing system tasks (e.g., memory management, storage device control, power management), and can communicate with various hardware or software components to provide an operating environment for other software components.

[0134] A processor can be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0135] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the technical solution of the data processing method provided in the foregoing method embodiments.

[0136] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solution of the data processing method provided in the foregoing method embodiments.

[0137] 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 claims.

[0138] 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 data processing method, characterized in that, include: Obtain the process information of the target business's target process; Based on the process information, process data of the target process is constructed in the process connection graph. The process connection graph is used to represent the chain relationship between all processes of the target business in a directed acyclic graph. The process data includes the process identifier of the target process, the process identifier of at least one preceding process, and a transaction indication. The process data is used to calculate a business snapshot based on the chain relationship. Based on the process identifier of the target process, the target process and the process data are stored in the target block of the blockchain, wherein the process identifier of the target process includes the identifier information of the target block; In response to the existence of sibling processes in the target process, and the number of sibling processes in the target process does not increase, it is determined whether it is necessary to construct virtual sub-processes for the target process and its sibling processes. In response to the need to construct the virtual sub-process for the target process and its sibling processes, the virtual sub-process is constructed. The virtual subprocess is stored in the corresponding block in the blockchain; Also includes: In response to receiving a request to obtain a business snapshot of the target process, a process connection diagram of the target business is determined, the process connection diagram being used to represent the relationships between all processes of the target business; Based on the process connection diagram, starting from the target process, traverse upwards level by level, and determine the snapshot process that is closest to the target process as the baseline snapshot process of the target process; Determine the shortest path between the baseline snapshot process and the target process, wherein the starting process of the shortest path is the baseline snapshot process, and the ending process of the shortest path is the target process. Starting from the baseline snapshot process, the transaction indications in the process data of each level of the process are calculated sequentially along the shortest path to obtain the business snapshot of the target process.

2. The data processing method according to claim 1, characterized in that, The step of storing the target process and the process data in the target block of the blockchain according to the process identifier of the target process includes: Determine the preceding processes referenced by the target process; In response to the absence of a sub-process that meets the preset conditions in the preceding process, it is determined whether there is a directly connected subsequent virtual process in the preceding process. The preset conditions are used to indicate that the process is a persistently stored, multi-level, non-virtual process. In response to the absence of a directly connected subsequent virtual process in the preceding process, the target process and the process data are stored in the target block according to the process identifier of the target process.

3. The data processing method according to claim 2, characterized in that, Also includes: In response to the existence of a sub-process in the preceding process that meets the preset conditions, it is determined whether the preceding process can be replaced; In response to the possibility of replacing the preceding process, the process data is reconstructed based on the process information; In response to the fact that the preceding process cannot be replaced, the target process is discarded.

4. The data processing method according to claim 2, characterized in that, Also includes: In response to the existence of a directly connected subsequent virtual process in the preceding process, the process data is modified according to the preceding process and the subsequent virtual process; The step of storing the target process and the process data in the target block of the blockchain according to the process identifier of the target process includes: Based on the process identifier of the target process, the target process and the modified process data are stored in the target block.

5. The data processing method according to any one of claims 1-4, characterized in that, Also includes: In response to the target process and / or the virtual sub-process being a snapshot process, a business snapshot of the target process and / or the virtual sub-process is constructed; Store the business snapshot.

6. The data processing method according to any one of claims 1-4, characterized in that, Calculate the transaction instructions in the process data of each level of the process sequentially along the shortest path, including: In response to the existence of a virtual process on the shortest path, the transaction indication in the process data of the parent process of the virtual process is ignored.

7. A data processing apparatus, characterized in that, include: The process information acquisition module is used to acquire process information of the target process of the target business. A process data construction module is used to construct process data of the target process in a process connection graph based on the process information. The process connection graph is used to represent the chain relationship between all processes of the target business in a directed acyclic graph. The process data includes the process identifier of the target process, the process identifier of at least one preceding process, and a transaction indication. The process data is used to calculate a business snapshot based on the chain relationship. The process data storage module is used to store the target process and the process data in the target block of the blockchain according to the process identifier of the target process, wherein the process identifier of the target process includes the identifier information of the target block; The processing module is configured to, in response to the existence of sibling processes in the target process and the number of sibling processes in the target process not increasing, determine whether it is necessary to construct virtual sub-processes for the target process and its sibling processes; in response to the need to construct the virtual sub-processes for the target process and its sibling processes, construct the virtual sub-processes; and store the virtual sub-processes in the corresponding blocks in the blockchain. The processing module is further configured to, in response to receiving a request to obtain a business snapshot of the target process, determine a process connection graph of the target business, wherein the process connection graph represents the relationship between all processes of the target business; based on the process connection graph, traverse upwards level by level starting from the target process, and determine the snapshot process closest to the target process as the baseline snapshot process of the target process; determine the shortest path between the baseline snapshot process and the target process, wherein the starting process of the shortest path is the baseline snapshot process, and the ending process of the shortest path is the target process; starting from the baseline snapshot process, calculate the transaction indication in the process data of each level of the shortest path in sequence to obtain a business snapshot of the target process.

8. An electronic device, characterized in that, include: A processor, and a memory connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the data processing method as described in any one of claims 1 to 6.

9. 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 data processing method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the data processing method as described in any one of claims 1 to 6.