A method, device, and medium for intelligent traceability of construction labor data based on reinforcement learning.

By reconstructing the handover sequence of construction labor data using an improved implicit quantile network, the problem of inaccurate data breakpoint identification in existing technologies is solved, enabling intelligent traceability of construction labor data and generating clear traceability paths and complete voucher correspondences.

CN123070893APending Publication Date: 2026-11-10BEIJING BRANCH BUILDING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for tracing construction labor data struggle to accurately identify data breakpoints and conflicting records when faced with differences in data collection frequency, system clock, and upload cycle across different business platforms. This results in inaccurate tracing results and a lack of joint analysis of voucher association and differences in labor volume across business processes.

Method used

By employing a reinforcement learning-based approach, an improved implicit quantile network is used, combined with a mirrored voucher backtracking unit, a labor residual delivery unit, a breakpoint quantile projection unit, and a traceability action continuation unit, to reconstruct the labor handover sequence, identify data breakpoints, and generate an accurate traceability path.

Benefits of technology

It improves the integrity of the temporal relationship of construction labor data and the accuracy of data breakpoint location, reduces the interference of voucher conflicts on the selection of traceability actions, and generates a clear traceability path and a complete voucher correspondence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123070893A_ABST
    Figure CN123070893A_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and medium for intelligent traceability of construction labor data based on reinforcement learning, belonging to the field of reinforcement learning technology. The method includes: collecting and preprocessing construction labor data to generate a construction labor dataset; cyclically transposing conflict records within the same batch to generate a labor handover sequence; constructing an occurrence timeline and an entry timeline, marking data breakpoints, and generating labor traceability samples; generating a traceability action value table through improved implicit quantile network processing; recursively calculating traceability actions where quantile intervals intersect to generate candidate traceability sequences; calculating transitive closures and eliminating closed segments to generate a target traceability sequence; and associating start and end records and vouchers to generate intelligent traceability results for construction labor data. This invention achieves accurate continuation of construction labor conflict data, data breakpoint location, and intelligent traceability of labor information by introducing dual-time-series breakpoint analysis, improving implicit quantile networks, and eliminating loops in traceability sequences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of reinforcement learning technology, and in particular to a method, apparatus and medium for intelligent traceability of construction labor data based on reinforcement learning. Background Technology

[0002] With the development of digital management and real-name labor management in the construction industry, data on personnel registration, labor contracts, attendance, workload confirmation, wage settlement, wage payment, and vouchers are increasingly being collected by project management platforms, attendance terminals, wage payment platforms, and monitoring systems. Existing methods for tracing construction labor data typically aggregate labor records according to project number, worker number, and wage settlement cycle. Record relationships are established through business process coding, occurrence time, and data source record number. Database queries, fixed-time sorting, rule matching, voucher summary verification, and anomaly filtering are used to reconstruct the labor business process. Some methods employ graph structure analysis, machine learning, or reinforcement learning to calculate the degree of record association, selecting tracing paths based on time differences, field consistency, and voucher association status.

[0003] Existing construction labor data sources are scattered, with differences in data collection frequency, system clock, upload cycle, and warehousing order across different business platforms. Within the same labor batch, conflicting records are prone to occur, where the business process code and occurrence time are the same, but the recorded content, voucher affiliation, and warehousing time differ. Sort by occurrence time or use fixed priority deduplication, but it's difficult to determine the actual handover order of conflicting records, easily leading to mismatches between records, duplicate voucher references, and interruptions in the tracing path. Existing methods do not perform dual-order analysis of occurrence time and warehousing time, making it difficult to accurately identify data breakpoints caused by asynchronous data entry, delayed uploads, and cross-platform backhauls. Existing reinforcement learning tracing methods often select subsequent records based on the value of a single action or the expected action value, making it difficult to describe the distribution of action value under conditions of missing data, voucher conflicts, and time sequence misalignment. They also lack joint analysis of voucher association, differences in labor volume across business processes, and data breakpoint offsets. Continuously selecting tracing actions with high local action value may also form closed segments, leading to problems such as duplicate records, unclear tracing starting points, inaccurate data breakpoint location, and incomplete voucher correspondences in the tracing results.

[0004] Therefore, how to provide intelligent traceability methods, devices, and media for construction labor data based on reinforcement learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose an intelligent traceability method, device, and medium for construction labor data based on reinforcement learning. This invention utilizes techniques such as cyclical transposition of conflicting records within the same batch, alignment of the occurrence timeline with the entry timeline, an improved implicit quantile network, quantile interval action recursion, and traceability sequence loop elimination. It details the processes of construction labor data collection, labor handover sequence reconstruction, data breakpoint identification, traceability action estimation, candidate traceability sequence construction, and target traceability sequence generation. The improved implicit quantile network, through a mirrored voucher backtracking unit, a labor residual delivery unit, a breakpoint quantile projection unit, and a traceability action continuation unit, integrates voucher association, differences in labor volume across business processes, dual-track sequence offset, and traceability action continuation relationships to achieve quantile action value calculation and traceability path reconstruction for construction labor data. Compared to fixed-time sorting, rule matching, and single-action value selection methods, this invention offers advantages such as accurate conflicting record handover order, low voucher duplication rate, accurate data breakpoint location, complete representation of action value uncertainty, stable elimination of closed traceability paths, and clear correspondence of traceability result evidence.

[0006] The intelligent traceability method for construction labor data based on reinforcement learning according to embodiments of the present invention includes:

[0007] Collect and preprocess construction labor data to generate a construction labor dataset;

[0008] Filter conflicting records in the same batch in the construction labor dataset, lock the records with matching start and end records and non-reusable vouchers by cyclic transposition, and generate a labor handover sequence;

[0009] The labor handover sequence is programmed into the occurrence time track and the warehousing time track. The dual-track sequence is aligned record by record. Data breakpoints are cut and marked at the reverse crossing points to generate labor traceability samples.

[0010] The labor traceability sample is input into the improved implicit quantile network and processed sequentially through the mirror voucher backtracking unit, the labor residual delivery unit, the breakpoint quantile projection unit, and the traceability action continuation unit to generate a traceability action value table.

[0011] Pair the traceability actions in the traceability action value table that have interchanged start and end records, extract the quantile intervals with positive action value differences according to the quantile order, and recursively deduce the traceability actions where the quantile intervals intersect along the start and end records to generate candidate traceability sequences.

[0012] A traceability action transition matrix is ​​constructed from the candidate traceability sequences. The transit closure is iteratively calculated. Closed segments are located by non-zero diagonal terms. The traceability action with the shortest quantile interval within the closed segment is deleted until all diagonal terms are 0, thus generating the target traceability sequence.

[0013] The starting and ending records and vouchers are associated with the target tracing sequence, the tracing starting point and data breakpoint are marked, and intelligent tracing results of construction labor data are generated.

[0014] Optionally, the generation of the construction labor dataset includes:

[0015] Collect personnel real-name registration data, labor contract data, attendance data, workload confirmation data, wage settlement data, wage payment data, voucher data, and data entry logs, and group them into the construction labor original record group according to project number and laborer number;

[0016] Standardize the project number, worker number, business process code and time format of the original construction labor record group, associate the data with the data entry log according to the data source record number, mark the occurrence time and entry time and compile record identifiers to generate a standard labor record group;

[0017] Calculate the content summary of the voucher data in the standard labor service record group, encapsulate the content summary with the voucher type, source platform identifier and issuing entity identifier into a voucher, bind the voucher according to the record identifier, and generate a voucher-associated record group;

[0018] Voucher-related record groups are divided according to project number, worker number, and wage settlement cycle. Each group is assigned a labor batch number, and the records within the group are packaged according to the labor batch number and record identifier to generate a construction labor dataset.

[0019] Optionally, generating the labor handover sequence includes:

[0020] The construction labor dataset is divided according to the labor batch number. Records with the same business process code and occurrence time but different record identifiers are marked as conflict records in the same batch. The conflict position is marked and the adjacent non-conflict records before and after the conflict record in the same batch are determined as the start and end records, and a conflict position table is generated.

[0021] The conflict records in the same batch are rotated in a cyclical manner according to the conflict position table. In each round, the last conflict record in the same batch is put back to the first conflict position to generate a candidate record permutation set.

[0022] Verify the start and end record matching status and voucher reuse status of the candidate record arrangement set, retain the record arrangement where the start and end records match and the voucher is not reused, and generate a matching record arrangement set.

[0023] The sum of the absolute values ​​of the entry time differences of adjacent records in the matching record set is determined as the handover time difference. The first record is locked in ascending order of the handover time difference, and the records are continued according to the business link code to generate a labor handover sequence.

[0024] Optionally, generating labor traceability samples includes:

[0025] Copy the labor handover sequence and arrange it in ascending order by occurrence time and warehousing time, respectively, to generate occurrence timeline and warehousing timeline;

[0026] Pair the same record in the occurrence time track and the warehousing time track according to the record identifier, record the dual-track sequence position, and generate a dual-track sequence position table;

[0027] The dual-track sequence table is arranged according to the order of occurrence in the time sequence track. When the order of adjacent records in the entry time sequence track decreases, the adjacent records are marked as data breakpoints, and a breakpoint mark sequence is generated.

[0028] The data breakpoints are segmented into a breakpoint marker sequence, and the record segments, dual-track sequence, start and end records, and vouchers on both sides of the data breakpoints are packaged according to the labor batch number to generate a labor traceability sample.

[0029] Optionally, generating the traceability action value table includes:

[0030] An improved implicit quantile network is constructed by adding a mirrored voucher backtracking unit, a labor residual delivery unit, a breakpoint quantile projection unit, and a traceability action continuation unit to the original implicit quantile network.

[0031] The mirrored voucher backtracking unit receives labor traceability samples, constructs an input feature matrix according to the position in the occurrence time track, divides it into a feature matrix before the breakpoint and a feature matrix after the breakpoint at the data breakpoint, arranges the feature matrix before the breakpoint in reverse order, aligns the feature matrix before the breakpoint and the feature matrix after the breakpoint according to the position difference from the data breakpoint, constructs a voucher similarity matrix according to the voucher field matching ratio, reconstructs the feature matrix before the breakpoint by weighting the voucher similarity matrix, and merges it with the feature matrix after the breakpoint and the dual-track position to generate mirrored voucher features;

[0032] The labor residual delivery unit receives the mirror voucher features, and according to the business link code, it forms the starting labor volume vector and the ending labor volume vector from the numerical fields of the starting and ending records respectively. It generates a labor residual vector by subtracting the starting labor volume vector from the ending labor volume vector. It constructs a labor delivery matrix according to adjacent business links, and delivers the labor residual vector to the next business link and merges it with the mirror voucher feature residual to generate a labor residual feature.

[0033] The breakpoint quantile projection unit receives the labor residual features, calculates the breakpoint sequence difference and breakpoint offset coefficient based on the double-track sequence positions recorded on both sides of the data breakpoint, adjusts the quantile sampling value according to the sign of the breakpoint sequence difference and the breakpoint offset coefficient, performs cosine function encoding and multiplies it element by element with the labor residual features to generate the breakpoint quantile features.

[0034] The tracing action continuation unit receives the breakpoint quantile features, constructs a forward tracing action and a reverse tracing action that swaps the start and end records for adjacent start and end records, and binds the voucher. It constructs an action adjacency matrix based on the end record of the previous tracing action and the start record of the next tracing action, aggregates the breakpoint quantile features using the action adjacency matrix, calculates the action value through residual fusion and linear mapping, binds the action value to the tracing action according to the data breakpoint and quantile order, and generates a tracing action value table.

[0035] An improved implicit quantile network uses labor tracing samples with labeled data breakpoints and target tracing sequences as training samples. It calculates the action reward based on the consistency between the tracing action and the target tracing sequence. It calculates the quantile Bellman target based on the action reward and the action value of the next tracing action. It calculates the quantile temporal difference error based on the action value of the current tracing action and the quantile Bellman target. It combines the quantile temporal difference error, mirrored voucher reconstruction error, labor residual delivery conservation error, breakpoint quantile order error, and tracing action continuation error into a joint loss. It updates the network parameters in reverse. The training is completed when the absolute value of the difference between the joint losses of adjacent rounds is less than 0.0005 in 8 consecutive training rounds.

[0036] Optionally, generating candidate traceability sequences includes:

[0037] The value table of traceability actions is divided according to data breakpoints and quantiles. Traceability actions with interchanged start and end records and the same voucher are grouped into mutual reverse traceability action pairs, and a table of mutual reverse traceability action pairs is generated.

[0038] Calculate the bidirectional action value difference of the mutually reversible tracing actions position by position, merge the corresponding positions of the action value differences that are consecutively positive into position intervals, and generate a position interval action table.

[0039] The tracing actions whose start and end records are located on both sides of the data breakpoint in the quantile interval action table are determined as the starting tracing actions. Taking each starting tracing action as the branch starting point, the unconnected tracing actions of the intersecting quantile intervals are recursively deduced along the same direction as the end record of the previous tracing action and the starting record of the next tracing action. The recursively deduced intervals are updated according to the intersection of the quantile intervals until there are no unconnected tracing actions that meet the continuity conditions in each recursively branch. The recursively branches are arranged according to the continuity order of the start and end records to generate a candidate tracing sequence.

[0040] Optionally, generating the target tracing sequence includes:

[0041] The action sequence is compiled according to the order of the tracing actions in the candidate tracing sequence and mapped to the matrix rows and columns. When the end record of the row tracing action is the same as the start record of the column tracing action, the matrix item is set to 1, otherwise it is set to 0. The diagonal items are set to 0 to generate the tracing action transition matrix.

[0042] Iteratively perform Boolean multiplication and logical OR operations on the trace action transition matrix. When the matrix items no longer change, a transitive closure is generated. The starting trace action is determined by the non-zero diagonal items. The non-zero matrix items of the trace action transition matrix are recursively used to return to the starting trace action, generating a closed segment table.

[0043] Calculate the length of the quartile interval for each tracing action in the closed segment table according to the first and last quartile positions. Select the tracing action with the shortest quartile interval. If the lengths are the same, select the tracing action with the smallest action sequence. Delete the selected tracing action and its corresponding row and column. Repeat the closure calculation and closed segment positioning until the diagonal items are all 0. Continue the remaining tracing actions according to the start and end records to generate the target tracing sequence.

[0044] Optionally, the generation of intelligent traceability results for construction labor data includes:

[0045] Divide the target tracing sequence according to data breakpoints, arrange tracing actions according to the continuity relationship of start and end records, associate tracing actions with start and end records and vouchers, and generate a tracing path table;

[0046] Mark the starting point record of the first trace action in the trace path table as the trace start point, and mark the location of trace actions that cross data breakpoints as data breakpoints to generate a trace location table;

[0047] The traceability and location tables are compiled according to project number, worker number, and labor batch number. The traceability starting point, data breakpoint, start and end records, and vouchers are encapsulated according to the sequence of traceability actions to generate intelligent traceability results for construction labor data.

[0048] The intelligent traceability device for construction labor data based on reinforcement learning according to an embodiment of the present invention includes:

[0049] The construction labor data processing module is used to collect and preprocess construction labor data to generate a construction labor dataset.

[0050] The conflict record arrangement module is used to arrange conflict records in the same batch in the construction labor dataset and generate a labor handover sequence.

[0051] The dual-time-series breakpoint construction module is used to align the occurrence timeline and the warehousing timeline of the labor handover sequence and mark data breakpoints to generate labor traceability samples.

[0052] The reinforcement learning valuation module is used to calculate the action value of labor traceability samples using an improved implicit quantile network and generate a traceability action value table.

[0053] The candidate sequence generation module is used to continuously trace the traceable actions in the action value table according to the quantile intervals where the action value difference is positive, and generate candidate traceability sequences.

[0054] The traceability sequence loop elimination module is used to perform closed segment elimination on candidate traceability sequences to generate the target traceability sequence;

[0055] The traceability result generation module is used to associate the start and end records and vouchers in the target traceability sequence, mark the traceability start point and data breakpoint, and generate intelligent traceability results for construction labor data.

[0056] Optionally, the computer-readable storage medium stores computer program instructions, which, when executed by a processor, perform a reinforcement learning-based intelligent traceability method for construction labor data.

[0057] The beneficial effects of this invention are:

[0058] This invention establishes a construction labor data set including the time of occurrence and the time of entry into the warehouse by aggregating personnel registration, labor contracts, attendance, workload confirmation, wage settlement, wage payment, and voucher data. It performs cyclic transposition, start and end record matching, and voucher reuse verification on conflicting records within the same batch. This enables the reconstruction of the labor handover sequence even when records have the same occurrence time but different entry orders, reducing record misconnections and duplicate voucher references caused by fixed-time sorting. By constructing occurrence and entry time sequences and segmenting and marking the reverse crossing positions of the dual-track sequence, it can identify data breakpoints caused by asynchronous data entry, delayed uploads, and cross-platform backhauls, improving the integrity of the construction labor data's temporal relationship and the accuracy of data breakpoint location.

[0059] This invention establishes a mirrored voucher backtracking unit, a labor residual delivery unit, a breakpoint quantile projection unit, and a traceability action continuation unit within an implicit quantile network. This allows for mirrored alignment and weighted reconstruction of voucher features before and after data breakpoints, delivery of labor residuals along adjacent business processes, and adjustment of quantile sampling values ​​based on dual-track sequence offsets. This results in a traceability action value table that integrates voucher associations, labor volume differences, data breakpoints, and action continuation relationships. Compared to methods that select traceability paths based on a single action value or expected action value, this invention can describe the value changes of traceability actions at different quantile sequences, reducing the interference of data loss, voucher conflicts, and time sequence misalignments on the traceability action selection results, and improving the stability of traceability action valuation under complex labor data conditions.

[0060] This invention extracts quantile intervals with positive value differences by pairing start and end record interchangeable tracing actions. It then recursively deduces tracing actions where quantile intervals intersect along the continuity of start and end records, forming candidate tracing sequences with continuous quantile basis. A tracing action transition matrix is ​​constructed based on these candidate sequences. By locating closed segments through closure and deleting the tracing action with the shortest quantile interval, cyclical connections between tracing actions are eliminated, reducing duplicate records and closed tracing paths. The resulting intelligent tracing result for construction labor data associates the tracing start point, data breakpoint, start and end records, and vouchers, offering advantages such as clear tracing paths, well-defined breakpoint locations, complete voucher correspondence, and convenient labor data verification. Attached Figure Description

[0061] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0062] Figure 1 This is a flowchart of the intelligent traceability method for construction labor data based on reinforcement learning proposed in this invention;

[0063] Figure 2 This is a schematic diagram of the improved implicit quantile network structure of the intelligent traceability method for construction labor data based on reinforcement learning proposed in this invention.

[0064] Figure 3 This is a schematic diagram of the intelligent traceability device for construction labor data based on reinforcement learning proposed in this invention. Detailed Implementation

[0065] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0066] refer to Figure 1 and Figure 2 A reinforcement learning-based intelligent traceability method for construction labor data includes:

[0067] Collect and preprocess construction labor data to generate a construction labor dataset;

[0068] Filter conflicting records in the same batch in the construction labor dataset, lock the records with matching start and end records and non-reusable vouchers by cyclic transposition, and generate a labor handover sequence;

[0069] The labor handover sequence is programmed into the occurrence time track and the warehousing time track. The dual-track sequence is aligned record by record. Data breakpoints are cut and marked at the reverse crossing points to generate labor traceability samples.

[0070] The labor traceability sample is input into the improved implicit quantile network and processed sequentially through the mirror voucher backtracking unit, the labor residual delivery unit, the breakpoint quantile projection unit, and the traceability action continuation unit to generate a traceability action value table.

[0071] Pair the traceability actions in the traceability action value table that have interchanged start and end records, extract the quantile intervals with positive action value differences according to the quantile order, and recursively deduce the traceability actions where the quantile intervals intersect along the start and end records to generate candidate traceability sequences.

[0072] A traceability action transition matrix is ​​constructed from the candidate traceability sequences. The transit closure is iteratively calculated. Closed segments are located by non-zero diagonal terms. The traceability action with the shortest quantile interval within the closed segment is deleted until all diagonal terms are 0, thus generating the target traceability sequence.

[0073] The starting and ending records and vouchers are associated with the target tracing sequence, the tracing starting point and data breakpoint are marked, and intelligent tracing results of construction labor data are generated.

[0074] In this embodiment, generating the construction labor dataset includes:

[0075] Collect personnel real-name registration data, labor contract data, attendance data, workload confirmation data, wage settlement data, wage payment data, voucher data, and data entry logs, and group them into the construction labor original record group according to project number and laborer number;

[0076] The project number, worker number, business process code, and time format of the unified construction labor service original record group are used. Data is entered into the database log according to the data source record number, and the occurrence time and entry time are marked. Record identifiers are created to generate a standard labor service record group, including:

[0077] The standard labor record set is generated as follows:

[0078] Process each original construction labor record group one by one, convert full-width characters in project numbers and laborer numbers to half-width characters, delete spaces and separators, and convert English letters to uppercase;

[0079] The business process codes for personnel real-name registration, labor contracts, attendance, workload confirmation, wage settlement, wage payment and vouchers are set to 01 to 07 in sequence. The occurrence time of each business is converted into a 17-digit number format in the order of year, month, day, hour, minute, second and millisecond to obtain the occurrence time.

[0080] Within the same construction labor original record group, match the data entry logs with a successful entry status according to the data source record number, and determine the earliest log generation time as the entry time. Records that do not match a successful entry log are not included in the standard labor record group.

[0081] Records are arranged sequentially according to the time of occurrence, the time of entry into the warehouse, and the record number of the data source. Records under the same project number and worker number are assigned consecutive serial numbers. The project number, worker number, business process code, time of occurrence, and record serial number are concatenated to obtain the record identifier.

[0082] The original business fields of each record are retained, and the unified records are grouped by project number and worker number to generate a standard labor record group;

[0083] The content summary of the voucher data in the standard labor service record group is calculated. This content summary, along with the voucher type, source platform identifier, and issuing entity identifier, is encapsulated into a voucher. The voucher is then bound to the record identifier, generating a voucher-associated record group. Among these:

[0084] Generate a voucher associated record group, specifically as follows:

[0085] Process the voucher data in the standard labor record group one by one, select the voucher business fields except voucher type, source platform identifier, issuing entity identifier and associated data source record number, sort them in ascending order by field name, delete leading and trailing spaces in character fields, convert time fields to 17-digit number format, and record empty values ​​as empty strings;

[0086] Convert the field name and field value to UTF-8 encoding respectively, convert the byte length of the field name and the byte length of the field value to 8-bit decimal numbers respectively, and concatenate the byte length of the field name, the field name, the byte length of the field value and the field value in sequence to obtain the UTF-8 byte sequence;

[0087] The SHA-256 algorithm is used to calculate the 256-bit hash value of the UTF-8 byte sequence, and the hash value is converted into a content digest consisting of 64 hexadecimal characters;

[0088] The types of real-name registration certificates, labor contract certificates, attendance certificates, workload confirmation certificates, wage settlement certificates, and wage payment certificates are numbered 01 to 06 respectively, and the content summary, certificate type, source platform identifier, and issuing entity identifier are encapsulated into a certificate.

[0089] Based on the record number of the associated data source in the voucher data, match the corresponding record identifier in the standard labor record group, and bind the voucher to the record identifier. Vouchers that do not match a record identifier are not included in the voucher associated record group.

[0090] When one record corresponds to multiple vouchers, they are arranged in order according to the content summary. When one voucher is associated with multiple records, they are bound to the corresponding record identifiers respectively. The bound records are arranged in the order of records in the standard labor record group to generate a voucher associated record group.

[0091] The voucher-related record groups are divided according to project number, worker number, and wage settlement cycle. Each group is assigned a labor batch number, and the records within the group are packaged according to the labor batch number and record identifier to generate a construction labor dataset.

[0092] In this embodiment, generating the labor handover sequence includes:

[0093] The construction labor dataset is divided according to the labor batch number. Records with the same business process code and occurrence time but different record identifiers are marked as conflict records in the same batch. The conflict position is marked and the adjacent non-conflict records before and after the conflict record in the same batch are determined as the start and end records, and a conflict position table is generated.

[0094] The conflicting records in the same batch are rotated cyclically according to the conflict position table. In each round, the last conflicting record in the same batch is moved back to the first conflicting position, generating a candidate permutation set, where:

[0095] The process of generating a permutation set of candidate records is as follows:

[0096] Select each labor batch in the conflict location table, extract conflict records of the same batch according to the conflict location, and retain the original sequence of the start and end records and non-conflict records;

[0097] The current record order at each conflict position is determined as the initial conflict record arrangement. Let the number of conflict records in the same batch be m. Move the last conflict record in the same batch to the first conflict position, and move the remaining conflict records in the same batch one position to the right in turn. Execute this process continuously for m-1 rounds. Write the initial conflict record arrangement and the conflict record arrangements formed in each round into the arrangement group at the corresponding position.

[0098] When there are multiple conflicting positions in the same labor batch, select one conflicting record from each permutation group, arrange it, and write it back to the corresponding record position. Combine the selection results of each conflicting position item by item. The number of combinations is the product of the number of conflicting record arrangements contained in each permutation group.

[0099] Each combination is merged with the start and end records and non-conflicting records, and arranged according to the record order to generate a candidate record permutation set;

[0100] Verify the start and end record matching status and voucher reuse status of the candidate record permutation set, retain the record permutations with matching start and end records and no voucher reuse, and generate a matching record permutation set, where:

[0101] Generate a permutation set of matching records, specifically as follows:

[0102] Select candidate records one by one and arrange them. Locate the start and end records, the first conflict record in the same batch, and the last conflict record in the same batch according to the conflict position table. Extract the business fields with the same field name and that are not empty from the two groups of boundary records respectively.

[0103] For numerical business fields, divide the absolute difference of the field values ​​by the maximum value between the absolute values ​​of the two field values ​​and 1 to obtain the field difference value.

[0104] For character-type business fields, if the field values ​​are the same, the field difference value is set to 0; otherwise, it is set to 1.

[0105] Calculate the average field difference values ​​of the two sets of boundary records respectively. If no common business field is extracted, set the corresponding average value to 1. Sum the average field difference values ​​of all conflicting positions to obtain the start and end record matching values.

[0106] Within the same labor batch, determine the minimum start and end record matching value. If the difference between the start and end record matching value of the candidate record arrangement and the minimum start and end record matching value is not greater than 0.000001, mark the start and end record matching status as matched; otherwise, mark it as unmatched.

[0107] The content summary, voucher type, source platform identifier, and issuing entity identifier of the voucher are combined to obtain the voucher combination key. Vouchers are collected according to the voucher combination key. When the same voucher combination key is associated with two or more different record identifiers, the voucher reuse status is marked as reused; otherwise, it is marked as non-reuse.

[0108] Retain candidate records whose start and end records are matched and whose voucher reuse status is not reused, and arrange them according to the labor batch number and the original candidate arrangement order to generate a set of matched record arrangements;

[0109] The sum of the absolute values ​​of the entry time differences of adjacent records in the matching record set is determined as the handover time difference. The first record is locked in ascending order of the handover time difference, and the records are continued according to the business link code to generate a labor handover sequence.

[0110] In this embodiment, generating labor traceability samples includes:

[0111] Copy the labor handover sequence, arrange them in ascending order by occurrence time and warehousing time respectively, and generate occurrence time track and warehousing time track, where:

[0112] The generation of occurrence timeline and entry timeline is as follows:

[0113] Select each labor batch in the labor handover sequence, and make two copies according to their order in the labor handover sequence. Retain the labor batch number, record identifier, business process code, occurrence time, warehousing time, business field, binding voucher, and record identifier of start and end records.

[0114] Arrange the first record in ascending order of occurrence time. If the occurrence times are the same, maintain the original position of the corresponding record in the labor handover sequence. Assign occurrence time sequence positions continuously starting from 1 to generate the occurrence time sequence track.

[0115] Arrange the second record in ascending order according to the entry time. If the entry times are the same, maintain the original sequence position of the corresponding record in the labor handover sequence. Assign entry time sequence positions continuously starting from 1 to generate the entry time sequence track.

[0116] Pair the same record in the occurrence time track and the warehousing time track according to the record identifier, record the dual-track sequence position, and generate a dual-track sequence position table;

[0117] The dual-track sequence table is arranged according to the order of occurrence in the time sequence track. When the order of adjacent records in the entry time sequence track decreases, the adjacent records are marked as data breakpoints, and a breakpoint mark sequence is generated.

[0118] The data breakpoint sequence is segmented, and the record segments, dual-track sequence positions, start and end records, and vouchers on both sides of the data breakpoint are encapsulated according to the labor batch number to generate a labor traceability sample, wherein:

[0119] Generate labor traceability samples, specifically:

[0120] Select labor batches in the breakpoint marker sequence one by one, arrange the records in the group in ascending order of occurrence time, and determine the interval between adjacent records where the data breakpoints are located in turn. Let the number of data breakpoints be k.

[0121] When the number of data breakpoints is greater than 0, the records are split between adjacent records corresponding to each data breakpoint, and the records in the group are divided into k+1 record segments. The segment numbers are assigned starting from 1 according to the occurrence sequence position. When the number of data breakpoints is 0, no splitting is performed, and all records in the group are assigned to the same record segment.

[0122] According to the record identifier, write the occurrence sequence number, entry sequence number and binding voucher of each record into the corresponding record segment. Locate the start and end records in the corresponding record segment according to the record identifier of the start and end records. Determine the two adjacent record segments before and after each data breakpoint as the record segments on both sides of the data breakpoint.

[0123] Labor service traceability samples are generated by sequentially encapsulating and recording the labor service batch number, section number, and the time sequence position within the section, including the section, dual-track sequence position, start and end records, data breakpoint positions, and vouchers.

[0124] In this embodiment, generating the traceability action value table includes:

[0125] An improved implicit quantile network is constructed by adding a mirrored voucher backtracking unit, a labor residual delivery unit, a breakpoint quantile projection unit, and a tracing action continuation unit to the original implicit quantile network, wherein:

[0126] Construct an improved implicit quantile network, specifically as follows:

[0127] Traditional implicit quantile networks include a state feature extraction layer, a quantile sampling and cosine embedding layer, an element-wise fusion layer, and an action value output layer;

[0128] A mirrored voucher backtracking unit is added after the status feature extraction layer. The record segments on both sides of the data breakpoint are reversed and the voucher features before and after the breakpoint are backtracked according to the binding voucher corresponding to the record identifier. Its output is connected to the labor residual delivery unit.

[0129] A new labor residual delivery unit is added between the mirror voucher backtracking unit and the element-by-element fusion layer. The labor residual is transmitted along the business process according to the differences in the business fields of the start and end records, and the delivery result is sent to the element-by-element fusion layer.

[0130] A dual-track sequence difference is introduced into the original quantile sampling and cosine embedding layer, which is then improved into a breakpoint quantile projection unit. The quantile sampling position is adjusted according to the dual-track sequence difference to form quantile features, which are then sent into the element-wise fusion layer.

[0131] The original action value output layer is improved into a trace action continuation unit, which receives the output of the element-by-element fusion layer, aggregates the features of adjacent actions according to the sequential relationship of the record identifiers corresponding to the trace actions, and outputs the quantile action value of each trace action, thus obtaining the improved implicit quantile network.

[0132] The mirrored voucher backtracking unit receives labor traceability samples, constructs an input feature matrix according to the sequence position in the occurrence timeline, divides it into a pre-breakpoint feature matrix and a post-breakpoint feature matrix at the data breakpoint, reverses the pre-breakpoint feature matrix, aligns the pre-breakpoint and post-breakpoint feature matrices according to the sequence position difference from the data breakpoint, constructs a voucher similarity matrix according to the voucher field matching ratio, reconstructs the pre-breakpoint feature matrix using the voucher similarity matrix as a weight, and merges it with the post-breakpoint feature matrix and the dual-track sequence position to generate mirrored voucher features, wherein:

[0133] The mirrored credential backtracking unit includes:

[0134] Timing Feature Register: Arranges record features, voucher fields, and dual-track sequence positions according to the occurrence timing position;

[0135] Breakpoint Splitting Index Table: Stores the row number of the data breakpoint and the matrix range before and after it;

[0136] Reverse queue before breakpoint: Outputs the rows of the feature matrix before the breakpoint in reverse order;

[0137] Ordinal difference aligner: Pairs matrix rows according to the ordinal difference of the data breakpoints in the matrix row spacing;

[0138] Voucher Field Comparator Array: Compares 4 voucher fields and calculates the voucher field matching ratio;

[0139] Voucher similarity matrix cache: Write voucher similarity values ​​by aligned row numbers and normalize them;

[0140] Weighted Reconstruction Accumulator: Reconstructs the feature matrix before the breakpoint using the similarity matrix of the vouchers;

[0141] Dual-track feature fusion processor: fuses the reconstructed feature matrix before the breakpoint, the feature matrix after the breakpoint, and the dual-track sequence number, and outputs mirrored voucher features;

[0142] The processing procedure for the mirrored voucher backtracking unit is as follows:

[0143] The time-series feature register receives the record features output by the status feature extraction layer based on the labor traceability sample. Assuming the number of sample records is L, the 128-dimensional record features are arranged row by row according to the occurrence time sequence position to generate an input feature matrix of size L×128. The voucher field of each record and the dual-track sequence position matrix of size L×2 are extracted synchronously from the labor traceability sample.

[0144] The breakpoint segmentation index table locates the adjacent record segments before and after each data breakpoint. Let p be the number of records before the breakpoint and q be the number of records after the breakpoint. According to the segment number and the occurrence sequence position, the input feature matrix is ​​segmented into a feature matrix with size p×128 before the breakpoint and a feature matrix with size q×128 after the breakpoint. The corresponding voucher fields before and after the breakpoint, the double-track sequence matrix with size p×2 before the breakpoint, and the double-track sequence matrix with size q×2 after the breakpoint are extracted.

[0145] The reverse queue before the breakpoint is arranged synchronously in the last-in-first-out order, including the feature matrix before the breakpoint, the voucher field before the breakpoint, and the double-track sequence matrix before the breakpoint, so that the record closest to the data breakpoint is placed in the first row, resulting in a reversed feature matrix before the breakpoint of size p×128, the voucher field after reversal, and a reversed double-track sequence matrix before the breakpoint of size p×2.

[0146] The sequence difference aligner marks the sequence position of each matrix row spacing data breakpoint before and after the breakpoint, starting from 1. It calculates the absolute value of the sequence difference between the matrix row after each breakpoint and the matrix row before each breakpoint. It divides 1 by the sum of the absolute value of the sequence difference and 1 to obtain a sequence alignment coefficient matrix of size q×p.

[0147] The voucher field comparator array compares the content summary, voucher type, source platform identifier, and issuing entity identifier of the vouchers bound to each matrix row after each breakpoint with each matrix row before each reverse breakpoint. The number of identical and non-empty fields is divided by 4 to obtain the voucher field matching ratio. When multiple vouchers are bound to any matrix row, the voucher field matching ratio of all voucher pairs is calculated and the maximum value is retained. When no vouchers are bound, the voucher field matching ratio is set to 0.

[0148] The voucher similarity matrix cache multiplies the voucher field matching ratio with the corresponding ordinal alignment coefficient to obtain the initial voucher similarity value, and normalizes the matrix rows after the breakpoint to generate a voucher similarity matrix of size q×p. When the sum of the initial voucher similarity values ​​in a row is less than 0.000001, all matrix values ​​in that row are set to 0.

[0149] The weighted reconstruction accumulator multiplies the credential similarity matrix of size q×p with the feature matrix before the reverse breakpoint of size p×128 to obtain the reconstructed feature matrix before the breakpoint of size q×128. Then, it weights the double-track sequence matrix before the reverse breakpoint of size p×2 with the same credential similarity matrix to obtain the reconstructed double-track sequence matrix of size q×2.

[0150] The dual-track feature fusion processor divides the ordinal values ​​in the reconstructed dual-track ordinal matrix and the dual-track ordinal matrix after the breakpoint by the number of records L, and then concatenates them row by row to reconstruct the feature matrix before the breakpoint, the feature matrix after the breakpoint, the reconstructed dual-track ordinal matrix, and the dual-track ordinal matrix after the breakpoint, to obtain a fusion input matrix of size q×260. The fusion input matrix is ​​multiplied by the fusion weight matrix of size 260×128 and a 128-dimensional bias vector is superimposed. After being mapped by the ReLU function, the mirrored voucher feature of size q×128 is obtained.

[0151] When the same labor service traceability sample contains multiple data breakpoints, the mirrored voucher features corresponding to each data breakpoint are concatenated in ascending order according to the data breakpoint position. The number of output rows is the sum of the number of records after each data breakpoint, and the number of columns is 128. When there are no data breakpoints, the zero matrix of size L×128 is determined as the feature matrix before the breakpoint is reconstructed, and the zero matrix of size L×2 is determined as the reconstructed dual-track sequence matrix. The same fusion calculation is performed with the input feature matrix and the dual-track sequence matrix to obtain the mirrored voucher features of size L×128.

[0152] The fusion weight matrix with a size of 260×128 and the 128-dimensional bias vector are set as trainable parameters. The fusion weight matrix is ​​initialized with a Xavier uniform distribution, and the initial value of the bias vector is set to 0. The ordinal alignment coefficient, voucher field matching ratio and row normalization are not set as trainable parameters.

[0153] The labor residual delivery unit receives the mirrored voucher features, and according to the business process code, assembles the numerical fields of the start and end records into a starting labor quantity vector and an ending labor quantity vector, respectively. It then subtracts the starting labor quantity vector from the ending labor quantity vector to generate a labor residual vector. A labor delivery matrix is ​​constructed according to adjacent business processes, and the labor residual vector is delivered to the next business process and fused with the mirrored voucher feature residual to generate a labor residual feature, wherein:

[0154] Labor residual delivery unit includes:

[0155] Start and End Record Index Table: Stores the record identifiers and business process codes for start and end records;

[0156] Labor volume field mapping table: records numerical fields and vector positions according to business process codes;

[0157] Start and End Labor Quantity Register: Stores the start labor quantity vector and the end labor quantity vector;

[0158] Labor residual calculator: Subtract the starting point labor quantity vector from the ending point labor quantity vector;

[0159] Link Adjacency Lookup Table: Records the connection relationship between the current business link and the next business link;

[0160] Labor delivery matrix cache: Store the labor delivery matrix according to the succession relationship of business links;

[0161] Residual delivery accumulator: delivers the labor residual vector by weighting the labor delivery matrix;

[0162] Mirror Feature Differentiator: Calculates the residual features of mirrored vouchers in adjacent business processes;

[0163] Labor voucher fusion processor: fuses the delivered labor residual vector and the mirrored voucher feature residual, and outputs the labor residual feature;

[0164] The processing procedure for the labor residual delivery unit is as follows:

[0165] The start and end record index table synchronously receives the start and end record identifiers from the labor traceability sample, arranges the start and end records according to the occurrence sequence position, determines the start record with the smallest occurrence sequence position as the start record, determines the start and end record with the largest occurrence sequence position as the end record, and extracts the corresponding business process code and numerical field.

[0166] The labor quantity field mapping table maps attendance duration, confirmed workload, wage settlement amount, and wage payment amount to four vector positions in sequence, corresponding to business process codes 03 to 06. The start and end labor quantity register writes the corresponding values ​​of the start record and the end record into the start labor quantity vector and the end labor quantity vector of size 4×1, respectively, and writes 0 to the vector position of the field without corresponding value.

[0167] For the i-th vector position, i takes values ​​from 1 to 4 in sequence. The maximum value among the absolute values ​​of the starting point and the ending point and 1 is taken as the i-th scaling value. The starting point and ending point values ​​are divided by the i-th scaling value to obtain the normalized starting point labor quantity vector and ending point labor quantity vector.

[0168] The labor residual calculator generates a 4×1 labor residual vector by subtracting the normalized starting labor vector from the normalized ending labor vector.

[0169] The process adjacency lookup table records adjacent business processes in the order of attendance, workload confirmation, wage settlement and wage payment. The labor delivery matrix cache constructs a 4×4 labor delivery matrix with the receiving business process as the row and the sending business process as the column. The 2nd row and 1st column, the 3rd row and 2nd column, the 4th row and 3rd column, and the 4th row and 4th column are set to 1, and the rest of the matrix values ​​are set to 0.

[0170] The residual delivery accumulator multiplies a 4×4 delivery matrix with a 4×1 delivery residual vector to generate a 4×1 delivery delivery residual vector.

[0171] Let the size of the mirrored voucher feature be h×128. The mirrored feature differencer is paired with the corresponding record in the labor traceability sample according to the matrix row order of the mirrored voucher feature. The business link code of each record is extracted. The average row of the matrix corresponding to the business link codes 03 to 06 is calculated to generate a link mirrored feature matrix of size 4×128. The business links that do not match the matrix row are written into a 128-dimensional zero vector.

[0172] The mirror feature differencer determines the first row of the link mirror feature matrix as the first mirror voucher feature residual, and subtracts the previous row from each of the remaining rows in turn to generate mirror voucher feature residuals of size 4×128.

[0173] The labor service voucher fusion unit multiplies the four components of the delivered labor service residual vector with the corresponding rows of the 4×128 stage embedding matrix to generate a 4×128 labor service residual projection matrix. It then concatenates the labor service residual projection matrix and the mirrored voucher feature residuals row by row to obtain a 4×256 residual fusion matrix. The residual fusion matrix is ​​then multiplied with a 256×128 fusion weight matrix and a 128-dimensional bias vector is superimposed. After ReLU function mapping, a 4×128 labor service residual feature is generated.

[0174] The link embedding matrix with a size of 4×128, the fusion weight matrix with a size of 256×128, and the 128-dimensional bias vector are set as trainable parameters. The link embedding matrix and the fusion weight matrix are initialized with Xavier uniform distribution, and the initial value of the bias vector is set to 0. The numerical scaling rule and the labor delivery matrix are not set as trainable parameters.

[0175] The breakpoint quantile projection unit receives the labor residual features, calculates the breakpoint sequence difference and breakpoint offset coefficient based on the dual-track sequence positions recorded on both sides of the data breakpoint, adjusts the quantile sampling values ​​according to the sign of the breakpoint sequence difference and the breakpoint offset coefficient, performs cosine function encoding, and multiplies the data element-wise with the labor residual features to generate breakpoint quantile features, wherein:

[0176] The breakpoint projection unit includes:

[0177] Dual-track sequence register: stores the occurrence sequence number and the entry sequence number recorded on both sides of the data breakpoint;

[0178] Breakpoint Difference Calculator: Calculates the breakpoint sequence difference based on the dual-track sequence positions on both sides of the data breakpoint;

[0179] Offset Coefficient Calculator: Calculates the breakpoint offset coefficient based on the breakpoint sequence difference;

[0180] Quantile sampling queue: Stores the original quantile sampling values ​​and their sampling sequence numbers;

[0181] Sign offset controller: Adjusts the quantile sampling value according to the sign of the breakpoint sequence difference and the breakpoint offset coefficient;

[0182] Cosine fundamental frequency table: stores the cosine fundamental frequency corresponding to each encoding dimension;

[0183] Cosine encoder array: Generates quantile codes based on the adjusted quantile sample values ​​and the cosine fundamental frequency;

[0184] Feature projection multiplier: Multiplies the quantile code element-wise with the labor residual feature and outputs the breakpoint quantile feature;

[0185] The processing procedure for the breakpoint projection unit is as follows:

[0186] The dual-track sequence register receives the dual-track sequence from the labor traceability sample. Assuming the number of sample records is L and the number of data breakpoints is k, the occurrence sequence and entry sequence of the left and right records of each data breakpoint are extracted in ascending order according to the data breakpoint position, generating a breakpoint dual-track sequence matrix of size k×4.

[0187] For the j-th data breakpoint, j takes values ​​from 1 to k. The breakpoint difference calculator calculates the occurrence sequence difference and the entry sequence difference between the right record and the left record respectively. The occurrence sequence difference is obtained by subtracting the entry sequence difference from the occurrence sequence difference. All breakpoint sequence differences are written into a breakpoint sequence difference vector of size k×1.

[0188] The offset coefficient calculator divides the absolute value of the sequence difference of the j-th breakpoint by the sum of the number of records L and 1, and determines the smaller of the ratio and 1 as the offset coefficient of the j-th breakpoint, generating a breakpoint offset coefficient vector of size k×1.

[0189] The quantile sampling queue extracts 32 original quantile sample values ​​from a uniform distribution of 0 to 1 and writes them into an original quantile sampling vector of size 32×1 according to the sampling order.

[0190] When the breakpoint sequence difference is less than 0, equal to 0, and greater than 0, the sign offset controller sets the sign to -1, 0, and 1 respectively. It takes the smaller value between the original quantile sample value and 1 minus the original quantile sample value, multiplies the smaller value by the corresponding breakpoint offset coefficient and the sign of the breakpoint sequence difference, and adds it to the original quantile sample value to obtain the adjusted quantile sample value. The adjustment result less than 0 is set to 0, and the adjustment result greater than 1 is set to 1, generating an adjustment quantile matrix of size k×32.

[0191] The cosine fundamental frequency table stores 128 cosine fundamental frequencies according to the coding dimension number 0 to 127. Each cosine fundamental frequency is the product of the coding dimension number and pi. The cosine encoder array multiplies each adjustment quantile sample value in the adjustment quantile matrix with the 128 cosine fundamental frequencies and calculates the cosine function value to generate a breakpoint cosine coding tensor with a size of k×32×128.

[0192] When the number of data breakpoints is greater than 0, the cosine encoder array calculates the average value of the breakpoint cosine coding tensor along the dimension of the data breakpoints to obtain a quantile coding matrix of size 32×128. When the number of data breakpoints is 0, the same cosine function encoding is directly performed on the 32 original quantile sample values ​​to obtain a quantile coding matrix of size 32×128.

[0193] The feature projection multiplier expands the labor residual feature of size 4×128 and the quantile coding matrix of size 32×128 into tensors of size 4×32×128 respectively and multiplies them element by element to generate the breakpoint quantile feature of size 4×32×128.

[0194] The number of quantile samples is set to 32, the cosine coding dimension is set to 128, the upper limit of the breakpoint offset coefficient is set to 1, and no trainable parameters are set for the breakpoint order difference, breakpoint offset coefficient, quantile sampling adjustment and cosine function coding.

[0195] The tracing action continuation unit receives breakpoint quantile features, constructs forward tracing actions and reverse tracing actions that swap start and end records for adjacent start and end records, and binds them to vouchers. It constructs an action adjacency matrix based on the end record of the previous tracing action and the start record of the next tracing action. It aggregates breakpoint quantile features using the action adjacency matrix, calculates action values ​​through residual fusion and linear mapping, and binds action values ​​to tracing actions according to data breakpoints and quantile sequences, generating a tracing action value table, where:

[0196] The traceability action continuation unit includes:

[0197] Start and End Record Index Table: Stores the record identifiers, corresponding data breakpoints, and binding credentials for adjacent start and end records;

[0198] Trace Action Generator: Generates forward and reverse trace actions and binds them to credentials;

[0199] Action adjacency matrix generator: compares the end record and the start record of each traced action and generates an action adjacency matrix;

[0200] Quantile Feature Aggregator: Aggregates breakpoint quantile features using the action adjacency matrix;

[0201] Action Value Calculator: Performs residual fusion and linear mapping on aggregated features to calculate action value;

[0202] Action value writer: Binds action value to traceable action according to data breakpoint and position sequence, and generates traceable action value table;

[0203] The processing flow of the traceable action sequence unit is as follows:

[0204] The start and end record index table receives data breakpoints and start and end records from the labor traceability sample. When the number of data breakpoints is greater than 0, the start and end record with the largest occurrence time sequence position is selected from all start and end records to the left of each data breakpoint, and the start and end record with the smallest occurrence time sequence position is selected from all start and end records to the right of each data breakpoint to form an adjacent start and end record pair. When there are no data breakpoints, let the number of start and end records be t. Arrange the start and end records according to the occurrence time sequence position, and form an adjacent start and end record pair with the i-th start and end record and the (i+1)-th start and end record, where i takes values ​​from 1 to t-1 in sequence. The corresponding data breakpoint position is recorded as a null value. Let the number of adjacent start and end record pairs be r.

[0205] The traceability action generator points the previous start and end record in each adjacent start and end record pair to the next start and end record to generate a forward traceability action. It swaps the previous start and end record with the next start and end record to generate a reverse traceability action. It assigns action numbers starting from 1 according to the generation order and writes the vouchers bound to the start and end records of the action into the corresponding traceability action, generating M traceability actions, where M=2r.

[0206] The action adjacency matrix generator compares M tracing actions one by one. Let the tracing action numbers u and v be 1 to M in sequence. When the endpoint record identifier of the previous tracing action u is the same as the starting record identifier of the next tracing action v and u is not equal to v, the matrix value in the u-th row and v-th column is set to 1. Otherwise, it is set to 0, resulting in an initial action adjacency matrix of size M×M. The initial action adjacency matrix is ​​added to the M-order identity matrix, and each matrix value is divided by the sum of the matrix values ​​in the row to generate an action adjacency matrix of size M×M.

[0207] Assuming the size of the breakpoint quantile feature is 4×32×128, the quantile feature aggregator maps the business link codes 03 to 06 sequentially to the first to fourth rows of the breakpoint quantile feature. It extracts the corresponding row according to the business link code of the endpoint record of each trace action, and generates an action quantile feature tensor of size M×32×128. When the business link code of the endpoint record does not belong to 03 to 06, the average value of the breakpoint quantile feature along the first dimension is used as the corresponding action quantile feature.

[0208] The quantile feature aggregator weights the action quantile feature tensor for each action according to the action adjacency matrix. For the a-th tracing action, the matrix value of the a-th row and b-th column of the action adjacency matrix is ​​multiplied element by element with the action quantile feature of the b-th tracing action, and the products of b from 1 to M are summed to generate the adjacency aggregation feature of the a-th tracing action. M tracing actions are processed in sequence to obtain an adjacency aggregation feature tensor of size M×32×128.

[0209] The action value calculator multiplies the adjacency aggregation feature tensor with a residual weight matrix of size 128×128 and superimposes it with a 128-dimensional residual bias vector. After ReLU mapping, it is added element-wise with the action quantile feature tensor to obtain an action residual feature tensor of size M×32×128. The action residual feature tensor is then multiplied with a value weight vector of size 128×1 and superimposed with value bias values ​​to generate an action value matrix of size M×32.

[0210] The action value writer extracts the matrix values ​​from the action value matrix one by one, and writes the corresponding labor batch number, data breakpoint position, quartile sequence, action number, action direction, start record identifier, end record identifier, binding voucher and action value into the same table entry. The entries are arranged in order of data breakpoint position, quartile sequence and action number. The entries with empty data breakpoint positions are arranged after the non-empty entries, generating a traceable action value table.

[0211] The residual weight matrix with a size of 128×128 and the value weight vector with a size of 128×1 are initialized using a Xavier uniform distribution. The initial values ​​of the 128-dimensional residual bias vector and the value bias are set to 0. The four parameters are set as trainable parameters. The mapping between the business link encoding and the breakpoint quantile feature line, the calculation of the line mean when the mapping range is exceeded, the generation of the action adjacency matrix and the normalization rule are not set as trainable parameters.

[0212] An improved implicit quantile network uses labor tracing samples with labeled data breakpoints and target tracing sequences as training samples. Action rewards are calculated based on the consistency between the tracing action and the target tracing sequence. The quantile Bellman objective is calculated based on the action reward and the action value of the next tracing action. The quantile temporal difference error is calculated based on the action value of the current tracing action and the quantile Bellman objective. The quantile temporal difference error, mirrored document reconstruction error, labor residual delivery conservation error, breakpoint quantile order error, and tracing action continuity error are combined into a joint loss, which is used to update the network parameters in reverse. Training is complete when the absolute value of the difference between the joint losses of adjacent rounds is less than 0.0005 for eight consecutive rounds.

[0213] The improved implicit quantile network is trained as follows:

[0214] The labor traceability sample with 16,800 labeled data breakpoints and target traceability sequences was used for training. Each training batch consisted of 64 samples. The training samples were input into the improved implicit quantile network to obtain the traceability action value table.

[0215] When the starting point record identifier, ending point record identifier, and action direction are all consistent with the target tracing sequence, the action reward is set to 1; when the starting point record identifier and ending point record identifier are swapped and the action direction is opposite, the reward is set to -0.6; and for other tracing actions, the reward is set to -1.

[0216] The action value of each quantile in the subsequent tracing action is multiplied by a discount factor of 0.95 and then added to the action reward to obtain the quantile Bellman target. The action value of the last tracing action and tracing actions not included in the target tracing sequence are set to 0.

[0217] The quantile difference is obtained by subtracting the action value of the current tracing action from the quantile Bellman target. If the absolute value of the difference is not greater than 1, 0.5 times the square of the difference is taken. If it is greater than 1, 0.5 is taken as the absolute value of the difference. The absolute value of the difference is taken as the difference between the corresponding quantile sample value and the indicator value that is less than 0 and is taken as 1, otherwise it is taken as 0. The quantile weight is obtained by multiplying the calculation result by the quantile weight and taking the average value. The quantile time series difference error is obtained.

[0218] The mean square error of the reconstructed feature matrix before and after the breakpoint is calculated to obtain the reconstruction error of the mirrored voucher. The labor residual vector and the delivery labor residual vector are multiplied by the corresponding rows of the link embedding matrix, and the two projection results are summed row by row and the mean square error of the summation results is calculated to obtain the labor residual delivery conservation error.

[0219] When data breakpoints are included, the action values ​​of the corresponding traceable actions are synchronously arranged in ascending order according to the adjusted quantile sampling values ​​of each data breakpoint. When data breakpoints are not included, the action values ​​are arranged in ascending order according to the original quantile sampling values. The larger value between the previous action value minus the next action value and 0 is calculated and the average value is taken to obtain the breakpoint quantile order error.

[0220] The next tracing action after the target is determined as a positive successor action, and the remaining tracing actions adjacent to the current tracing action in the action adjacency matrix are determined as negative successor actions. The result of subtracting the average value of positive successor actions from 0.2 and adding the average value of negative successor actions is calculated. The result is averaged with the larger value in 0 to obtain the tracing action succession error.

[0221] When no data breakpoints are included, the mirror voucher reconstruction error is set to 0; when no negative continuation action exists, the trace action continuation error is set to 0.

[0222] The joint loss is obtained by multiplying the quantile time-series difference error, mirrored document reconstruction error, labor residual delivery conservation error, breakpoint quantile order error, and tracing action continuation error by 0.45, 0.15, 0.15, 0.10, and 0.15 respectively and then summing them.

[0223] The gradient of the network parameters is calculated in reverse based on the joint loss. The overall L2 norm of the gradient is restricted to no more than 5. The network parameters are updated using the Adam optimizer with a learning rate of 0.0003. The average value of the joint loss of all training batches in each round is determined as the joint loss of that round. When the absolute value of the difference between the joint losses of any two adjacent rounds in eight consecutive training rounds is less than 0.0005, the training of the improved implicit quantile network is completed.

[0224] This invention structurally optimizes the traditional implicit quantile network and proposes an action value estimation method for the construction labor data traceability scenario. In terms of cross-breakpoint association of vouchers, a mirror voucher backtracking unit is introduced to reverse the record features on both sides of the data breakpoint and reconstruct the voucher similarity, so that records with misaligned entry time can be re-associated according to the voucher correspondence, reducing the interference of delayed entry on the traceability relationship judgment.

[0225] To address the labor quantity transfer relationship between attendance, workload confirmation, wage settlement and wage payment, a labor residual delivery unit is introduced. This unit delivers the labor residual between the start and end records along adjacent business processes and merges it with the feature residual of the mirrored voucher. As a result, the change in labor quantity and the continuity of business processes jointly participate in the feature expression, enabling the model to exclude traceability actions where the direction of labor quantity change is inconsistent with the business process.

[0226] To further enhance the model's ability to identify data breakpoint time-series offsets, a breakpoint quantile projection unit is introduced. The quantile sampling position is adjusted according to the difference between the occurrence time sequence position and the entry time sequence position. The offset direction and degree of the data breakpoint are incorporated into the quantile features, so that the action value distribution can change with the dual-track time-series misalignment state, thereby improving the accuracy of action value estimation under different delayed entry states.

[0227] In the tracing action continuation modeling stage, a tracing action continuation unit is introduced. Adjacent action features are aggregated according to the correspondence between the start and end records of tracing actions, so that the action value of a single tracing action includes both the current record state and the preceding and following continuation information. This distinguishes between forward tracing actions, reverse tracing actions, and disconnected tracing actions, thereby improving the continuity and directional consistency of the target tracing sequence.

[0228] The improved implicit quantile network not only retains the ability of the traditional implicit quantile network to estimate the distribution of action value, but also realizes the joint modeling of voucher association, labor delivery, data breakpoint offset and tracing action continuity relationship, thereby improving the accuracy of data breakpoint labeling and target tracing sequence generation in complex construction labor data.

[0229] In this embodiment, generating the candidate traceability sequence includes:

[0230] The value table of traceability actions is divided according to data breakpoints and quantiles. Traceability actions with interchanged start and end records and the same voucher are grouped into mutual reverse traceability action pairs, and a table of mutual reverse traceability action pairs is generated.

[0231] Calculate the bidirectional action value difference for reciprocal tracing actions position by position, merge the corresponding positions of consecutive positive action value differences into quantile intervals, and generate a quantile interval action table, where:

[0232] Generate the action table for each quantile interval, specifically as follows:

[0233] The mutual reverse tracing action pair table is compiled according to the labor batch number, data breakpoint position and two tracing action numbers. The first and second tracing actions are determined in ascending order of tracing action numbers, and the action values ​​are arranged in quantile order.

[0234] The action value difference of the first trace action is obtained by subtracting the action value of the second trace action from the action value of the first trace action, and the action value difference of the second trace action is obtained by subtracting the action value of the first trace action in reverse.

[0235] Scan the action value difference of the two traced actions respectively, merge the quantiles with consecutive action value differences greater than 0 into positive value segments, and determine the first and last quantiles of the positive value segments as the lower limit and upper limit of the quantile interval, respectively. A single positive value quantile is used as both the lower limit and upper limit of the quantile interval.

[0236] Write the labor batch number, data breakpoint position, traceability action number, action direction, start record identifier, end record identifier, binding voucher, and quartile interval into the action interval record. Traceability actions that do not form a positive value segment are not written. Arrange the labor batch number, data breakpoint position, lower limit of quartile interval, and traceability action number to generate a quartile interval action table.

[0237] The tracing actions whose start and end records are located on either side of the data breakpoint in the quantile interval action table are determined as the starting tracing actions. Using each starting tracing action as the branch starting point, following the same direction as the end record of the previous tracing action and the starting record of the next tracing action, the unconnected tracing actions at the intersection of quantile intervals are recursively processed. The recursive intervals are updated according to the intersection of quantile intervals until no unconnected tracing actions satisfying the continuity condition exist in any of the recursive branches. The recursive branches are then arranged according to the continuity order of the start and end records to generate a candidate tracing sequence, where:

[0238] Generate candidate traceability sequences, specifically as follows:

[0239] Process the interval action table according to the labor batch number, and determine the tracing action where the starting record and the ending record are located on both sides of the data breakpoint as the starting tracing action;

[0240] Establish a recursive branch for each initial tracing action, determine the corresponding quantile interval as the recursive interval, and write the tracing action number into the set of already connected tracing action numbers;

[0241] Using the last trace action of the recursive branch as the previous trace action, filter trace actions within the same labor batch whose starting record identifier is the same as the ending record identifier of the previous trace action, whose trace action number is not written into the set of already followed trace action numbers, and whose quantile interval intersects with the recursive interval.

[0242] Take the larger of the lower limit of the two quantile intervals and the smaller of the upper limit to form the intersection. If there is only one tracing action that meets the condition, it is directly connected. If there are multiple tracing actions, the recursive branch is copied and connected respectively. The intersection is determined as the recursive interval of the corresponding branch. The tracing action number of the connected tracing action is written into the set of connected tracing action numbers. The recursion is repeated until there are no tracing actions that meet the condition.

[0243] The traceability actions are arranged according to the sequential order of the traceability actions within each recursive branch. The labor batch number, the recursive interval, the data breakpoint position of each traceability action, the traceability action number, the starting record identifier, the ending record identifier, the binding voucher, and the quantile interval are encapsulated into candidate traceability sequences to generate candidate traceability sequences.

[0244] In this embodiment, generating the target tracing sequence includes:

[0245] The action sequence is compiled according to the order of the tracing actions in the candidate tracing sequence and mapped to the matrix rows and columns. When the end record of the row tracing action is the same as the start record of the column tracing action, the matrix item is set to 1, otherwise it is set to 0. The diagonal items are set to 0 to generate the tracing action transition matrix.

[0246] Iteratively perform Boolean multiplication and logical OR operations on the trace action transition matrix. When the matrix items no longer change, a transitive closure is generated. The starting trace action is determined by the non-zero diagonal items. The process is then recursively performed along the non-zero matrix items of the trace action transition matrix until the return to the starting trace action is achieved, generating a closed segment table, where:

[0247] The table of closed segments is generated as follows:

[0248] Candidate tracing sequences are selected one by one. Let the number of tracing actions be n, and the corresponding tracing action transition matrix is ​​determined as the current transit closure.

[0249] In each round of computation, i and j are taken from 1 to n in sequence. The matrix items from 1 to n in the i-th row and j-th column are checked. If any matrix item in the i-th row and h-th column of the current transit closure and the h-th row and j-th column of the trace action transition matrix are both 1, the Boolean multiplication result is set to 1. If none of them are satisfied, the result is set to 0.

[0250] Perform a logical OR operation on each item of the Boolean multiplication result and the current transitive closure. If the resulting matrix no longer changes, it is determined as the transitive closure; otherwise, it is used as the current transitive closure for the next round.

[0251] Extract the non-zero diagonal terms from the transit closure according to the action sequence, determine the corresponding tracing action as the starting tracing action, and recursively tracing the next tracing action along the non-zero matrix terms in the tracing action transition matrix.

[0252] When there are multiple subsequent tracing actions, recursive branches are established for each. When the recursive branch returns to the starting tracing action, a closed segment is formed. When a tracing action that has been written into the current branch but does not belong to the starting tracing action is encountered, the corresponding branch is terminated.

[0253] The closed segment is cyclically shifted to the first position of the trace action with the smallest action sequence. Only one closed segment with the same trace action number sequence is retained. The corresponding candidate trace sequence, the starting trace action, the action sequence of each trace action, the trace action number and the quantile interval are written into the closed segment record to generate the closed segment table.

[0254] Calculate the length of the quantile interval for each tracing action in the closed segment table according to the first and last quantile positions. Select the tracing action with the shortest quantile interval. If the lengths are the same, select the tracing action with the smallest action sequence. Delete the selected tracing action and its corresponding row and column. Repeat the closure calculation and closed segment location until all diagonal items are 0. Continue the remaining tracing actions according to the start and end records to generate the target tracing sequence, where:

[0255] Generate the target tracing sequence, specifically as follows:

[0256] Select candidate traceability sequences one by one and match the corresponding closed segment records in the closed segment table;

[0257] When a closed segment record exists, subtract the lower limit of the quantile interval from the upper limit of the quantile interval of each tracing action and add 1 to obtain the quantile interval length. Select the tracing action with the smallest quantile interval length. If there are multiple quantile intervals, select the tracing action with the smallest action sequence.

[0258] If no closed segment record exists, the tracing action is not deleted;

[0259] When a selected tracing action exists, the selected tracing action is deleted from the candidate tracing sequence, and the corresponding row and column in the tracing action transition matrix are deleted, while the original action sequence and matrix row and column mapping of the remaining tracing actions are retained;

[0260] After completing one deletion, Boolean multiplication and logical OR operation are re-executed on the traceback action transition matrix after deletion to form a transitive closure and locate the new closed segment;

[0261] If there are still non-zero diagonal terms, recalculate the quantile interval length of each tracing action within the closed segment and repeat the selection and deletion until all diagonal terms are 0;

[0262] The remaining tracing actions are arranged according to the original action sequence. If the end record identifier of the previous tracing action is the same as the start record identifier of the next tracing action, they are added to the same sequence; otherwise, a new sequence is created from the next tracing action.

[0263] The labor batch number, data breakpoint position, traceability action number, start record identifier, end record identifier, binding voucher and quantile interval in each sequence are encapsulated into target traceability sequences to generate target traceability sequences.

[0264] In this embodiment, generating intelligent traceability results for construction labor data includes:

[0265] The target tracing sequence is divided according to data breakpoints, tracing actions are arranged according to the continuity of start and end records, tracing actions are associated with start and end records and vouchers, and a tracing path table is generated, in which:

[0266] Generate a traceability path table, specifically as follows:

[0267] Select the target tracing sequence one by one, and use the order of tracing actions in the sequence as the arrangement order under the same continuation conditions. Starting from the first tracing action, connect the unarranged tracing actions whose starting record identifier is the same as the ending record identifier of the current tracing action to the next action, until all tracing actions are arranged.

[0268] The traceability actions are processed and arranged according to the labor batch number and the target traceability sequence order. The first path segment number of each target traceability sequence is set to the maximum existing path segment number of the same labor batch plus 1, and is set to 1 if there is no existing path segment.

[0269] Write the tracing actions sequentially into the current path segment. When the data breakpoint of the tracing action is not empty, and the start record and end record are located on both sides of the data breakpoint and do not belong to the last tracing action, increment the path segment number by 1, and write the subsequent tracing actions into the new path segment.

[0270] Match the corresponding start and end records and binding vouchers according to the start record identifier and end record identifier. Assign path action sequence number starting from 1 in each path segment. Write the project number, laborer number, labor batch number, path segment number, path action sequence number, traceability action number, data breakpoint position, start record, end record and binding voucher into the path record to generate a traceability path table.

[0271] Mark the starting point record of the first trace action in the trace path table as the trace start point, and mark the location of trace actions that cross data breakpoints as data breakpoints to generate a trace location table;

[0272] The traceability and location tables are compiled according to project number, worker number, and labor batch number. The traceability starting point, data breakpoint, start and end records, and vouchers are encapsulated according to the sequence of traceability actions to generate intelligent traceability results for construction labor data.

[0273] refer to Figure 3 A reinforcement learning-based intelligent traceability device for construction labor data includes:

[0274] The construction labor data processing module is used to collect and preprocess construction labor data to generate a construction labor dataset.

[0275] The conflict record arrangement module is used to arrange conflict records in the same batch in the construction labor dataset and generate a labor handover sequence.

[0276] The dual-time-series breakpoint construction module is used to align the occurrence timeline and the warehousing timeline of the labor handover sequence and mark data breakpoints to generate labor traceability samples.

[0277] The reinforcement learning valuation module is used to calculate the action value of labor traceability samples using an improved implicit quantile network and generate a traceability action value table.

[0278] The candidate sequence generation module is used to continuously trace the traceable actions in the action value table according to the quantile intervals where the action value difference is positive, and generate candidate traceability sequences.

[0279] The traceability sequence loop elimination module is used to perform closed segment elimination on candidate traceability sequences to generate the target traceability sequence;

[0280] The traceability result generation module is used to associate the start and end records and vouchers in the target traceability sequence, mark the traceability start point and data breakpoint, and generate intelligent traceability results for construction labor data.

[0281] In this embodiment, the computer-readable storage medium stores computer program instructions, which, when executed by a processor, perform a reinforcement learning-based intelligent traceability method for construction labor data.

[0282] Example 1: To verify the feasibility of the present invention in practice, it was applied to a comprehensive construction project. The method of the present invention processed 64,420 original records generated by 428 workers in 6 work groups within a wage settlement cycle, including 428 real-name registration records, 428 labor contracts, 32,760 attendance records, 14,682 workload confirmation records, 8,536 wage settlement records, 4,240 wage payment records, and 3,346 vouchers. Among them, 1,126 sets of records occurred at the same time, and 742 sets of records had delayed entry into the database.

[0283] The project number, worker number, business process code, and time format were standardized, with six business processes sequentially coded from 01 to 06, and linked to the data source record number and data entry log. 317 records lacked entry timestamps; 309 were supplemented, and the remaining 8 were marked as null. After removing 186 duplicate source records, 64,234 standard labor records were obtained. A 64-bit content digest was calculated for 3,346 vouchers, encapsulated with voucher type, source platform identifier, and issuing entity identifier, and bound to the record identifier, forming 5,126 labor batches, of which 618 contained conflicting records within the same batch.

[0284] Labor batch B0176 was selected as the training sample, with the starting record being R20, conflicting records within the same batch being R21, R22, and R23, and the ending record being R24. The business process code for the three conflicting records within the same batch is 03, they occur at the same time, and their entry sequence numbers are 3, 2, and 4 respectively, bound to vouchers V21, V22, and V23. R20 records 80 hours of attendance, 109.8 square meters of work, a settlement amount of 18020 yuan, and a payment amount of 0 yuan; R21 updates the work and settlement amount to 110.4 square meters and 18120 yuan; R22 updates them to 112.6 square meters and 18460 yuan; R23 confirms the above values; and R24 records the payment amount of 18460 yuan.

[0285] The records R21, R22, and R23 are cyclically swapped, resulting in three different record arrangements. R22-R23-R21 shows a settlement amount refund of 340 yuan. The first record of R23-R21-R22 differs from R20 by 2.8 square meters. The workload and settlement amount of R21-R22-R23 increase continuously, and the vouchers are not reused. Therefore, R21-R22-R23 is locked, generating a labor handover sequence.

[0286] The labor handover sequence is arranged by occurrence time as R20-R21-R22-R23-R24, and by entry time as R20-R22-R21-R23-R24. The dual-track positions of R21 are 2 and 3, and the dual-track positions of R22 are 3 and 2. The two records form a reverse span, so a data breakpoint is marked between R21 and R22, forming a labor traceability sample containing 5 records, 5 sets of dual-track positions, and 3 vouchers.

[0287] Five records form a 5×12 input feature matrix, including dual-track sequence, four labor quantities, business process codes, and voucher field codes. At the data breakpoint, it is divided into a 2×12 feature matrix before the breakpoint and a 3×12 feature matrix after the breakpoint. After reversing and aligning the feature matrix before the breakpoint, the voucher field matching ratios of the two sets of records are 0.50 and 0.75. The 2×3 voucher similarity matrix is ​​then weighted and reconstructed after row normalization, reducing the reconstruction error from 0.084 to 0.031, generating mirrored voucher features.

[0288] The starting and ending labor quantity vectors are constructed based on attendance, workload, settlement amount, and payment amount. Normalized subtraction yields labor residual vectors of 0, 0.025, 0.024, and 1.000, corresponding to 0 hours, 2.8 square meters, 440 yuan, and 18460 yuan, respectively. A 4×4 labor delivery matrix delivers the workload residual to the wage settlement stage and the settlement amount residual to the wage payment stage. These residuals are then fused with the mirrored voucher feature residuals, maintaining a conserved error of 0.024, thus generating the labor residual feature.

[0289] The difference between the two track positions recorded on both sides of the data breakpoint is 1 and -1, resulting in a breakpoint position difference of -2 and a breakpoint offset coefficient of 0.3333. The five quantile sampling values ​​are adjusted to 0.0667, 0.2000, 0.3333, 0.6000, and 0.8667. After 128-dimensional cosine encoding and element-wise multiplication with the labor residual features, the breakpoint quantile features are generated, and the average feature response at the data breakpoint location increases from 0.42 to 0.71.

[0290] Construct forward tracing actions A1 to A4 and their corresponding reverse tracing actions. The matrix entries for A1 to A2, A2 to A3, and A3 to A4 in the action adjacency matrix are all 1. After adjacency aggregation, residual fusion, and linear mapping, the five quantile action values ​​for A1 are 0.72, 0.76, 0.81, 0.85, and 0.88, respectively, while the corresponding reverse tracing action values ​​are 0.31, 0.33, 0.36, 0.39, and 0.42. The positive quantile intervals for A2, A3, and A4 intersect at 0.30–0.70, forming the candidate tracing sequence A1-A2-A3-A4.

[0291] Adding the interference tracing action A5 from R23 back to R21, the positive quantile interval is 0.55–0.68. The 5×5 tracing action transition matrix forms a transitive closure after 3 rounds of Boolean multiplication and logical OR operation, where the diagonal terms of A2, A3, and A5 are 1, corresponding to the closed segment A2-A3-A5. The quantile interval length of A5 is the shortest at 0.13. After deleting A5 and its corresponding row and column, the transitive closure is recalculated, and all diagonal terms are 0, resulting in the target tracing sequence A1-A2-A3-A4.

[0292] In the intelligent traceability results of construction labor data, A1 to A4 are sequentially associated with R20 to R24 and their corresponding vouchers. The changes in labor volume are as follows: workload increases by 0.6 square meters, workload increases by 2.2 square meters and settlement amount increases by 340 yuan, labor volume remains unchanged and payment amount increases by 18,460 yuan. R20 is marked as the traceability starting point, and the area between R21 and R22 is marked as the data breakpoint. The record identifier, dual time points, and voucher content summary of each traceability action are retained.

[0293] The improved implicit quantile network uses 16,800 training samples, 3,600 validation samples, and 3,600 test samples, with a batch size of 64, a learning rate of 0.0003, and a discount factor of 0.95. The rewards for the target tracing action, reverse tracing action, and disconnected / reconnected tracing action are 1, -0.6, and -1, respectively, and the weights of the five joint loss terms are 0.45, 0.15, 0.15, 0.10, and 0.15, respectively.

[0294] The five errors corresponding to the training sample for labor batch B0176 were 0.072, 0.031, 0.024, 0.018, and 0.027, with a joint loss of 0.0465. The overall joint loss decreased from the initial 0.3862 to 0.1427 in round 20, 0.0714 in round 40, and 0.0489 in round 60. By round 68, the joint loss had decreased from 0.0478 to 0.0456 for eight consecutive rounds, with the absolute value of the difference between adjacent rounds being less than 0.0005. The median action values ​​for A2 and A5 were adjusted from 0.44 and 0.41 in round 1 to 0.83 and 0.29, respectively, and the target tracing action selection accuracy of the validation sample increased from 61.38% to 94.72%.

[0295] In a continuous validation process over 30 working days using the same data environment, traditional methods employed fixed sorting, rule matching, single expected action value, and sequential traversal. The method of this invention correctly reconstructed 3442 labor handover sequences from 3600 test samples, achieving an accuracy of 95.61%; the traditional method correctly reconstructed 2956, achieving an accuracy of 82.11%.

[0296] Of the 842 data breakpoints, the method of this invention correctly identified 779, with a recall rate of 92.52%, while the traditional method correctly identified 626, with a recall rate of 74.35%. Among the 742 delayed data entry samples, the method of this invention correctly reconstructed 683 labor handover sequences, with an accuracy rate of 92.05%, while the traditional method correctly reconstructed 534, with an accuracy rate of 71.97%. The traditional method identified 173 voucher reuse samples and 218 closed-path samples, while the method of this invention identified 25 and 14 respectively. The voucher reuse rate decreased from 4.81% to 0.69%, and the closed-path rate decreased from 6.06% to 0.39%.

[0297] The accuracy rate of the tracing start point of the method of this invention is 96.31%, while that of the traditional method is 83.61%; the completeness rates of start and end records and vouchers are 95.11% and 79.81%, respectively. The average processing time of a single labor tracing sample increased from 17.4 milliseconds to 23.8 milliseconds, the accuracy rate of labor handover sequence improved by 13.50 percentage points, and the data breakpoint recall rate improved by 18.17 percentage points, verifying the feasibility and effectiveness of the method of this invention.

[0298] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for intelligent traceability of construction labor data based on reinforcement learning, characterized in that, include: Collect and preprocess construction labor data to generate a construction labor dataset; Filter conflicting records in the same batch in the construction labor dataset, lock the records with matching start and end records and non-reusable vouchers by cyclic transposition, and generate a labor handover sequence; The labor handover sequence is programmed into the occurrence time track and the warehousing time track. The dual-track sequence is aligned record by record. Data breakpoints are cut and marked at the reverse crossing points to generate labor traceability samples. The labor traceability sample is input into the improved implicit quantile network and processed sequentially through the mirror voucher backtracking unit, the labor residual delivery unit, the breakpoint quantile projection unit, and the traceability action continuation unit to generate a traceability action value table. Pair the traceability actions in the traceability action value table that have interchanged start and end records, extract the quantile intervals with positive action value differences according to the quantile order, and recursively deduce the traceability actions where the quantile intervals intersect along the start and end records to generate candidate traceability sequences. A traceability action transition matrix is ​​constructed from the candidate traceability sequences. The transit closure is iteratively calculated. Closed segments are located by non-zero diagonal terms. The traceability action with the shortest quantile interval within the closed segment is deleted until all diagonal terms are 0, thus generating the target traceability sequence. The starting and ending records and vouchers are associated with the target tracing sequence, the tracing starting point and data breakpoint are marked, and intelligent tracing results of construction labor data are generated.

2. The intelligent traceability method for construction labor data based on reinforcement learning according to claim 1, characterized in that, The generated construction labor dataset includes: Collect personnel real-name registration data, labor contract data, attendance data, workload confirmation data, wage settlement data, wage payment data, voucher data, and data entry logs, and group them into the construction labor original record group according to project number and laborer number; Standardize the project number, worker number, business process code and time format of the original construction labor record group, associate the data with the data entry log according to the data source record number, mark the occurrence time and entry time and compile record identifiers to generate a standard labor record group; Calculate the content summary of the voucher data in the standard labor service record group, encapsulate the content summary with the voucher type, source platform identifier and issuing entity identifier into a voucher, bind the voucher according to the record identifier, and generate a voucher-associated record group; The voucher-related record groups are divided according to project number, worker number, and wage settlement cycle. Each group is assigned a labor batch number, and the records within the group are packaged according to the labor batch number and record identifier to generate a construction labor dataset.

3. The intelligent traceability method for construction labor data based on reinforcement learning according to claim 1, characterized in that, The generation of the labor handover sequence includes: The construction labor dataset is divided according to the labor batch number. Records with the same business process code and occurrence time but different record identifiers are marked as conflict records in the same batch. The conflict position is marked and the adjacent non-conflict records before and after the conflict record in the same batch are determined as the start and end records, and a conflict position table is generated. The conflict records in the same batch are rotated in a cyclical manner according to the conflict position table. In each round, the last conflict record in the same batch is put back to the first conflict position to generate a candidate record permutation set. Verify the start and end record matching status and voucher reuse status of the candidate record arrangement set, retain the record arrangement where the start and end records match and the voucher is not reused, and generate a matching record arrangement set. The sum of the absolute values ​​of the entry time differences of adjacent records in the matching record set is determined as the handover time difference. The first record is locked in ascending order of the handover time difference, and the records are continued according to the business link code to generate a labor handover sequence.

4. The intelligent traceability method for construction labor data based on reinforcement learning according to claim 1, characterized in that, The generation of labor traceability samples includes: Copy the labor handover sequence and arrange it in ascending order by occurrence time and warehousing time, respectively, to generate occurrence timeline and warehousing timeline; Pair the same record in the occurrence time track and the warehousing time track according to the record identifier, record the dual-track sequence position, and generate a dual-track sequence position table; The dual-track sequence table is arranged according to the order of occurrence in the time sequence track. When the order of adjacent records in the entry time sequence track decreases, the adjacent records are marked as data breakpoints, and a breakpoint mark sequence is generated. The data breakpoints are segmented into a breakpoint marker sequence, and the record segments, dual-track sequence, start and end records, and vouchers on both sides of the data breakpoints are packaged according to the labor batch number to generate a labor traceability sample.

5. The intelligent traceability method for construction labor data based on reinforcement learning according to claim 1, characterized in that, The generation of the traceability action value table includes: An improved implicit quantile network is constructed by adding a mirrored voucher backtracking unit, a labor residual delivery unit, a breakpoint quantile projection unit, and a traceability action continuation unit to the original implicit quantile network. The mirrored voucher backtracking unit receives labor traceability samples, constructs an input feature matrix according to the position in the occurrence time track, divides it into a feature matrix before the breakpoint and a feature matrix after the breakpoint at the data breakpoint, arranges the feature matrix before the breakpoint in reverse order, aligns the feature matrix before the breakpoint and the feature matrix after the breakpoint according to the position difference from the data breakpoint, constructs a voucher similarity matrix according to the voucher field matching ratio, reconstructs the feature matrix before the breakpoint by weighting the voucher similarity matrix, and merges it with the feature matrix after the breakpoint and the dual-track position to generate mirrored voucher features; The labor residual delivery unit receives the mirror voucher features, and according to the business link code, it forms the starting labor volume vector and the ending labor volume vector from the numerical fields of the starting and ending records respectively. It generates a labor residual vector by subtracting the starting labor volume vector from the ending labor volume vector. It constructs a labor delivery matrix according to adjacent business links, and delivers the labor residual vector to the next business link and merges it with the mirror voucher feature residual to generate a labor residual feature. The breakpoint quantile projection unit receives the labor residual features, calculates the breakpoint sequence difference and breakpoint offset coefficient based on the double-track sequence positions recorded on both sides of the data breakpoint, adjusts the quantile sampling value according to the sign of the breakpoint sequence difference and the breakpoint offset coefficient, performs cosine function encoding and multiplies it element by element with the labor residual features to generate the breakpoint quantile features. The tracing action continuation unit receives the breakpoint quantile features, constructs a forward tracing action and a reverse tracing action that swaps the start and end records for adjacent start and end records, and binds the voucher. It constructs an action adjacency matrix based on the end record of the previous tracing action and the start record of the next tracing action, aggregates the breakpoint quantile features using the action adjacency matrix, calculates the action value through residual fusion and linear mapping, binds the action value to the tracing action according to the data breakpoint and quantile order, and generates a tracing action value table. An improved implicit quantile network uses labor tracing samples with labeled data breakpoints and target tracing sequences as training samples. It calculates the action reward based on the consistency between the tracing action and the target tracing sequence. It calculates the quantile Bellman target based on the action reward and the action value of the next tracing action. It calculates the quantile temporal difference error based on the action value of the current tracing action and the quantile Bellman target. It combines the quantile temporal difference error, mirrored voucher reconstruction error, labor residual delivery conservation error, breakpoint quantile order error, and tracing action continuation error into a joint loss. It updates the network parameters in reverse. The training is completed when the absolute value of the difference between the joint losses of adjacent rounds is less than 0.0005 in 8 consecutive training rounds.

6. The intelligent traceability method for construction labor data based on reinforcement learning according to claim 1, characterized in that, The generation of candidate traceability sequences includes: The value table of traceability actions is divided according to data breakpoints and quantiles. Traceability actions with interchanged start and end records and the same voucher are grouped into mutual reverse traceability action pairs, and a table of mutual reverse traceability action pairs is generated. Calculate the bidirectional action value difference of the mutually reversible tracing actions position by position, merge the corresponding positions of the action value differences that are consecutively positive into position intervals, and generate a position interval action table. The tracing actions whose start and end records are located on both sides of the data breakpoint in the quantile interval action table are determined as the starting tracing actions. Taking each starting tracing action as the branch starting point, the unconnected tracing actions of the intersecting quantile intervals are recursively deduced along the same direction as the end record of the previous tracing action and the starting record of the next tracing action. The recursively deduced intervals are updated according to the intersection of the quantile intervals until there are no unconnected tracing actions that meet the continuity conditions in each recursively branch. The recursively branches are arranged according to the continuity order of the start and end records to generate a candidate tracing sequence.

7. The intelligent traceability method for construction labor data based on reinforcement learning according to claim 1, characterized in that, The generation of the target tracing sequence includes: The action sequence is compiled according to the order of the tracing actions in the candidate tracing sequence and mapped to the matrix rows and columns. When the end record of the row tracing action is the same as the start record of the column tracing action, the matrix item is set to 1, otherwise it is set to 0. The diagonal items are set to 0 to generate the tracing action transition matrix. Iteratively perform Boolean multiplication and logical OR operations on the trace action transition matrix. When the matrix items no longer change, a transitive closure is generated. The starting trace action is determined by the non-zero diagonal items. The non-zero matrix items of the trace action transition matrix are recursively used to return to the starting trace action, generating a closed segment table. Calculate the length of the quartile interval for each tracing action in the closed segment table according to the first and last quartile positions. Select the tracing action with the shortest quartile interval. If the lengths are the same, select the tracing action with the smallest action sequence. Delete the selected tracing action and its corresponding row and column. Repeat the closure calculation and closed segment positioning until the diagonal items are all 0. Continue the remaining tracing actions according to the start and end records to generate the target tracing sequence.

8. The intelligent traceability method for construction labor data based on reinforcement learning according to claim 1, characterized in that, The generated intelligent traceability results for construction labor data include: Divide the target tracing sequence according to data breakpoints, arrange tracing actions according to the continuity relationship of start and end records, associate tracing actions with start and end records and vouchers, and generate a tracing path table; Mark the starting point record of the first trace action in the trace path table as the trace start point, and mark the location of trace actions that cross data breakpoints as data breakpoints to generate a trace location table; The traceability and location tables are compiled according to project number, worker number, and labor batch number. The traceability starting point, data breakpoint, start and end records, and vouchers are encapsulated according to the sequence of traceability actions to generate intelligent traceability results for construction labor data.

9. A reinforcement learning-based intelligent traceability device for construction labor data, executing the reinforcement learning-based intelligent traceability method for construction labor data as described in any one of claims 1 to 8, characterized in that, include: The construction labor data processing module is used to collect and preprocess construction labor data to generate a construction labor dataset. The conflict record arrangement module is used to arrange conflict records in the same batch in the construction labor dataset and generate a labor handover sequence. The dual-time-series breakpoint construction module is used to align the occurrence timeline and the warehousing timeline of the labor handover sequence and mark data breakpoints to generate labor traceability samples. The reinforcement learning valuation module is used to calculate the action value of labor traceability samples using an improved implicit quantile network and generate a traceability action value table. The candidate sequence generation module is used to continuously trace the traceable actions in the action value table according to the quantile intervals where the action value difference is positive, and generate candidate traceability sequences. The traceability sequence loop elimination module is used to perform closed segment elimination on candidate traceability sequences to generate the target traceability sequence; The traceability result generation module is used to associate the start and end records and vouchers in the target traceability sequence, mark the traceability start point and data breakpoint, and generate intelligent traceability results for construction labor data.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, perform the intelligent traceability method for construction labor data based on reinforcement learning as described in any one of claims 1-8.