Engineering project collaborative flow method based on multi-source service data fusion
By generating cross-source event causal chains and collaborative version vectors, the problems of late data identification and consistency in the flow of engineering project collaboration platforms are solved, achieving accurate flow and state stability of engineering matters, and avoiding duplicate flow and historical data backfeeding.
Patent Information
- Application Number
- CN202611473954.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-21
- Publication Date
- 2026-11-24
AI Technical Summary
Existing project collaboration platforms struggle to accurately identify late data during project changes, leading to issues such as duplicate processing, historical data backlog, and inconsistent business status. This is especially true when the change process fails and is re-split, as existing technologies cannot distinguish between currently valid branches and expired historical branches.
By generating a cross-source event causal chain, establishing an event fingerprint using the preceding receipt number, determining the current valid tail node, generating a collaborative version vector, using the transfer token and the integrated business snapshot for data verification, identifying late backfeed events and performing difference compensation processing, the system ensures data consistency and transfer accuracy.
It enables accurate differentiation between currently valid branches and expired historical branches after engineering change withdrawal and splitting, avoids old process data from overwriting the current state, improves branch consistency and state stability of multi-source business flow, and reduces the probability of duplicate flow and error compensation.
Smart Images

Figure CN123160106A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of engineering project data processing and collaborative workflow technology, specifically to an engineering project collaborative workflow method based on the fusion of multi-source business data. Background Technology
[0002] Existing project collaboration platforms typically connect to separate business systems such as contracts, progress tracking, materials management, visas, and changes. They then integrate multi-source business data using common fields like project number and business number, and drive approval, countersigning, measurement, or settlement processes based on the integrated business status. Because different business systems employ independent version management and message feedback mechanisms, when project changes are withdrawn, split, and re-initiated, the old and new processes may continue to use the same business number. Furthermore, the data versions and feedback sequences generated by each business source are independent, making it difficult for the platform to determine the current valid business status for the workflow based solely on the business number, update time, or a single version number.
[0003] Especially when the original change process has become invalid, the newly split process has entered subsequent collaboration nodes, and a certain business source re-transmits the original process data due to compensation retries, interface backlogs, or offline recovery, the late data may still meet the field association conditions of the existing platform, thus overriding the fusion result corresponding to the new process, or triggering closed approval and countersigning nodes again. Existing processing methods based on timestamp sorting, latest version overriding, or unified status code verification are difficult to identify whether late data actually belongs to the currently valid process or an invalid historical branch, and the version numbers of different business sources lack direct comparability, which can easily lead to problems such as duplicate processing of engineering matters, historical data backfeeding, and inconsistent business statuses used in subsequent nodes. Summary of the Invention
[0004] The purpose of this invention is to provide a collaborative workflow method for engineering projects based on the fusion of multi-source business data, in order to address the shortcomings of the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a collaborative workflow method for engineering projects based on multi-source business data fusion, comprising: Obtain multiple business source events corresponding to engineering matters, generate event fingerprints based on the project identifier, business object identifier, source version number and previous receipt number carried by each business source event, and establish cross-source event causal chain based on the previous receipt number; Based on the cross-source event causal chain, determine the current valid tail node and the necessary business source corresponding to the project item, obtain the confirmed version of each necessary business source for the current valid tail node, and generate a collaborative version vector corresponding to the source identifier and the confirmed version. Match the preceding receipt number of the newly arrived business source event with the current valid tail node. When the preceding receipt number points to an expired historical branch, mark the business source event as a backfeed event and write it into the isolated branch. When it points to the current valid tail node, use the business source event to update the collaborative version vector and the cross-source event causal chain. A transfer token is generated based on the updated collaborative version vector and the current valid tail node, and the transfer token is sent to the next collaborative node along with the converged service snapshot; The next collaborative node executes the engineering matter flow when the collaborative version vector in the flow token and the current valid tail node are consistent with the local record; otherwise, it generates a difference compensation result based on the isolated branch and the fused business snapshot, updates the cross-source event causal chain based on the difference compensation result, and then re-executes the flow verification.
[0006] Preferably, the generation of cross-source event causal chains includes: The event fingerprint is obtained by encoding and concatenating the fixed fields of project identifier, business object identifier, source identifier, source version number and previous receipt number, and performing a deterministic hash operation on the concatenation result. Find the corresponding preceding event fingerprint based on the preceding receipt number of the business source event, establish a directed association relationship between the preceding event fingerprint and the event fingerprint of the current business source event, and form the cross-source event causal chain based on the directed association relationship.
[0007] Preferably, determining the current valid tail node includes: traversing from the root node of the cross-source event causal chain along the direction from the preceding event to the succeeding event; when the same preceding event has two or more succeeding events, the branch that was replaced due to withdrawal and resubmission or split and re-initiation is determined as the invalid historical branch; the branch that was not subsequently withdrawn or replaced is determined as the valid branch; and the event node in the valid branch that does not have a valid succeeding event is determined as the current valid tail node.
[0008] Preferably, the generation of the collaborative version vector includes: querying the corresponding necessary business source based on the collaborative node identifier carried by the current valid tail node, and obtaining the confirmation record formed by each necessary business source for the current valid tail node and whose confirmation status is confirmed; when there are multiple confirmation records for the same necessary business source, selecting the confirmation record with the largest source version number within the business source and determining its source version number as the confirmed version of the business source; after all necessary business sources have obtained confirmed versions, arranging the business source identifier-confirmed version data items in a fixed order according to the business source identifier to form a collaborative version vector, without comparing the numerical values of the source version numbers of different business sources.
[0009] Preferably, the branch determination of the newly arrived service source event includes: finding the corresponding event fingerprint based on its preceding receipt number, and tracing back the branch node along the cross-source event causal chain starting from the node corresponding to the event fingerprint; connecting the event fingerprint of the branch node with the first successor event fingerprint from the branch node toward the newly arrived service source event in a fixed order to form a preceding branch anchor value, and generating a valid branch anchor value for the branch to which the current valid tail node belongs in the same way; when the two branch anchor values are inconsistent, the newly arrived service source event is identified as a backfeed event and connected to the isolated branch; when the two branch anchor values are consistent and the preceding receipt number corresponds to the current valid tail node, the newly arrived service source event is continued to the current valid tail node and identified as the updated current valid tail node.
[0010] Preferably, after a newly arriving business source event is continued to the current valid tail node, the source identifier of the business source event is read, and the confirmed version corresponding to the same source identifier in the collaborative version vector is replaced only with the confirmed source version number of the business source event, while keeping the confirmed versions corresponding to other business sources unchanged; when the newly arriving business source event is written to the isolated branch, the current valid tail node and the collaborative version vector remain unchanged.
[0011] Preferably, the generation of the circulation token includes: The project identifier, business object identifier, updated current valid tail node event fingerprint, and updated collaboration version vector are encoded and concatenated according to a fixed field order to obtain the token raw data. Based on the business source identifiers and their confirmed versions in the collaborative version vector, extract the business fields corresponding to the current valid branch to form a fused business snapshot. Then, encode the fused business snapshot in a fixed field order and perform a deterministic hash operation to obtain the snapshot fingerprint. After writing the snapshot fingerprint into the token's original data, the token verification value is recalculated, so that the current valid tail node, the collaborative version vector, and the converged service snapshot are all bound to the same transfer token, and the transfer token and the converged service snapshot are sent to the next collaborative node.
[0012] Preferably, the next collaborative node compares the transfer token with the current valid tail node event fingerprint in the local record, and compares the collaborative version vectors of the two item by item according to the business source identifier. If the current valid tail node event fingerprint and each confirmed version are consistent, the engineering item transfer is executed; otherwise, the difference compensation process is entered.
[0013] Preferably, the difference compensation process includes: selecting end events corresponding to business sources with inconsistent versions from isolated branches based on business object identifiers; comparing the business field values in the end events with the field values with the same field identifiers in the merged business snapshot item by item, and identifying the fields with inconsistent field values as difference fields; merging the difference fields according to the source identifiers to form a set of compensation fields corresponding to each business source, and generating compensation events using the corresponding field values in the merged business snapshot as target field values; pointing the pre-order receipt number of the first compensation event to the current valid tail node before compensation, and pointing subsequent compensation events to the previous compensation event in sequence to form a continuous compensation sub-chain, and linking the compensation sub-chain to the cross-source event causal chain.
[0014] Preferably, the end event of the compensation subchain is determined as the updated current valid tail node, and the confirmed version corresponding to the same source identifier in the collaborative version vector is replaced only with the source version number of each compensation event. The circulation token is regenerated according to the updated current valid tail node and the collaborative version vector, and the circulation verification of the next collaborative node is re-executed with the regenerated circulation token.
[0015] The technical effects and advantages provided by the present invention in the above technical solution are as follows: This invention differs from existing technologies by no longer relying solely on business IDs, timestamps, or single version numbers to determine the relationship between old and new multi-source business events. Instead, it utilizes prior receipt numbers to establish a causal chain for cross-source events and identifies delayed backfeed events through the current valid tail node, branch anchor values, and isolated branches. Therefore, even after engineering changes are withdrawn or split and reissued while still using the same business ID, it accurately distinguishes between currently valid branches and expired historical branches. This prevents old process compensation data from overwriting the current business state or repeatedly triggering closed collaboration nodes, directly improving branch consistency and state stability during multi-source business workflows.
[0016] This invention organizes the confirmed versions of each necessary business source into a collaborative version vector, and binds it together with the current valid tail node and the merged business snapshot to a transfer token. When the next collaborative node verification is inconsistent, a compensation event is generated based on the isolated branch and the merged business snapshot, and the cross-source event causal chain is reconnected with a continuous compensation sub-chain. Through this process, misjudgments caused by the inability to directly compare version numbers of different business sources can be avoided, and abnormal data can be repaired to form a new traceable valid link, rather than directly overwriting the original data. This reduces the probability of cross-node state drift, duplicate transfers, and error compensation, and improves the consistency, traceability, and continuity of collaborative transfer of engineering matters. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0018] Figure 1 This is a flowchart of the method of the present invention.
[0019] Figure 2 This is a flowchart for determining the branch of a newly arriving business source event in this invention.
[0020] Figure 3 This is a flowchart illustrating the generation process of the circulation token and integrated business snapshot in this invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1, please refer to Figures 1 to 3 As shown in this embodiment, the collaborative workflow method for engineering projects based on multi-source business data fusion includes: Obtain multiple business source events corresponding to engineering matters, generate event fingerprints based on the project identifier, business object identifier, source version number and previous receipt number carried by each business source event, and establish cross-source event causal chain based on the previous receipt number.
[0023] In one embodiment, the engineering matter refers to a specific business object that requires collaborative flow across business data within the same engineering project, including any one of engineering changes, engineering visas, progress measurement, material confirmation, or cost adjustments; each engineering matter has a unique business object identifier. The business source event refers to a data record formed after any business data source performs an operation of adding, modifying, withdrawing, splitting, resubmitting, or confirming the engineering matter. Each business source event includes at least a source identifier, a project identifier, a business object identifier, a source version number, a previous receipt number, and event content. The source identifier distinguishes the data source that generated the event; the project identifier determines the engineering project to which the event belongs; the business object identifier determines the specific engineering matter corresponding to the event; and the event content records the business field values and operation type generated by this operation. The source version number is an incrementally increasing sequence number assigned by the same source to the same business object according to the order in which the events are generated. Its comparison range is limited to events corresponding to the same source identifier and the same business object identifier. For example, when the same source generates versions V1, V2, and V3 sequentially, V3 represents the third version generated by that source for the business object, and version numbers from other sources are not directly compared with V3. The preceding receipt number is a unique receipt identifier corresponding to the previous business state upon which the current business source event is based. When a business source event is generated by continuing the processing of a previous event, the receipt number generated after the previous event was completed is written into the preceding receipt number field of the current business source event; for business source events where an engineering matter is generated for the first time and there is no previous event, the preceding receipt number is set to a pre-agreed null value. Thus, the preceding receipt number indicates the succession relationship between the current event and its direct preceding event, rather than simply indicating the time of event generation.
[0024] After obtaining a business source event, an event fingerprint is generated based on the project identifier, business object identifier, source identifier, source version number, and preceding receipt number of the business source event. The event fingerprint is a fixed-length identifier value used to uniquely represent a business source event. Specifically, each field is character-encoded and concatenated according to a fixed field order of "project identifier, business object identifier, source identifier, source version number, and preceding receipt number," and a preset hash operation is performed on the concatenation result to obtain the event fingerprint; when any of the above fields changes, a different event fingerprint is obtained. By incorporating the source identifier into the event fingerprint, event confusion can be avoided when different data sources have the same source version number; by incorporating the preceding receipt number into the event fingerprint, the event fingerprint can simultaneously represent the event itself and the preceding business status it carries.
[0025] A cross-source event causal chain is established based on the preceding receipt number carried by each business source event. Specifically, after each business source event is processed, a unique receipt number is generated for that business source event, and the one-to-one correspondence between the receipt number and the event fingerprint of that business source event is saved. For subsequent business source events, the corresponding event fingerprint is found based on its preceding receipt number. The found event fingerprint is used as the preceding event fingerprint, and the event fingerprint of the subsequent business source event is used as the successor event fingerprint. The directed association between the two is recorded. Multiple directed associations are connected in the direction from the preceding event to the successor event to form the cross-source event causal chain. "Cross-source" means that adjacent preceding and successor events can come from different business data sources. Therefore, the causal chain is not sorted by the version number of a single source, but by the actual preceding receipt number carried to determine the event succession relationship. When two business source events have the same preceding receipt number but form different successor events, the two successor events are connected to the same preceding event, thereby forming mutually independent branches, providing a definite data basis for subsequent identification of the current valid branch and the invalid historical branch.
[0026] Based on the cross-source event causal chain, determine the current valid tail node and the necessary business source corresponding to the project item, obtain the confirmed version of each necessary business source for the current valid tail node, and generate a collaborative version vector corresponding to the source identifier and the confirmed version.
[0027] The current valid tail node is determined based on the established cross-source event causal chain. The current valid tail node refers to an event node in the valid event branch of the project that no longer has a valid successor event, representing the current business state where the project is allowed to continue collaborative flow. Specifically, the traversal proceeds from the root node of the cross-source event causal chain in the direction from the preceding event to the successor event. When the same preceding event corresponds to only one successor event, the branch containing that successor event remains a valid branch. When the same preceding event corresponds to two or more successor events, the branch validity is determined based on the operation type and branch status in the event content of each successor event. The branch status includes two values: valid and invalid. A business branch that was replaced due to withdrawal and resubmission or splitting and re-initiating is considered invalid; a newly formed business branch that has not been subsequently withdrawn or replaced is considered valid. The traversal continues along the valid branches until a node with no valid successor event is reached. This node is then determined as the current valid tail node, and its event fingerprint and corresponding receipt number are recorded.
[0028] After determining the current valid tail node, the necessary business sources for the project to participate in this workflow are identified based on the corresponding collaborative node identifier. The collaborative node identifier is recorded in the event content of the business source event corresponding to the current valid tail node, used to distinguish the specific workflow stage of the project: change review, cost confirmation, progress confirmation, material verification, or settlement confirmation. A pre-established mapping table between collaborative node identifiers and business source identifiers is created, including at least three fields: collaborative node identifier, business source identifier, and participation attribute. The participation attribute is either required or not required. All records with the same collaborative node identifier as the current valid tail node and a required participation attribute are read, and the corresponding business source identifier is identified as the necessary business source for this workflow. For example, when the current collaborative node is a change cost confirmation node, the change business source, contract business source, and cost business source can be identified as necessary business sources, while material business sources unrelated to this node do not participate in this version confirmation.
[0029] For each essential business source, obtain its confirmation record for the current valid tail node. The confirmation record includes at least the business source identifier, the receipt number of the current valid tail node, the source version number, and the confirmation status. The receipt number of the current valid tail node defines the specific business status corresponding to the confirmation record, which includes confirmed and unconfirmed. If multiple confirmation records for the same essential business source have a confirmed status and all correspond to the receipt number of the current valid tail node, select the confirmation record with the largest source version number according to the increasing relationship of the source version numbers within the business source, and determine its confirmed version as the confirmed version of the essential business source. Source version numbers are compared only under the same business source identifier; numerical comparisons are not performed between source version numbers from different business sources. If any essential business source does not have a confirmation record corresponding to the current valid tail node with a confirmed status, the project remains in a pending confirmation state, and a complete collaborative version vector is not generated until all essential business sources have obtained their corresponding confirmed versions.
[0030] After all necessary business sources have obtained confirmed versions, each business source identifier and its confirmed version are grouped into a binary data item according to a fixed sorting order, and then arranged sequentially to form the collaborative version vector. For example, if the three necessary business sources are S1, S2, and S3, and their confirmed versions for the current valid tail node are V4, V11, and V6 respectively, then the collaborative version vector is represented as <(S1, V4), (S2, V11), (S3, V6)>. Thus, the collaborative version vector stores the confirmed version status of each necessary business source under the same current valid tail node, without needing to convert version numbers that are not directly comparable between different business sources into a single version value, and can serve as the version basis for updating the event causal chain and generating circulation tokens when subsequent business source events arrive.
[0031] Match the preceding receipt number of the newly arrived business source event with the current valid tail node. When the preceding receipt number points to an expired historical branch, mark the business source event as a backfeed event and write it into the isolated branch. When it points to the current valid tail node, use the business source event to update the collaborative version vector and the cross-source event causal chain.
[0032] Based on the preceding receipt number carried by the newly arrived business source event, the event fingerprint uniquely corresponding to that preceding receipt number is queried from the pre-saved "receipt number-event fingerprint" correspondence, and the queried event fingerprint is identified as the event fingerprint to be traced. Starting from the event node corresponding to the event fingerprint to be traced, the preceding events are searched node by node along the cross-source event causal chain in the opposite direction to the event generation direction until the first event node with two or more successor events is reached. This event node is identified as the nearest branch node. Here, "nearest" means the fewest number of edges traversed in reverse from the event fingerprint to be traced, not calculated according to the event generation time. If the event to be traced itself is a node with two or more successor events, then this node is directly identified as the nearest branch node. Through the above processing, it can be determined from which branch position the preceding business state inherited by the newly arrived business source event is derived.
[0033] After identifying the nearest branch node, search for an event node along the path pointing to the event fingerprint to be traced from that branch node. This event node is then identified as the first successor event to the newly arrived service source event. If the newly arrived service source event has the aforementioned branch node as its direct preceding event, then the event fingerprint of the newly arrived service source event itself is used as the first successor event fingerprint. Let the event fingerprint of the branch node be... The fingerprint of the first subsequent event is By concatenating the two according to a fixed field order, the anchor value of the preceding branch is obtained: ; in, This represents a sequential concatenation of fixed-length byte strings; since the event fingerprints use the same length, the preceding and following parts after concatenation have definite boundaries. For the current valid tail node, its nearest branch node and the first successor event towards the current valid tail node are obtained using the same reverse tracing method, and the valid branch anchor values are obtained according to the same concatenation order. .right and Perform a byte-by-byte comparison to determine whether two events are derived from the same successor path of the same branch node, thus avoiding the erroneous merging of different historical branches due to only comparing the business number or source version number.
[0034] when When a newly arrived business source event is identified as having an event path different from the path of the currently valid tail node, it is marked as a backfeed event. A backfeed event refers to a late event carrying a valid business object identifier but originating from a branch other than the currently valid branch. The corresponding preceding event is determined based on the preceding receipt number of the newly arrived business source event. A directed association is established between this preceding event and the newly arrived business source event, and this directed association and the new event fingerprint are recorded as an isolated branch. The isolated branch retains its causal relationship with the original preceding event but does not participate in the determination of the tail node of the currently valid branch, nor does it replace the confirmed version in the collaborative version vector with the source version number of the backfeed event. Therefore, the currently valid tail node and the collaborative version vector remain unchanged.
[0035] when If the preceding receipt number of a newly arriving business source event is the same as the receipt number corresponding to the current valid tail node, the event is determined to directly inherit the current valid business state. A directed association is established by using the event fingerprint of the current valid tail node as the preceding event fingerprint and the event fingerprint of the newly arriving business source event as the succeeding event fingerprint to update the cross-source event causal chain. Simultaneously, the source identifier of the business source event is read, and data items with the same source identifier are searched in the collaborative version vector. The original confirmed version of this data item is replaced with the confirmed source version number corresponding to the business source event, while data items corresponding to other sources remain unchanged. After the replacement is completed, the newly arriving business source event is determined as the updated current valid tail node. If the branch anchor value is the same but the preceding receipt number does not correspond to the current valid tail node, the above continuation and version replacement are not performed to avoid the historical intermediate nodes in the current valid branch deriving events again and changing the already confirmed current business state.
[0036] A transfer token is generated based on the updated collaborative version vector and the current valid tail node, and the transfer token is sent to the next collaborative node along with the converged service snapshot.
[0037] After the newly arriving business source event completes branch determination and updates the collaborative version vector and the current valid tail node, a transfer token is generated based on the update result. The transfer token characterizes the defined business state upon which the project matter is based during this collaborative transfer, and includes at least the project identifier, business object identifier, event fingerprint corresponding to the current valid tail node, and the updated collaborative version vector. The event fingerprint of the current valid tail node is used to limit the valid event branch to which this transfer depends, and the collaborative version vector is used to limit the data version of each necessary business source participating in this transfer. Following a predetermined field order, the project identifier, business object identifier, event fingerprint of the current valid tail node, and collaborative version vector are sequentially encoded and concatenated to obtain the token's original data. A hash operation is performed on the token's original data to obtain a token verification value, and the token's original data and token verification value are recorded together as the transfer token. For the collaborative version vector, each "Business Source Identifier - Confirmed Version" data item is written according to a fixed sorting order of the business source identifiers, ensuring that the same business state can obtain uniquely defined token original data.
[0038] Further, a fused business snapshot corresponding to the circulation token is generated based on the updated collaborative version vector. The fused business snapshot refers to a static data set obtained by selecting business data corresponding to confirmed versions recorded in the collaborative version vector from each necessary business source under the same currently valid tail node, and merging them according to the business field correspondence. Specifically, the business source identifier and confirmed version in the collaborative version vector are read sequentially. In the corresponding business source event, event records with the same source identifier as the business source identifier, the same source version number as the confirmed version, and belonging to the valid branch of the currently valid tail node are queried. The business field values in each event record are extracted and arranged using a pre-determined field identifier as the merge key. When the same field is provided by multiple business sources, the specified source value of the field is selected according to the pre-saved field-business source correspondence, without using the event arrival time as the overwrite basis. The resulting fused business snapshot corresponds one-to-one with each version item in the collaborative version vector and does not include backfeed event data from isolated branches.
[0039] To maintain the correspondence between the transfer token and the converged service snapshot, the converged service snapshot is encoded according to a fixed field order, and a snapshot fingerprint is calculated. The resulting snapshot fingerprint is then written into the transfer token. Let the encoded converged service snapshot be... Its snapshot fingerprint is: ;in, This indicates the deterministic hash operation used when generating the event fingerprint. This is used to identify the actual converged service snapshot carried in this transfer. After writing the snapshot fingerprint into the transfer token, the token verification value is recalculated based on all fields in the transfer token except for the token verification value, so that the current valid tail node, the collaborative version vector, and the converged service snapshot are all bound to the same transfer token.
[0040] After determining the next collaborative node, the transfer token and its corresponding fused business snapshot are combined into a single transfer data record and sent to the next collaborative node. The next collaborative node is the node following the current valid tail node and, according to the established transfer relationship of the project item, should receive the project item. During transmission, the transfer token and the business object identifier of the fused business snapshot are kept consistent, and the event fingerprint of the current valid tail node and the collaborative version vector in the transfer token are used as the basis for subsequent verification. Thus, the next collaborative node receives not only the fused business field values but also the valid event branches and the version status of each necessary business source corresponding to the formation of the business snapshot, providing a definite data foundation for subsequently determining whether the project item status at the time of receipt is still consistent with that at the time of transmission.
[0041] The next collaborative node executes the engineering matter flow when the collaborative version vector in the flow token and the current valid tail node are consistent with the local record; otherwise, it generates a difference compensation result based on the isolated branch and the fused business snapshot, updates the cross-source event causal chain based on the difference compensation result, and then re-executes the flow verification.
[0042] After receiving the transfer token and the merged business snapshot, the next collaborative node reads the corresponding local record based on the project identifier and business object identifier. The local record includes at least the currently valid tail node event fingerprint and collaborative version vector of the project item stored in the next collaborative node. First, the currently valid tail node event fingerprint in the transfer token is compared with the currently valid tail node event fingerprint in the local record. Then, the confirmed versions in the two collaborative version vectors are compared item by item according to the business source identifier. Only when the currently valid tail node event fingerprints are the same, and the two collaborative version vectors contain the same business source identifier and the confirmed versions corresponding to each business source identifier are the same, is the transfer status determined to be consistent, and the subsequent transfer of the project item is executed according to the merged business snapshot. If any comparison item is inconsistent, the transfer status is determined to have changed, and the difference compensation process begins.
[0043] When the workflow status is inconsistent, the isolated branch corresponding to the project item is located based on the business object identifier, and the event record corresponding to the currently inconsistent business source is selected from the isolated branch. If multiple consecutive events exist for the same business source in the isolated branch, the last event without subsequent events is selected according to the event pointing order of the isolated branch, and the business field value recorded in this last event is used as the comparison value for that business source. Subsequently, the comparison value is compared item by item with the field values with the same field identifier in the merged business snapshot. For any field... The difference can be expressed as: ;in, This indicates the field in the isolated branch end event. field values, Represents fields in the converged business snapshot field values, This indicates a difference in the field. If the field is missing on one side, the missing value will be treated as a null value in the comparison. All The field records its source identifier, field identifier, isolated branch field value, and merged business snapshot field value to form the difference compensation result.
[0044] Furthermore, the difference fields in the difference compensation results are merged according to the source identifier, and difference fields with the same source identifier are grouped into a compensation field set. For each compensation field set, the corresponding field value in the merged business snapshot is used as the target field value to be restored to the current effective business state, and a compensation event is generated based on the source identifier and its compensation field set. The compensation event includes at least the source identifier, business object identifier, compensated source version number, previous receipt number, and compensation field value; the compensated source version number is obtained according to the existing ascending order within the source and is not compared with the source version numbers of other sources.
[0045] When more than one compensation event is generated, the preceding receipt number of the first compensation event is set to the receipt number corresponding to the current valid tail node before compensation. After the first compensation event is completed, a corresponding receipt number is generated and written into the preceding receipt number of the second compensation event. Subsequent compensation events use the receipt number of the previous compensation event as their own preceding receipt number. Thus, each compensation event forms a continuous compensation sub-chain. The order of the compensation events is determined according to the fixed order of their source identifiers in the original collaborative version vector, ensuring that compensation results with the same difference yield the same connection order of compensation events.
[0046] After all compensation events are generated, the first compensation event is connected to the current valid tail node before compensation, and adjacent compensation events are connected sequentially according to their preceding receipt numbers, thereby linking the compensation sub-chain into the cross-source event causal chain. The end event of the compensation sub-chain is determined as the updated current valid tail node; simultaneously, for each compensation event, its source identifier is read, and data items with the same source identifier are searched in the original collaborative version vector. The confirmed version of this data item is replaced with the source version number of the corresponding compensation event, while the confirmed versions corresponding to business sources that have not generated compensation events remain unchanged, thus obtaining the updated collaborative version vector.
[0047] Finally, based on the updated current valid tail node event fingerprint and the updated collaboration version vector, a new transfer token is generated according to the aforementioned transfer token generation method, and the newly generated transfer token is matched with the compensated merged business snapshot. The next collaboration node again compares the current valid tail node event fingerprint and collaboration version vector in the newly generated transfer token with the updated local records item by item; if they match, the engineering item transfer is executed; if they do not match, the transfer is not executed, to avoid the historical backfeed data in the isolated branch changing the already determined valid business status again during the compensation process.
[0048] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A collaborative workflow method for engineering projects based on multi-source business data fusion, characterized in that, include: Obtain multiple business source events corresponding to engineering matters, generate event fingerprints based on the project identifier, business object identifier, source version number and previous receipt number carried by each business source event, and establish cross-source event causal chain based on the previous receipt number; Based on the cross-source event causal chain, determine the current valid tail node and the necessary business source corresponding to the project item, obtain the confirmed version of each necessary business source for the current valid tail node, and generate a collaborative version vector corresponding to the source identifier and the confirmed version. Match the preceding receipt number of the newly arrived business source event with the current valid tail node. When the preceding receipt number points to an expired historical branch, mark the business source event as a backfeed event and write it into the isolated branch. When it points to the current valid tail node, use the business source event to update the collaborative version vector and the cross-source event causal chain. A transfer token is generated based on the updated collaborative version vector and the current valid tail node, and the transfer token is sent to the next collaborative node along with the converged service snapshot; The next collaborative node executes the engineering matter flow when the collaborative version vector in the flow token and the current valid tail node are consistent with the local record; otherwise, it generates a difference compensation result based on the isolated branch and the fused business snapshot, updates the cross-source event causal chain based on the difference compensation result, and then re-executes the flow verification.
2. The collaborative workflow method for engineering projects based on multi-source business data fusion according to claim 1, characterized in that, The generation of cross-source event causal chains includes: The event fingerprint is obtained by encoding and concatenating the fixed fields of project identifier, business object identifier, source identifier, source version number and previous receipt number, and performing a deterministic hash operation on the concatenation result. Find the corresponding preceding event fingerprint based on the preceding receipt number of the business source event, establish a directed association relationship between the preceding event fingerprint and the event fingerprint of the current business source event, and form the cross-source event causal chain based on the directed association relationship.
3. The method according to claim 2, characterized in that, Determining the current valid tail node includes: traversing from the root node of the cross-source event causal chain along the direction from the preceding event to the succeeding event; when the same preceding event has two or more succeeding events, the branch that was replaced due to withdrawal and resubmission or split and re-initiation is determined as the invalid historical branch; the branch that was not subsequently withdrawn or replaced is determined as the valid branch; and the event node in the valid branch that does not have a valid succeeding event is determined as the current valid tail node.
4. The method according to claim 1, characterized in that, The generation of the collaborative version vector includes: querying the corresponding necessary business source based on the collaborative node identifier carried by the current valid tail node, and obtaining the confirmation record formed by each necessary business source for the current valid tail node and whose confirmation status is confirmed; when there are multiple confirmation records for the same necessary business source, selecting the confirmation record with the largest source version number within the business source and determining its source version number as the confirmed version of the business source; after all necessary business sources have obtained confirmed versions, arranging the business source identifier-confirmed version data items in a fixed order according to the business source identifier to form a collaborative version vector, without comparing the numerical values of the source version numbers of different business sources.
5. The method according to claim 1, characterized in that, The branch determination of the newly arrived service source event includes: finding the corresponding event fingerprint based on its preceding receipt number, and tracing the branch node backward along the cross-source event causal chain starting from the node corresponding to the event fingerprint; connecting the event fingerprint of the branch node with the first subsequent event fingerprint from the branch node toward the newly arrived service source event in a fixed order to form a preceding branch anchor value, and generating a valid branch anchor value for the branch to which the current valid tail node belongs in the same way; when the two branch anchor values are inconsistent, the newly arrived service source event is identified as a backfeed event and connected to the isolated branch; when the two branch anchor values are consistent and the preceding receipt number corresponds to the current valid tail node, the newly arrived service source event is continued to the current valid tail node and identified as the updated current valid tail node.
6. The method according to claim 5, characterized in that, After a new business source event is added to the current valid tail node, the source identifier of the business source event is read. Only the confirmed version corresponding to the same source identifier in the collaborative version vector is replaced with the confirmed source version number of the business source event, while keeping the confirmed versions corresponding to other business sources unchanged. When a new business source event is written to the isolated branch, the current valid tail node and the collaborative version vector remain unchanged.
7. The method according to claim 1, characterized in that, The generation of the circulation token includes: The project identifier, business object identifier, updated current valid tail node event fingerprint, and updated collaboration version vector are encoded and concatenated according to a fixed field order to obtain the token's original data. Based on the business source identifiers and their confirmed versions in the collaborative version vector, extract the business fields corresponding to the current valid branch to form a fused business snapshot. Then, encode the fused business snapshot in a fixed field order and perform a deterministic hash operation to obtain the snapshot fingerprint. After writing the snapshot fingerprint into the token's original data, the token verification value is recalculated, so that the current valid tail node, the collaborative version vector, and the converged service snapshot are all bound to the same transfer token, and the transfer token and the converged service snapshot are sent to the next collaborative node.
8. The method according to claim 7, characterized in that, The next collaborative node compares the transfer token with the current valid tail node event fingerprint in the local record, and compares the collaborative version vectors of the two according to the business source identifier. If the current valid tail node event fingerprint and each confirmed version are consistent, the engineering matter transfer is executed; otherwise, the difference compensation process is initiated.
9. The method according to claim 8, characterized in that, The difference compensation process includes: selecting end events corresponding to business sources with inconsistent versions from isolated branches based on business object identifiers; comparing the business field values in the end events with the field values with the same field identifiers in the merged business snapshot item by item, and identifying the fields with inconsistent field values as difference fields; merging the difference fields according to the source identifiers to form a set of compensation fields corresponding to each business source, and generating compensation events using the corresponding field values in the merged business snapshot as target field values; pointing the pre-order receipt number of the first compensation event to the current valid tail node before compensation, and pointing subsequent compensation events to the previous compensation event in sequence to form a continuous compensation sub-chain, and linking the compensation sub-chain to the cross-source event causal chain.
10. The method according to claim 9, characterized in that, The end event of the compensation subchain is determined as the updated current valid tail node. Only the confirmed version corresponding to the same source identifier in the collaborative version vector is replaced with the source version number of each compensation event. The circulation token is regenerated according to the updated current valid tail node and the collaborative version vector. The circulation verification of the next collaborative node is re-executed with the regenerated circulation token.
