RPA script minimum increment repairing method based on evolutionary swarm intelligence and reinforcement learning
By optimizing the RPA script update method through evolutionary swarm intelligence and reinforcement learning, the problems of accidental deletion, missed changes, and high manual intervention in regulatory updates in existing technologies are solved, and near-real-time difference capture and low-risk grayscale release are achieved, ensuring business continuity and traceability.
Patent Information
- Application Number
- CN202510881360.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-17
AI Technical Summary
Existing RPA script update methods have difficulty achieving fine-grained, traceable, low-risk evolution when faced with heterogeneous regulations, and are also difficult to achieve minimal intrusion and second-level grayscale release in high-concurrency scenarios. There is a risk of accidental deletion, missed changes, and high manual intervention.
Adopting a method based on evolutionary swarm intelligence and reinforcement learning, through layout vector denoising, rule coverage locking genetic coding and local-global dual-stream reinforcement learning, we can achieve quasi-real-time difference capture of heterogeneous regulations and precise positioning of business decision chains, thereby optimizing the script update process.
It achieves quasi-real-time difference capture of heterogeneous regulations and precise positioning of business decision chains, reduces the need for manual intervention, reduces the amount of node changes, and ensures business continuity and traceability.
Smart Images

Figure CN120803507A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of RPA process automation, in particular to an RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning. BACKGROUND
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] In the daily business of enterprise multi-department cooperation, the regulations are frequently updated and the sources are in various formats (web pages, PDFs, and scanned documents coexist), and the automation script not only needs to quickly perceive the differences between new and old clauses, but also needs to complete online updates without interrupting service.
[0004] However, the actual system usually uses two methods, "keyword / regular search combined with manual comparison" or "overall diff followed by whole section rollback". In these two methods, the former is extremely sensitive to cross-page layout noise and minor changes in clauses, and the phenomenon of accidental deletion and missed changes is common. The latter can maintain consistency, but often triggers large-scale redeployment, making it difficult to meet the requirements of "minimum intrusion and second-level gray" in high-concurrency scenarios. Existing algorithms mainly rely on static thresholds or hard-coded rules to determine the difference extraction and script replacement window, and lack explicit modeling of the intermediate layer "regulation difference -> business decision chain". When multiple versions of regulations are parallel for a long time, it is difficult for the fixed threshold to accurately distinguish the boundary between "must be replaced immediately" and "delayed compatible", resulting in either early coverage of old logic and functional drift, or delayed update and compliance risk. At the same time, script evaluation mainly uses single scoring or Monte Carlo search, which cannot achieve dynamic balance between "hit new rules" and "preserve old version availability".
[0005] In summary, the existing system or algorithm still has the following technical problems: 1) The existing method still has deficiencies in layout noise suppression, key rule complete coverage, and patch optimization mechanism, making it difficult to achieve fine-grained, traceable, and low-risk evolution of business scripts; 2) The existing method is difficult to automatically roll back to the anchor version when encountering exceptions, making the business lose continuity and traceability, significantly increasing the need for human intervention and downtime risk; 3) The existing single scoring or Monte Carlo search calculation process is redundant, the calculation convergence process is complex, and it is difficult to achieve dynamic balance between "hit new rules" and "preserve old version availability", making it difficult to achieve the dual goals of "hit new rules" and "minimum change", and the actual measurement shows that the node change is large and the calculation process is complex under the same coverage. SUMMARY
[0006] The present disclosure proposes an RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning to solve the above problems, which realizes quasi-real-time difference capture of heterogeneous regulations, accurate positioning of business decision chains and low-risk gray release through layout vector denoising, rule coverage lock genetic coding and local-global double-flow reinforcement learning optimization.
[0007] According to some embodiments, the present disclosure adopts the technical scheme as follows: The RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning comprises: An event containing an official document number and a publication timestamp meeting preset conditions is obtained, preprocessed to obtain a filtered document, and parsed and serialized to generate a rule JSON set; The condition keys of the rule JSON set are parsed and mapped to a script abstract syntax tree, and a decision chain is extracted; Rule coverage vector lock coding is performed on the decision chain, a candidate individual is generated according to a structure influence factor to set a variation probability, structure similar individuals are crossed, and syntax, variable and interface permission verification are sequentially completed to obtain an initial patch candidate group with complete coverage; The initial patch script is converted into a chain graph and input into a local-global double-flow reinforcement network for script optimization, and an optimized patch candidate with a composite score is output, sorted according to the composite score and the number of node changes, and an advantageous spectrum is selected to perform controlled micro-mutation and block crossing to obtain a final patch script meeting a convergence condition; The final patch script is subjected to full regression testing, and after testing, it is deployed and the operation log is archived.
[0008] According to some embodiments, the present disclosure adopts the technical scheme as follows: A computer program product comprising a computer program, which, when executed by a processor, implements the RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning.
[0009] According to some embodiments, the present disclosure adopts the technical scheme as follows: A non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implements the RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning.
[0010] According to some embodiments, the present disclosure adopts the technical scheme as follows: An electronic device comprises a processor, a memory and a computer program; wherein the processor is connected with the memory, and the computer program is stored in the memory; when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning.
[0011] Compared with the prior art, the beneficial effects of the present disclosure are: The RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning of the present disclosure realizes quasi-real-time difference capture, accurate positioning of business decision chains and low-risk gray release of heterogeneous regulations through layout vector denoising, rule coverage lock genetic coding and local-global double-flow reinforcement optimization, thereby solving the technical defects that existing artificial threshold judgment is prone to missing changes and the whole section rollback change is too large.
[0012] The RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning of the present disclosure obtains a filtered document after preprocessing, proposes a layout denoising mechanism of page-block-word three-layer vector mapping, and can eliminate header and footer and cross-page layout noise at one time, thereby providing structured and coherent text input for dependency parsing. Compared with the method based on OCR-post rule filtering, the syntax completeness rate is improved, and the omission or misdisassembly of clauses caused by format differences is avoided.
[0013] The RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning of the present disclosure performs rule coverage vector lock coding on the decision chain, adopts a genetic coding mode combining rule coverage vector lock and structure distance adaptive mutation, ensures that the key conditions of new regulations are always retained in the evolution process, and simultaneously concentrates the mutation on low-impact nodes through exponential decay, thereby realizing the double goals of "hitting new rules" and "minimum change"; in actual measurement, the node change amount is reduced under the same coverage.
[0014] The RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning of the present disclosure converts the initial patch script into a chain graph and inputs it into a local-global double-flow reinforcement network for script optimization, constructs a local coverage-global compatibility double-flow reinforcement learning model, minimizes node disturbance and improves rule hit in the local flow, dynamically evaluates the compatibility of the old version and predicts the deployment time in the global flow, and adaptively weights the rewards of the two flows, so that the patch with high confidence can be converged within a limited number of iterations, and the number of convergence steps is reduced compared with single scoring or Monte Carlo search.
[0015] The RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning of the present disclosure realizes the minimum invasion of the patch through gray release and three-dimensional safety belt judgment; when an abnormality occurs, it can automatically roll back to the anchor point version, ensuring business continuity and traceability, and significantly reducing the demand for manual intervention and downtime risk. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which constitute a part of the present disclosure, are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation to the present disclosure.
[0017] Figure 1 This is a flow chart of the RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning according to an embodiment of the present disclosure; Figure 2 A schematic diagram of a script decision chain extraction according to an embodiment of the present disclosure; Figure 3 Schematic diagram of pedigree evolution and convergence of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.
[0019] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure belongs.
[0020] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0021] Explanation of terms "Hitting the new regulations" means that during the genetic encoding phase, the bits in the rule coverage vector corresponding to the new regulations are completely locked as read-only. Regardless of subsequent mutations or crossovers, these bits remain "1" and remain unchanged. This ensures that every patch evolution accurately "hit" the conditional judgments and business branches defined by the new regulations, ensuring that the script will cover the new regulatory elements when it is run.
[0022] The "minimal modification" strategy is based on a structural distance adaptive mutation strategy. This strategy sets the mutation probability based on the structural distance of each node from the original script, and uses exponential decay to focus the majority of mutations on low-impact nodes with minimal business impact. In other words, while ensuring compliance with the new regulations, script modifications such as adding or removing nodes, adjusting thresholds, or rerouting APIs are kept to a minimum, minimizing intrusion into the original process.
[0023] Example 1 In one embodiment of the present disclosure, an RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning is provided, comprising: Step one: obtain events containing official document numbers and meeting preset conditions for publication time stamps, preprocess them to obtain filtered documents, parse and serialize the filtered documents to generate a rule JSON set; Step two: parse and map the condition keys of the rule JSON set to the script abstract syntax tree, and extract the decision chain; Step three: perform rule coverage vector locking coding on the decision chain, generate candidate individuals according to the structure influence factor to set the mutation probability, cross the structure similar individuals, and sequentially complete the syntax, variable and interface permission verification to obtain an initial patch candidate group with complete coverage; Step four: convert the initial patch script into a chain graph and input it into a local-global double-flow reinforcement network for script optimization, output an optimized patch candidate with a composite score, sort according to the composite score and the number of node changes, select the dominant lineage to perform controlled micro-mutation and block crossover, and obtain the final patch script that meets the convergence condition; Step five: perform full regression testing on the final patch script, and after passing the test, deploy and archive the operation log.
[0024] As an embodiment, the RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning of the present disclosure realizes quasi-real-time difference capture of heterogeneous regulations, accurate positioning of business decision chains and low-risk gray release through layout vector denoising, rule coverage locking genetic coding and local-global double-flow reinforcement optimization. Taking the regulation event script repair as an example, the specific implementation process is as follows: Step 1: Obtain regulations containing official document numbers and meeting preset conditions for publication time stamps, preprocess them to obtain filtered documents, parse and serialize the filtered documents to generate a rule JSON set, including: background listening to regulations containing official document numbers and meeting preset conditions for publication time stamps, for each event in the regulation, calling a batch crawling module to download the corresponding HTML page, PDF original text and appendix, forming an original document set, then performing header and footer noise removal on each page based on the layout cutting template to obtain a filtered document set, and comparing with the historical document version to retain the inconsistent segments, generating subject-predicate-object triples based on dependency parsing, and serializing to form a rule JSON set with confidence.
[0025] Specifically, step 11: background deployment of event listener, establishing a unified listening channel for the data platform; when and only when the captured event contains an official document number and the publication time stamp meets , the corresponding event is written to the strategy event queue .
[0026] Step 12: Call the batch crawling module to download the corresponding HTML page, PDF original text and attached table for each event in the policy event queue . .
[0027] The preprocessing process includes: based on the layout cutting template, perform header and footer removal on each page to obtain the filtered set .
[0028] The removal filtering process satisfies the following matrix mapping relationship:
[0029] wherein, is the total number of pages, is the number of blocks cut from the th page, is the word vector of the th block of the th page, is the block label (0 for main text, 1 for header and footer), represents the cross-page splicing operation, is the spliced and purified main text vector sequence.
[0030] Through matrix mapping, redundant layout information is suppressed at the vector level at one time, reducing the interference of subsequent syntax extraction.
[0031] Step 13: Perform historical regulation difference comparison, call local regulation version cache , and map each clause number to one by one, compare the hash digest values; only keep the newly added, modified and abolished segments with inconsistent hash values, and construct the difference set .
[0032] Step 14: Progressive traversal and dependency syntax extraction, for , perform deep traversal according to clause→clause→item in turn, use dependency phrase extraction rules to parse sentence by sentence, lock sentence elements containing numerical values, intervals or conditional predicates, and label the subject, object and limiting words with semantic labels, and generate triples .
[0033] Step 15: Call the business dictionary to map the labels in the triples to script recognizable elements: the subject is mapped to the conditional branch key , the predicate is mapped to the logical symbol , and the object is mapped to the parameter boundary value , and the trigger relationship is recorded synchronously . The mapping result is consistent with the subsequent RPA script semantic tree at the structure level, ensuring direct insertion.
[0034] Step 16: Follow the Fields Assemble JSON objects based on version numbers Complete serialization and obtain a traceable set of change rules .
[0035] Step 17: Confidence conflict review, to ensure the quality of extraction, for the traceable change rule set Each rule in Calculate extraction confidence :
[0036] in, For rules The number of sentence elements involved; For sentence element With dictionary Semantic similarity of is the semantic weight index; For sentence element The width of the standardized confidence interval for the midpoint value boundary; is the canonical equilibrium constant; For sentence element The layout confidence decay factor. Or when there is a key conflict, the rule Mark as requiring human review and enter into the manual review pool .
[0037] After manual confirmation, the results are synchronously written back to the local regulation version cache and traceable change rule sets (JSON set).
[0038] Step 2: Parse and map the condition keys of the rule JSON set, map them to the script abstract syntax tree, and extract the decision chain, including: parsing the condition keys of the rule JSON set, mapping them to the variable names and interface control IDs in the script AST based on the mapping table, generating the first set of affected nodes, backtracking the condition judgment anchor points, taking each node in the affected node set as the starting point, performing a single-source reverse search in the CFG to the nearest branch instruction, constructing an anchor point set for all starting point-branch pairs, forward aggregating action nodes and closing the loop to expand the check nodes to form a decision chain, and calculating the priority weight based on the topological depth and call frequency.
[0039] Specifically, step 21: Parse the traceable change rule set (JSON set) All conditional branch keys , based on the mapping table Will Map variable names in the script AST to interface control IDs, generating the first set of affected nodes Also record the rule ID, modification type, and effective date for each node, forming a node list with time-limited metadata.
[0040] Step 22: Condition judgment anchor point reverse trace, with the set of affected nodes Each node As a starting point, perform a single-source reverse search in CFG to the nearest branch instruction set . For all starting point-branch pairs, construct an anchor point set , satisfying:
[0041] Where, Represents the shortest edge number from to on CFG. Anchor point Explicitly indicates the starting instruction of the condition judgment segment, ensuring that the pruning does not deviate from the business branch semantics.
[0042] Step 23: Action execution segment forward aggregation, with anchor point As a starting point, traverse the business instructions along the main line of CFG in sequence, and stop immediately when encountering a verification node. The continuous action instructions collected during the traversal process are merged into an action execution segment . By limiting the stopping condition, ensure that the action execution segment Corresponds to a single business intent in logic, facilitating subsequent independent evolution.
[0043] Step 24: Result verification segment closed loop extension, continue scanning backward along the main line, starting from the end instruction of the action execution segment Until encountering the result verification node or exception capture node set End. The range is defined as the result verification segment , ensuring that each decision chain has an observable closed loop.
[0044] Step 25: For the same anchor point, concatenate the action execution segment With the result verification segment , and encapsulate the starting branch To get the complete decision chain . At the same time, extract the entry variable set , exit variable set And the API identifier set called , write into the chain-level metadata field in key-value mode, laying the foundation for traceable debugging.
[0045] Step 26: Analyze the calendar annotations, timing triggers, and loop scheduling instructions inside the script, and Append time window label And count the historical running frequency .
[0046] Step 27: Based on the entire decision chain set Construct a data dependency graph and set its adjacency matrix to be ,in Representation Chain Output variables and links There is a direct dependency on the input variables of . To ensure the sequential controllability of the search process, Calculating priority weights :
[0047] in, For chain The topological depth of The normalized value of its call frequency, is the depth-frequency trade-off coefficient. Sorting from large to small can get an ordered sequence of candidate segments And output.
[0048] Step 3: Execute rule coverage vector lock encoding on the decision chain, set the mutation probability based on the structural influence factor to generate candidate individuals, crossover structurally similar individuals, and sequentially complete syntax, variable, and interface permission verification to obtain a complete initial patch candidate population. This includes: reading each decision chain in turn, mapping the decision chain sequence encoding into gene strings, corresponding to the condition node, action sequence, and verification node segments respectively, forming a seed gene set, performing a replication on each gene string in the seed gene set to generate candidate individuals; selecting individual pairs with structural similarity above a threshold, performing single-point or double-point crossover only between sets of homologous nodes, and immediately calling the dependency replayer after crossover to rebuild the variable reference table and API call sequence, and appending the crossover results to the temporary population; executing script syntax parsing, variable binding verification, and interface permission checking on each new individual in the temporary population in sequence. Any failure in any step will be eliminated, and rule matching will be called. The coverage vector is recalculated for all individuals in the retained population after elimination, and a unique identifier is generated for each retained individual. Its mutation trajectory, crossover source, and final structural complexity are recorded, and a risk label based on coverage depth and call permission is calculated. The initial patch candidate population is then generated.
[0049] Specifically, step 31: read the ordered candidate segment sequence in sequence Each decision chain in , its conditional node set and Condition key collection Completely match the key value to get the covered Boolean vector ,in Representing a decision chain Rules hit The coverage vector will serve as a reference for subsequent global lock bits, establishing a baseline for enforcing retention of changed features.
[0050] Step 32: Decision Chain Sequential mapping to gene strings , corresponding to the condition node, action sequence, and check node. According to the covering Boolean vector The "1" bit in the gene string Marked as read-only lock, prohibiting any subsequent structural changes. The encoding result forms the seed gene set .
[0051] Step 33: Seed Gene Set Each gene string Perform a replication and generate candidate individuals . For its unlocked position Structural Impact Factor Calculate bit-by-bit mutation probability , and randomly take specific actions such as adding or deleting checkpoints, refining thresholds, or reordering APIs based on the probability. The mutation probability formula is as follows:
[0052] in, is the global robustness coefficient, for The normalized value of the structural distance from the original script. Exponential decay ensures that mutations are concentrated on low-impact nodes, introducing sufficient structural differences while maintaining business semantics.
[0053] Step 34: Select the structures with similarity higher than the threshold Individual pairs , only perform single-point or double-point crossover between sets of nodes of the same type, and immediately call the dependency replayer to rebuild the variable reference table and API call sequence after the crossover to avoid script failure caused by variable drift. The crossover results are added to the temporary group .
[0054] Step 35: Temporary Group Each new individual Script syntax parsing, variable binding verification and interface permission detection are executed in sequence. If any step fails, the script will be eliminated. With the current reserved groups Comparison:
[0055] in, for Only when Joined , in order to maintain population diversity and control the overall size.
[0056] Step 36: Call rule matching to retain the group All individuals in recalculate the coverage vector; if a rule key is found In the individual If there is a missing condition in the policy, the corresponding condition node will be automatically backfilled and the action sequence boundary will be adjusted synchronously; individuals that still cannot be fully covered will be eliminated immediately to ensure that every script in the population fully responds to the new policy.
[0057] Step 37: Generate a unique identifier for the retained individual , record its mutation trajectory, cross-source and final structural complexity , calculate risk labels based on coverage depth and call permissions , and generate the initial patch candidate group file . After verification, the files are directly handed over to the subsequent stage.
[0058] Step 4: Convert the initial patch script into a chain graph and input it into the local-global dual-stream reinforcement network for script optimization, outputting optimized patch candidates with composite scores. This process includes: reading the patch script, expanding the node set in decision chain order and adding two types of directed edges, encapsulating the triples into a thought chain graph and caching it in the video memory area, feeding the thought chain graph into the graph message passing layer of the local optimization flow, performing round-robin aggregation to obtain a node semantic vector matrix, and inputting the node semantic vector matrix into the local policy network. The first change site is selected, and then one of three actions is given: inserting a check node, threshold refinement, or API reordering. In the global flow, legacy compatibility is evaluated and deployment time is predicted, outputting optimized candidates with composite scores.
[0059] Specifically, step 41: read the patch script , expand the node set in the order of the decision chain And add two types of directed edges: variable dependent edge sets and interface call edge set . The triple Unified packaging as a thought chain diagram It is cached in the video memory area for dual-stream network sharing.
[0060] Step 42: Create a mind map Feed into the graph message passing layer of the local optimization flow, loop Round aggregation to obtain the node semantic vector matrix The matrix provides contextual information for subsequent positioning fine-tuning sites while being multiplexed in the global compatibility stream.
[0061] Step 43: Local policy network takes the node semantic vector matrix as input, selects the first change site , and then gives one of the three actions of inserting a check node, threshold refinement, or API rearrangement, rewriting the patch script in real time and writing a difference snapshot .
[0062] Step 44: Call the coverage evaluator to calculate the rule coverage vector of the rewritten script and the number of changed nodes . Let be the global rule Boolean vector, the total number of nodes be , and the local immediate reward be:
[0063] where is the penalty coefficient for structural disturbance, represents the number of new rules hit. The reward is immediately returned to the local policy network to drive the parameters to iterate, so that the local changes both fully cover the policy and remain lightweight.
[0064] Step 45: Input the fine-tuned script into the global compatibility stream, chain backtracking the old version stream , calculate the compatibility score and the predicted deployment length . The compatibility score is measured based on interface consistency, data caliber consistency, and log completion rate, and the deployment length is inferred based on the pipeline compilation-release time consumption model.
[0065] Step 46: Global policy network compares the indicators with the set threshold to determine whether to retain the local changes; if rolled back, it cancels and records the failure trajectory; if retained, it writes into the global reward pool and synchronously updates the parameters .
[0066] Step 47: Composite score generation and output, to the end of the loop, take the local stream cumulative discounted reward and the global indicators to calculate the composite score of the patch script:
[0067] where is the time discount factor, is the number of local flow decision steps, is the local-global weight. After the calculation is completed, write , decision trajectories and risk labels to form a candidate list with scores The list is checked for consistency and then output to the next stage.
[0068] Step 5: Sort by composite score and number of node changes, select the dominant lineage, perform controlled micromutation and block crossover, maintain population diversity through semantic consistency check, end the iteration after meeting the convergence conditions, and obtain the final patch script after meeting the convergence conditions; Specifically, step 51: First press composite score Sort the list in descending order . Take the front Bar composition set In this set, count the number of modified nodes Before ascending selection , forming a dominant lineage index set The sorting-screening process is described as follows:
[0069] Simultaneously ensure dual priority of high scores and low changes.
[0070] Step 52: Target Each script , create a read-only snapshot . Scan the script to extract key variable sets , key interface collection , and keep the risk label The three are combined into a whitelist , subsequent evolutions must not delete or change the types of the elements.
[0071] Step 53: For each snapshot Perform a controlled copy to generate a writable copy . Sample random seed vector when copying ,Will By mapping function Applied to the attributes of non-whitelisted nodes to achieve initial perturbation:
[0072] Low amplitude noise ensures that subsequent mutation paths are diverse and compatible substrates are not destroyed.
[0073] Step 54: Each non-whitelisted node The three types of micro-mutation operations are tried in sequence : Fine-grained conditional rewriting , standby API switching , check order fine-tuning . Let the node risk weight , mutation trigger probability
[0074] Where represents . Invoke the semantic consistency checker immediately after each execution , and if the check fails, roll back and set .
[0075] Step 55: Optionally two copies from the same pedigree that pass the S54 check , According to the node type matching matrix , define the exchangeable block set . Perform single-point crossover by block granularity to obtain a new script , and then immediately run the variable dependency backtracker . If detects a reference dangling, undo this crossover and keep the original script to ensure the feasibility of deployment.
[0076] Step 56: Collect all valid scripts generated in steps 54-55 into a temporary population , calculate the script structure hash and remove duplicates according to . Regenerate the rule coverage vector and risk label for each unique script. If , then fill in the top scripts with the original scripts of the dominant pedigree to ensure overall quality and size.
[0077] Step 57: Calculate the best composite score and the average composite score . Let the corresponding indicators of the previous generation be , . If the following conditions are met:
[0078] Convergence is recognized, evolution is stopped, and is pushed to step S6; otherwise, set , carry and return to step S4 for iteration.
[0079] Step 6: Full regression test on final patch script, deploy and archive run logs after passing test, including: full regression test on patch script obtained by convergence, calculate pass rate and rule coverage gain, generate execution package with minimum node change, complete digital signature and generate rollback script.
[0080] Specifically, step 61: read all records in , arrange in ascending order of change node count to generate sequence . The sorting function is defined as:
[0081] Output index sequence Explicit minimum intrusion priority to provide a definite order for subsequent full test.
[0082] Step 62: sequentially load pointed script , call complete coverage regression test case set , record test matrix in real time . Calculate the pass rate of the first script:
[0083] Wherein, indicates that the use case passes, the closer to 1, the higher the overall quality.
[0084] Step 63: generate a qualified index set . Only keep entries in , immediately eliminate the rest, and ensure that all subsequent candidates are zero defects.
[0085] Step 64: set the old version baseline coverage vector to , calculate the gain for each qualified script , where is a column vector of all 1s; indicates a positive supplement to the new rule. According to and risk label, generate risk-reward pair and write back to the candidate entry.
[0086] Step 65: if , directly output the script; if , perform multi-objective optimization: Take the maximum value to form the set ; if ,exist Press again Select the first entry in ascending order to get the final index The final patch script is recorded as .
[0087] Step 66: Right Generate an executable package , based on the private key Calculating digital signatures ,in is a hash function, Used for integrity verification after going online. At the same time, it automatically generates a rollback instruction script and checklist , the three are packaged together into a secure container image.
[0088] Step 67: Push to continuous release queue and through the operation and maintenance channel Trigger the grayscale strategy. Synchronize the object Passes on to the next process, where the deployment phase takes over.
[0089] At this point, the patch script, which is minimally invasive and has completely passed both new and old tests, has been finalized and signed for release.
[0090] Step 7: Calculate the instrumentation cost on the main process abstract syntax tree and embed the execution package, compile the sandbox image and perform grayscale release according to the three-dimensional safety belt. After the indicators are qualified, solidify it into a formal image and archive the operation log.
[0091] Specifically, step 71: receiving , respectively generate the main process abstract syntax tree Abstract syntax tree with patches . For the main process node set Calculate the instrumentation cost:
[0092] in is the node semantic vector mapping, When the node type matches, get the minimum cost node Then derive an isolated branch in the version control system .
[0093] Step 72: Call the fusion function Embed the patch , then based on the node path signature Generate an anchor hash with the script content:
[0094] After completing the syntax check, start automatic compilation and output the sandbox image .
[0095] Step 73: Using Production Data Snapshot deploy , execute regression use case set With stress script set . Assume the number of test discrete sampling points is , record three types of indicators in real time and calculate the mean vector:
[0096] in They are function coverage, P99 latency and memory usage respectively.
[0097] Step 74: Seat belt determination and grayscale image generation. Suppose a three-dimensional seat belt interval matrix:
[0098] If satisfied Mirror Assign a "grayscale-capable" label and solidify it into a grayscale image ; otherwise roll back to the anchor point And send the abnormal report back to S6.
[0099] Step 75: Deployed in 1% traffic grayscale pool , count the number of sampling points within a five-minute window , construct a comprehensive indicator:
[0100] in is the delay, error rate, and memory fluctuation sampling sequence, is the weight vector. Then enter the next gear to increase the volume, otherwise terminate the grayscale immediately and roll back.
[0101] Step 76: Divide the volume and solidify the image, according to the volume function:
[0102] Increase traffic step by step and continue to monitor according to the formula .when and When the grayscale image is solidified into a formal image And synchronize monitoring rules.
[0103] Step 77: Generate a Go-Live Report , archive compilation logs, run logs and monitoring snapshots; update rollback scripts Validity period , complete this round of minimum update patch deployment.
[0104] Embodiment 2 In an embodiment of the present disclosure, an RPA script minimum incremental repair system based on evolutionary swarm intelligence and reinforcement learning is provided, comprising: An event acquisition module is configured to acquire events containing official document numbers and having timestamps meeting preset conditions, preprocess the events to obtain filtered documents, and parse and serialize the filtered documents to generate a rule JSON set; An initialization module is configured to parse and map condition keys of the rule JSON set to a script abstract syntax tree, and extract a decision chain; An evolutionary initialization module is configured to perform rule coverage vector locking encoding on the decision chain, generate candidate individuals according to a structure influence factor to set a mutation probability, cross structure similar individuals, and sequentially complete syntax, variable, and interface permission verification to obtain an initial patch candidate group with complete coverage; An evolutionary module is configured to convert the initial patch script into a chain graph, input the chain graph into a local-global double-flow reinforcement network for script optimization, output an optimized patch candidate with a composite score, sort the optimized patch candidate according to the composite score and the number of node changes, select a dominant lineage to perform controlled micro-mutation and block crossover, and obtain a final patch script meeting a convergence condition; A deployment module is configured to perform full regression testing on the final patch script, deploy the final patch script after passing the testing, and archive running logs.
[0105] Embodiment 3 In an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning.
[0106] Embodiment 4 In an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, which, when executed, implements the RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning.
[0107] Embodiment 5 In an embodiment of the present disclosure, an electronic device is provided, comprising a processor, a memory, and a computer program; the processor is connected with the memory, and the computer program is stored in the memory; when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device implements the RPA script minimum incremental repair method based on evolutionary swarm intelligence and reinforcement learning.
[0108] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0109] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0110] Although the present disclosure has been described with reference to the embodiments thereof, it is apparent that a variety of modifications or changes can be made thereto without departing from the scope of the present disclosure.
Claims
1. The RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning is characterized by: include: Obtain events containing official document numbers and whose release timestamps meet preset conditions, preprocess them to obtain filter documents, parse and serialize the filter documents to generate a rule JSON set; Parse and map the condition keys of the rule JSON set to the script abstract syntax tree and extract the decision chain; The decision chain is executed with rule coverage vector lock encoding, and candidate individuals are generated based on the mutation probability set according to the structural impact factor. Individuals with similar structures are crossed and syntax, variable and interface permission verification is completed in sequence to obtain a complete initial patch candidate group. The initial patch script is converted into a chain graph and input into the local-global dual-stream reinforcement network for script optimization. The optimized patch candidates with composite scores are output and sorted according to the composite score and the number of node changes. The dominant lineage is selected to perform controlled micro-mutation and block crossover to obtain the final patch script after meeting the convergence conditions. Perform full regression testing on the final patch script, deploy it after passing the test, and archive the operation log.
2. The RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning according to claim 1 is characterized in that: An event listener is deployed in the background, and a unified listening channel is established for the data platform to listen for events that contain official document numbers and whose release timestamps meet the preset conditions. If and only if an event containing an official document number and whose release timestamp is satisfied is captured, the corresponding event will be written into the strategy event queue. For each event, the batch crawling module is called to synchronously download the corresponding HTML page, PDF original text and appendix to form an original document collection. Subsequently, based on the layout segmentation template, header and footer noise is removed for each page to obtain a filtered document collection. The document collection is then compared with the historical document version to retain hash-inconsistent fragments. After dependency parsing, a subject-predicate-object triple is generated, which is serialized to form a rule JSON set with confidence.
3. The RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning as claimed in claim 1 is characterized in that: The condition keys of the rule JSON set are parsed and mapped to variable names and interface control IDs in the script AST based on a mapping table. The first set of affected nodes is generated. The condition judgment anchor is backtracked, and each node in the affected node set is used as a starting point. A single-source reverse search is performed in the CFG to the nearest branch instruction. An anchor set is constructed for all starting point-branch pairs. Action nodes are forward aggregated and verification nodes are closed-loop expanded to form a decision chain. Priority weights based on topological depth and call frequency are calculated.
4. The RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning according to claim 1 is characterized in that: Each decision chain is read in turn, and the decision chain sequence is mapped into a gene string, corresponding to the condition node, action sequence, and verification node segments respectively. The encoding result forms a seed gene set, and each gene string in the seed gene set is replicated once to generate candidate individuals; individual pairs with structural similarity higher than the threshold are selected, and single-point or double-point crossover is performed only between the same-type node sets. Immediately after the crossover, the dependency replayer is called to reconstruct the variable reference table and API call sequence, and the crossover result is appended to the temporary population.
5. The RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning as claimed in claim 4 is characterized in that: Script syntax parsing, variable binding verification, and interface permission detection are performed sequentially for each new individual in the temporary population. If any step fails, it will be eliminated, and rule matching is called. The coverage vector is recalculated for all individuals in the retained population after elimination, and a unique identifier is generated for the retained individual. Its mutation trajectory, cross-source, and final structural complexity are recorded, and risk labels based on coverage depth and call permissions are calculated. The initial patch candidate population is then generated.
6. The RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning according to claim 1 is characterized in that: Read the patch script, expand the node set in the order of the decision chain and add two types of directed edges, encapsulate the triples into a thought chain graph and cache it in the video memory area, send the thought chain graph to the graph message passing layer of the local optimization flow, perform cyclic aggregation, obtain the node semantic vector matrix, input the node semantic vector matrix into the local policy network, select the first change site, and then give one of the three actions of inserting a check node, threshold refinement or API rearrangement, rewrite and write the difference snapshot in real time, call the coverage evaluator to count the rule coverage vector and the number of changed nodes of the rewritten script, obtain the fine-tuning script, input the fine-tuning script into the global compatibility flow, chain back to the old version process, calculate the compatibility score and predict the deployment time.
7. The RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning according to claim 1 is characterized in that: Perform full regression testing on the final patch script, calculate the pass rate and rule coverage gain, select the best execution package with the smallest node changes, complete the digital signature, and generate a rollback script; The instrumentation cost is calculated on the abstract syntax tree of the main process and embedded into the execution package. The sandbox image is compiled and grayscale released according to the three-dimensional safety belt. After the indicators are qualified, it is solidified into a formal image and the operation log is archived.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning as described in any one of claims 1 to 6 is implemented.
10. An electronic device, characterized in that: include: A processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the RPA script minimum incremental patching method based on evolutionary swarm intelligence and reinforcement learning as described in any one of claims 1-6.
Citation Information
Cited By
Multi-platform data distribution method and system based on dynamic mapping
CN121000781A