RPA process automation generation method based on large model and self-customized requirement template

CN117648093BActive Publication Date: 2026-10-13JIANGSU HONGXIN SYST INTEGRATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311830148.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2026-10-13
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

[0010]本发明针对现有技术中的不足,提供一种基于大模型和自定制需求模板的RPA流程自动化生成方法,以解决现有RPA组件化自动生成过程中所存在的组件操作流程图生成不准确、适用范围狭窄、难以产生高匹配的RPA组件执行代码的问题

Benefits of technology

本发明利用文档解析大模型对文档中具体的操作步骤进行解析与整合,同时使用内容校验规则对于需求文档中的内容点进行校验,使生成的RPA需求操作流程图更准确,鲁棒性更好,使用范围更广。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117648093B_ABST
    Figure CN117648093B_ABST
Patent Text Reader

Abstract

The application discloses an RPA process automatic generation method based on a large model and a self-customized demand template, and comprises the following steps: training a document analysis large model and a code generation large model based on a man-machine collaborative labeling mode; then, generating a self-customized demand template by using the trained document analysis large model; generating RPA code based on the self-customized demand template and the trained code generation large model; and finally, compiling the generated code by using an RPA designer based on the generated RPA code, so as to realize automatic generation of a component group. The application effectively utilizes the large model, solves the problems in the existing RPA component automatic generation process, such as inaccurate generation of a component operation flowchart, narrow application range, difficulty in generating high-matching RPA component execution code and the like, and effectively reduces human workload.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to an RPA process automation generation method based on a large model and a customizable requirement template. Background Technology

[0002] With the advent of the digital age, RPA (Robotic Process Automation) technology has been widely applied across various industries, greatly improving the business processing speed of enterprises. However, RPA has limitations in that it requires manually defined automated operation rules and cannot handle complex or unstructured data.

[0003] In recent years, AIGC (Artificial Intelligence Generated Content) has revolutionized the industry's understanding of AI (Artificial Intelligence). AIGC can effectively construct requirement flowcharts from uploaded documents and automatically generate relevant instruction code based on the flowcharts. Therefore, integrating large-scale models with RPA robots has become a mainstream research direction for research institutions and enterprises, effectively helping RPA robots handle more complex tasks.

[0004] Currently, solutions using AI+RPA robots to solve similar problems include:

[0005] Solution 1: The requirement document is converted into a process block dictionary by using the BERT-base model (BERT-base: Bidirectional Encoder Representations from Transformers-base). AllenNLP is then used to process the process block dictionary blocks and merge the logical relationships to generate the required operation flowchart. Finally, a third-party tool is used to convert the generated flowchart into code.

[0006] Option 2: By statistically analyzing the usage relationships of various functional components in business scenarios, the transition probability from each functional component to other components is obtained. Based on the transition probability, component recommendations are made for each step of the RPA process, thereby achieving process automation.

[0007] However, the above solution has the following problems: Question 1: First, Solution 1 mainly uses the BERT model to convert the content of the requirement document into dictionary blocks. This method of generating dictionary blocks based solely on the semantic characteristics of the model can easily lead to the loss of core process steps and the addition of irrelevant content in the dictionary blocks, which in turn causes errors in the subsequent component operation flowcharts. Second, the corresponding flowchart execution code generated by third-party software cannot be well adapted to the RPA robot and is prone to execution anomalies.

[0008] Question 2: In Solution 2, the next component is recommended for each step of the RPA process by constructing a component transition probability model, thereby achieving process automation. This method is theoretically feasible, but it is only applicable to simple RPA scenarios with single steps. To apply it to complex RPA projects, a large amount of process and relationship data is needed to train the probability model, resulting in high time and manpower costs. Secondly, for common RPA list components, simply relying on probability recommendations will cause problems. For example, clicking the employee type list button, which includes three options—developers, project managers, and logistics personnel—represents an equal probability for the probability model, making accurate recommendations impossible. Finally, Solution 2 only recommends components without automatically generating RPA code for component location, meaning the recommended components still require manual location of web page elements. Therefore, this invention has a narrow scope of application and poor practicality.

[0009] Therefore, there is an urgent need for an RPA process automation generation method based on large models and customizable requirement templates to solve the above problems. Summary of the Invention

[0010] This invention addresses the shortcomings of existing technologies by providing an automated RPA process generation method based on a large model and custom requirement templates. This method solves the problems of inaccurate component operation flowchart generation, narrow applicability, and difficulty in generating highly matched RPA component execution code in existing RPA component-based automatic generation processes.

[0011] To achieve the above objectives, the present invention adopts the following technical solution: A method for automating RPA process generation based on a large model and a custom requirement template is characterized by the following steps: training a large document parsing model and a large code generation model using a human-computer collaborative annotation method; then, using the trained document parsing model to generate a custom requirement template; next, generating RPA code based on the custom requirement template and the trained code generation model; finally, compiling the generated RPA code using an RPA designer, thereby achieving automated generation of component groups.

[0012] To optimize the above technical solution, the specific measures also include: Furthermore, the training of the document parsing large model includes the following steps: Step 1.1: Collect requirement documents as the source documents, and manually add corresponding web page links to the parts of the collected requirement documents that involve specific process operations to form the requirement document format. Step 1.2: Randomly select 40% of the requirements document for manual content extraction and tagging to generate a manually annotated dataset. The training set was divided according to a 9:1 ratio. and test set ,in For the total number of data sets, for The document content set, for The set of answer results , These represent the number of training and testing sets, respectively. ; Step 1.3, The document is fed into the large document parsing model for initial fine-tuning. Step 1.4: Use document concatenation and random masking to augment the remaining 60% of the requirement documents, and use OCR algorithms to extract content from the augmented requirement documents. Input the extracted text into a fine-tuned document parsing model for analysis. Using the document content as the question and the document parsing model's answer as the result, generate a machine-labeled dataset. ,in For the total number of data sets, for Document content set, for Response result set; Step 1.5, and Combined to form a new dataset, it is input into the large document parsing model for further fine-tuning; using the test set Test the finely tuned document parsing model. If the model's accuracy reaches 80% or more, the model training is complete, and the final document parsing model is obtained. Otherwise, return to step 1.4 with the current trained model as the latest finely tuned model.

[0013] Furthermore, the training of the large model for code generation includes the following steps: Step 2.1, based on the dataset Chinese answer result set The corresponding process source code is extracted manually using a webpage source code extractor to generate the corresponding source code set. Use the RPA designer to generate the corresponding RPA code set. ;in For index values, the range is... between, , , They represent the first Answer results, webpage source code, RPA code; Step 2.2, with and The integrated content is used as a question set , As the answer result set of a large model This constitutes a large-scale code generation model with manually labeled datasets. Similarly, the training set should be divided in a 9:1 ratio. and test set ; Step 2.3, The code is then fed into the large code generation model for initial fine-tuning. Step 2.4, based on , and Generate large model machine annotation sets for code generation. The construction; Step 2.5, and Combined to form a new dataset, it is input into the large code generation model for further fine-tuning; using the test set Test the fine-tuned large model again. If the large model's accuracy reaches 80% or more, the model training is complete and the final code generation large model is obtained; otherwise, return to step 2.4 with the current trained model as the latest fine-tuned model.

[0014] Furthermore, the basis , and Generate large model machine annotation sets for code generation. The specific steps for constructing it are as follows: Step 2.4.1: Create an empty machine-annotated source code set. ; Step 2.4.2, will Each answer result is related to The similarity of all responses is calculated to obtain a process similarity matrix. The specific calculation results are as follows:

[0015] in, This is a function for calculating process similarity, using the Word2Vec model combined with the cosine similarity algorithm. for transpose, For index values, the range is... between, for The Middle 1 answer result; Step 2.4.3, Positioning Matrix The position with the highest similarity value in each row And based on this location in Search for the corresponding source code in the middle. Then get each row Store in collection middle; Step 2.4.4, with and Integration of content For the question set, fine-tune the code to generate the answers for the large model. For the result set, perform machine-labeled dataset. The construction of.

[0016] Furthermore, the pre-trained document parsing model is used to generate a custom requirement template; then, based on the custom requirement template and the trained code generation model, RPA code is generated. The specific steps are as follows: Step 3.1: Treat the entire content of the custom-designed requirement template as a question and query it to the trained code generation model; Step 3.2: Perform format validation on the RPA code that generates the large model's answer. If the validation requirements are met, proceed to step 3.3; otherwise, return to step 3.1. The format validation rules are as follows: Step 3.2.1: Determine whether the generated RPA code conforms to the syntax requirements of the RPA designer; Step 3.2.2: Determine if the generated RPA code structure is complete; Step 3.3: Submit the code that meets the verification requirements in Step 3.2 into the RPA designer as the final RPA process code.

[0017] Furthermore, the specific steps for the self-customized requirement template are as follows: Step 3.1.1: Obtain the user-uploaded requirement document and use an OCR algorithm to extract the document content; Step 3.1.2: Input the extracted document content into the trained document parsing model for operation process analysis, and output the parsing results of the document parsing model. Step 3.1.3: Perform format validation on the output of Step 3.1.2. The validation rules are as follows: traverse the current output from top to bottom and from left to right, and determine whether each operation step has a corresponding webpage link. If the validation passes, use the current result as the RPA operation flowchart and proceed to Step 3.1.4. Otherwise, inform the user of the validation failure, request modification of the requirements document, and return to Step 3.1.1. Step 3.1.4: Based on the webpage links and operation step descriptions in the RPA operation flowchart, use a webpage source code parser to extract the corresponding webpage source code; Step 3.1.5: Integrate the source code information obtained in Step 3.1.4 with the RPA operation flowchart output in Step 3.1.3 according to the custom requirement template format to generate the final custom requirement template. The generated custom requirement template format is: "Please generate RPA source code based on the following information: the process operation is [content], the web page link involved in the above process is [url], and the reference source code for each process is [code]. The generated source code should meet the compilation requirements of the RPA designer. If it cannot be generated, reply that the source code cannot be generated." In the custom requirement template format, content, url, and code correspond to the flowchart operation steps in Step 3.1.3, the corresponding web page links, and the source code information in Step 3.1.4, respectively.

[0018] Furthermore, based on the webpage links and specific operation step descriptions in the RPA operation flowchart, the corresponding webpage source code is extracted using a webpage source code parser. The specific steps are as follows: Step 3.1.4.1: Use a webpage source code parser to parse the webpage links corresponding to each step of the RPA operation flowchart in sequence, and return the parsed DOM tree; Step 3.1.4.2: Based on the depth-first search rule, the DOM tree is parsed layer by layer, and a source code discrimination function is used to determine whether the webpage source code contained in the tags of this level is the source code required by the current operation process. The specific discrimination function is defined as follows:

[0019] in, This is a function for judging the source code. , These are the hierarchical label text and the current operation process description text, respectively. , They are based on and The structural similarity judgment function and the vector cosine similarity discriminant function This function determines the geometric distance from the current level tag to the top of the DOM tree. Indicates simultaneous occurrence and The number of identical words in the text. This represents text vectorization, using the Word2Vec model to perform word vector conversion. , , , This is a source code function adjustment factor. The set threshold; Step 3.1.4.3: If there is no source code block in the entire DOM tree that satisfies the source code judgment function in step 3.1.4.2, it means that the large model has a parsing error in the requirement document, and return to step 3.1.2; otherwise, select the source code block contained in the level tag that satisfies the judgment condition and has the highest score as the source code required for the current operation process.

[0020] Furthermore, based on the generated RPA code, the RPA designer is used to compile the generated code, thereby achieving automated generation of component groups. The specific steps are as follows: Step 4.1, based on the generated code... <assemblyreference>The tag content automatically loads the relevant project dependencies to ensure that subsequent component code can run in an orderly manner; Step 4.2: After the dependency packages are successfully loaded, the RPA designer performs a visual page layout design based on the WorkflowViewState tag attribute; Step 4.3: Execute sequentially from top to bottom and from left to right. <sequence>All content contained within the tag is used to select components based on the internal tag elements; and the components are configured based on the internal tag attributes. Step 4.4: After execution, lay out the component groups on the visualization page according to the execution results, and save the layout results in .xaml format in the preset local location and inform the user to check and verify them in time.

[0021] Furthermore, a computer-readable storage medium storing a computer program is characterized in that: the computer program enables a computer to execute an RPA process automation generation method based on a large model and a custom requirement template, as described above.

[0022] Furthermore, an electronic device is characterized by comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the RPA process automation generation method based on a large model and a custom requirement template as described above.

[0023] The beneficial effects of this invention are: This invention utilizes a large document parsing model to parse and integrate the specific operation steps in the document, while using content validation rules to validate the content points in the requirement document, making the generated RPA requirement operation flowchart more accurate, more robust, and more widely applicable.

[0024] The self-customized requirement template used in this invention reduces the difficulty of directly outputting grammatically compliant programming languages ​​by providing effective natural language algorithm descriptions and corresponding webpage source code content. At the same time, it effectively improves the reliability and stability of the output code by using self-trained code to generate large models and standardized verification rules. Attached Figure Description

[0025] Figure 1 This is a flowchart illustrating an RPA process automation generation method based on a large model and a customizable requirement template proposed in this invention. Figure 2 This is a schematic diagram of the RPA code generation process of the RPA process automation generation method based on a large model and a custom requirement template proposed in this invention. Figure 3 This is a diagram illustrating the annotation format of a large model dataset for document parsing in an RPA process automation generation method based on a large model and a custom requirement template, as proposed in this invention. Figure 4 This is a diagram illustrating the annotation format of a large model dataset for code generation, based on a large model and a custom-defined requirement template, proposed in this invention for an automated RPA process generation method. Figure 5 This is a diagram showing the result of a custom requirement template for an RPA process automation generation method based on a large model and custom requirement template proposed in this invention. Detailed Implementation

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

[0027] As attached Figure 1 As shown in the figure, an embodiment of the present invention provides an automated RPA process generation method based on a large model and a custom requirement template, comprising the following steps: training a large document parsing model and a large code generation model based on human-computer collaborative annotation; then, using the trained large document parsing model to generate a custom requirement template; next, generating RPA process code based on the custom requirement template and the trained large code generation model; finally, compiling the generated RPA process code using an RPA designer, thereby achieving automated generation of component groups.

[0028] In the above embodiments, the specific annotation structure for training the large-scale document parsing model and the large-scale code generation model based on the human-computer collaborative annotation method is shown in the appendix. Figure 3 With appendix Figure 4 As shown, the information collection and training of the document parsing large model includes the following steps: Step 1.1: Collect a large number of requirement documents as source documents. The document formats include, but are not limited to, PDF, Word, Excel, and MD formats. At the same time, manually add the corresponding web page links to the parts of the collected requirement documents that involve specific process operations to form the requirement document format required by this invention. Step 1.2: Randomly select 40% of the requirements document for manual content extraction and tagging to generate a manually annotated dataset. The specific annotation format is shown in the attached document. Figure 3 As shown; and the training set is divided according to a 9:1 ratio. and test set ,in For the total number of data sets, for The document content set, for The set of answer results , These represent the number of training and testing sets, respectively. ; Step 1.3, The document is fed into the large document parsing model for initial fine-tuning. Step 1.4: Use document concatenation, random masking, and other methods to augment the remaining 60% of the requirement documents, and use OCR algorithms to extract content from the augmented requirement documents. Input the extracted text into a finely tuned document parsing model for analysis. Using the document content as the question and the document parsing model's response as the result, generate a machine-labeled dataset. ,in For the total number of data sets, for Document content set, for Response result set; Step 1.5, and Combined to form a new dataset, it is input into the large document parsing model for further fine-tuning; using the test set Test the finely tuned document parsing model. If the model's accuracy reaches 80% or more, the model training is complete, and the final document parsing model is obtained. Otherwise, return to step 1.4 with the current trained model as the latest finely tuned model.

[0029] In the above embodiments, the information collection and training of the large code generation model includes the following steps: Step 2.1, based on the dataset Chinese answer result set The corresponding process source code is extracted manually using a webpage source code extractor to generate the corresponding source code set. Use the RPA designer to generate the corresponding RPA code set. ;in For index values, the range is... between, , , They represent the first Answer results, webpage source code, RPA code; Step 2.2, with and The integrated content is used as a question set , As the answer result set of a large model This constitutes a large-scale code generation model with manually labeled datasets. The annotation format is as follows: Figure 4 As shown; similarly, the training set is divided according to a 9:1 ratio. and test set ; Step 2.3, The code is then fed into the large code generation model for initial fine-tuning. Step 2.4, based on , and Generate large model machine annotation sets for code generation. The construction; Step 2.5, and Combined to form a new dataset, it is input into the large code generation model for further fine-tuning; using the test set Test the fine-tuned large model again. If the large model's accuracy reaches 80% or more, the model training is complete and the final code generation large model is obtained; otherwise, return to step 2.4 with the current trained model as the latest fine-tuned model.

[0030] Wherein, the basis , and Generate large model machine annotation sets for code generation. The specific steps for constructing it are as follows: Step 2.4.1: Create an empty machine-annotated source code set. ; Step 2.4.2, will Each answer result is related to The similarity of all responses is calculated to obtain a process similarity matrix. The specific calculation results are as follows:

[0031] in, As a process similarity calculation function, this invention uses the Word2Vec model combined with the cosine similarity algorithm to calculate process similarity; for transpose, For index values, the range is... between, for The Middle 1 answer result; Step 2.4.3, Positioning Matrix The position with the highest similarity value in each row And based on this location in Search for the corresponding source code in the middle. Then get each row Store in collection middle; Step 2.4.4, with and Integration of content For the question set, fine-tune the code to generate the answers for the large model. For the result set, perform machine-labeled dataset. The construction of.

[0032] In the above embodiment, let's take the requirement as "The following operations are all performed in the Microsoft Edge browser. Specifically, open the Microsoft Edge browser and access Baidu, enter Baidu Translate in the search bar, click Search, click Multilingual Real-time Online Translation, enter Hello in the input field, and get the translation result." as an example 1.

[0033] The method utilizes a pre-trained document parsing model to generate customized templates, as shown in the attached template. Figure 5 As shown; then, based on the customized requirement template and the trained code generation model, RPA process code is generated, as shown in the attached figure. Figure 2 As shown, the specific steps are as follows: Step 3.1: Treat the entire content of the custom-designed requirement template as a question and query it to the trained code generation model; The specific steps for creating the custom requirement template are as follows: Step 3.1.1: Obtain the user-uploaded requirement document and use an OCR algorithm to extract the document content; Step 3.1.2: Input the extracted document content into the trained document parsing model for operation process analysis, and output the parsing results of the document parsing model. Based on the requirements of Example 1 above, the document parsing model trained by this invention parses the following specific text: (1) Open the Microsoft Edge browser; (2) Enter "Baidu Translate" in the search bar; (3) Click to query; (4) Real-time online translation in multiple languages; (5) Type "Hello" in the input field; (6) Obtain the translation results; Step 3.1.3: Perform format validation on the output of Step 3.1.2. The specific validation rules are as follows: traverse the current output from top to bottom and from left to right, and determine whether each operation step has a corresponding web page link. If the validation passes, use the current result as the RPA operation flowchart and proceed to Step 3.1.4. Otherwise, inform the user of the validation failure, request modification of the requirements document, and return to Step 3.1.1. Step 3.1.4: Based on the webpage links and specific operation steps described in the RPA operation flowchart, use a webpage source code parser to extract the corresponding webpage source code; The process involves extracting the corresponding webpage source code using a webpage source code parser, based on the webpage links and specific operation steps described in the RPA operation flowchart. The specific steps are as follows: Step 3.1.4.1: Use a webpage source code parser to parse the webpage links corresponding to each step of the RPA operation flowchart in sequence, and return the parsed DOM tree; Step 3.1.4.2: Based on the depth-first search rule, the DOM tree is parsed layer by layer, and a source code discrimination function is used to determine whether the webpage source code contained in the tags of this level is the source code required by the current operation process. The specific discrimination function is defined as follows:

[0034] in, This is a function for judging the source code. , These are the hierarchical label text and the current operation process description text, respectively. , They are based on and The structural similarity judgment function and the vector cosine similarity discriminant function This function determines the geometric distance from the current level tag to the top of the DOM tree. Indicates simultaneous occurrence and The number of identical words in the text. To represent text vectorization, this invention also uses the Word2Vec model to complete word vector conversion. , , , This is a source code function adjustment factor. The set threshold; Step 3.1.4.3: If there is no source code block in the entire DOM tree that satisfies the source code judgment function in step 3.1.4.2, it means that the large model has a parsing error in the requirement document, and return to step 3.1.2; otherwise, select the source code block contained in the level tag that satisfies the judgment condition and has the highest score as the source code required for the current operation process.

[0035] Step 3.1.5: Integrate the source code information obtained in Step 3.1.4 with the RPA operation flowchart output in Step 3.1.3 according to the custom requirement template format to generate the final custom requirement template. The generated custom requirement template format is: "Please generate RPA source code based on the following information: the process operation is [content], the web page link involved in the above process is [url], and the reference source code for each process is [code]. The generated source code should meet the compilation requirements of the RPA designer. If it cannot be generated, reply that the source code cannot be generated." Here, in the custom requirement template format, content, url, and code correspond to the specific flowchart operation steps in Step 3.1.3, the corresponding web page link, and the source code information in Step 3.1.4, respectively.

[0036] Step 3.2: Perform format validation on the RPA code that generates the large model's answer. If the validation requirements are met, proceed to step 3.3; otherwise, return to step 3.1. The specific format validation rules are as follows: Step 3.2.1: Determine whether the generated RPA code conforms to the syntax requirements of the RPA designer, such as language requirements, indentation requirements, comment format, and whether the number of parentheses, square brackets, and curly brackets is consistent. Step 3.2.2: Determine whether the current generated RPA code structure is complete, and whether the web page links involved in the custom requirement template, the position information in the source code, and the tag attribute information are all reflected in the RPA code; Specifically, based on the content of the custom requirement template in Example 1, step 3.2.2 involves reviewing whether the RPA source code contains the relevant information. <ui:openbrowser>Label, <ui:setvalue>Label, <ui:click>Label, <ui:getvalue>Does the tag's xmlns attribute contain the three types of links? Step 3.3: Submit the code that meets the verification requirements in Step 3.2 into the RPA designer as the final RPA process code.

[0037] In the above embodiment, the specific implementation process of automatically generating component groups by compiling the generated RPA process code using an RPA designer is as follows: the large code model is monitored at minute intervals, and when the large model returns the completed RPA requirement code, the RPA designer compiles the code. The specific steps are as follows: Step 4.1, based on the generated code... <assemblyreference>The tag content automatically loads the relevant project dependencies to ensure that subsequent component code can run in an orderly manner; Based on the code generated from the large model in Example 1 <assemblyreference> Airpa.Studio.Plugin.Workflow< / assemblyreference> <assemblyreference> AiRpa.System.Activities< / assemblyreference> <assemblyreference> AiRpa.UiAutomation.Activities< / assemblyreference> In step 1, the RPA designer will automatically load three dependency packages: Workflow, System.Activities, and UiAutomation.Activities.

[0038] Step 4.2: After the dependency packages are successfully loaded, the RPA designer performs a visual page layout design based on the WorkflowViewState tag attribute; Based on the code generated from the large model in Example 1<WorkflowViewState.ViewStateManager:100% TOP WHITE> In step 4.2, the RPA designer will automatically generate a 100% page-fitted, top-down, white-background blank page.

[0039] Step 4.3: Execute sequentially from top to bottom and from left to right. <sequence>The designer selects components based on the internal tag elements and configures components based on the internal tag attributes. Based on the code generated from the large model in Example 1 <ui:setvalue continue on error="{x:Null}" value="{x:Null}" displayname="英文输入 '" sap2010:workflowviewstate.idref="SetValue_1">In step 3, the RPA designer will automatically select the settings text component and automatically configure the prompt text to be in English, and set the error return information to NULL.

[0040] Step 4.4: After execution, lay out the component groups on the visualization page according to the execution results, and save the layout results in .xaml format in the preset local location and inform the user to check and verify them in time.

[0041] The present invention has the following beneficial effects: Traditional methods for training large models typically employ manual annotation and unsupervised training. While manually annotated datasets can ensure the training accuracy of large models, the sheer volume of data (at least 100,000 records) necessitates substantial human resources. Unsupervised learning methods, while avoiding human intervention, suffer from inconsistent data quality, easily leading to the learning of false information by large models—an unacceptable practice in the RPA field. Therefore, this invention proposes a human-machine collaborative approach that significantly reduces the amount of manually labeled data while maximizing the accuracy of machine-annotated data, thereby further ensuring the accuracy of large model learning.

[0042] Compared with traditional NLP algorithms that directly extract semantics from requirement documents, this invention uses a large document parsing model to parse and integrate the specific operation steps in the document. At the same time, it uses content validation rules to validate the content points in the requirement document, making the generated RPA requirement operation flowchart more accurate, more robust, and more widely applicable.

[0043] Compared with existing large model code generation technologies, the self-customized requirement template used in this invention reduces the difficulty of directly outputting grammatically compliant programming languages ​​by providing effective natural language algorithm descriptions and corresponding web page source code content. At the same time, the self-trained code generation of large models and standardized verification rules effectively improve the reliability and stability of the output code.

[0044] To address the problems of inaccurate component operation flowchart generation, narrow applicability, and difficulty in generating highly matched RPA component execution code in existing RPA component-based automatic generation processes, this invention proposes an automated RPA process generation method based on a large model and a custom-designed requirement template. First, unlike traditional NLP algorithms that directly extract semantics from requirement documents, this invention utilizes a document parsing large model to parse and integrate specific operation steps within the document. Simultaneously, result validation rules are used to verify the requirement points in the requirement document, resulting in more accurate RPA requirement operation flowcharts. Second, to improve the executability and generation accuracy of the corresponding RPA requirement code, this invention combines the generated requirement operation flowchart with the specific source code of the webpage containing the operations to construct a specific requirement template. Based on this template, a code generation large model is requested to obtain highly matched RPA requirement code. Finally, the generated corresponding RPA requirement code is input into an RPA designer for compilation, thereby achieving automated generation of component groups.

[0045] This invention solves the problems of inaccurate generation of component operation flowcharts, narrow applicability, and difficulty in generating highly matched RPA component execution code in the existing RPA component automatic generation process by effectively utilizing large models, thus effectively reducing the amount of manual work.

[0046] In another embodiment, the present invention provides a computer-readable storage medium storing a computer program that causes a computer to execute an RPA process automation generation method based on a large model and custom requirement templates as described above.

[0047] In another embodiment, the present invention proposes an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements an RPA process automation generation method based on a large model and a custom requirement template as described above.

[0048] In the embodiments disclosed in this application, a computer storage medium may be a tangible medium that may contain or store programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of computer storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, and portable compact disc read-only memory (CD). ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0049] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0050] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.< / ui:setvalue> < / sequence> < / assemblyreference> < / ui:getvalue> < / ui:click> < / ui:setvalue> < / ui:openbrowser> < / sequence> < / assemblyreference>

Claims

1. A method for automating RPA process generation based on a large model and custom requirement templates, characterized in that, The process includes the following steps: training a large-scale document parsing model and a large-scale code generation model based on human-computer collaborative annotation; then, using the trained large-scale document parsing model to generate a custom requirement template; next, generating RPA code based on the custom requirement template and the trained large-scale code generation model; finally, compiling the generated RPA code using an RPA designer to achieve automated generation of component groups. The process involves using a pre-trained document parsing model to generate a custom requirement template; then, based on the custom requirement template and the trained code generation model, RPA code generation is performed. The specific steps are as follows: Step 3.1: Treat the entire content of the custom-designed requirement template as a question and query it to the trained code generation model; Step 3.2: Perform format validation on the RPA code that generates the large model's answer. If the validation requirements are met, proceed to step 3.3; otherwise, return to step 3.

1. The format validation rules are as follows: Step 3.2.1: Determine whether the generated RPA code conforms to the syntax requirements of the RPA designer; Step 3.2.2: Determine if the generated RPA code structure is complete; Step 3.3: Submit the code that meets the verification requirements in Step 3.2 into the RPA designer as the final RPA process code; The specific steps for creating the custom requirement template are as follows: Step 3.1.1: Obtain the user-uploaded requirement document and use an OCR algorithm to extract the document content; Step 3.1.2: Input the extracted document content into the trained document parsing model for operation process analysis, and output the parsing results of the document parsing model. Step 3.1.3: Perform format validation on the output of Step 3.1.

2. The validation rules are as follows: traverse the current output from top to bottom and from left to right, and determine whether each operation step has a corresponding web page link. If the validation passes, use the current result as the RPA operation flowchart and proceed to Step 3.1.

4. Otherwise, inform the user of the validation failure, request modification of the requirements document, and return to Step 3.1.

1. Step 3.1.4: Based on the webpage links and operation step descriptions in the RPA operation flowchart, use a webpage source code parser to extract the corresponding webpage source code; Step 3.1.5: Integrate the source code information obtained in Step 3.1.4 with the RPA operation flowchart output in Step 3.1.3 according to the custom requirement template format to generate the final custom requirement template. The generated custom requirement template format is: "Please generate RPA source code based on the following information: the process operation is [content], the web page link involved in the above process is [url], and the reference source code for each process is [code]. The generated source code should meet the compilation requirements of the RPA designer. If it cannot be generated, reply that the source code cannot be generated." In the custom requirement template format, content, url, and code correspond to the flowchart operation steps in Step 3.1.3, the corresponding web page links, and the source code information in Step 3.1.4, respectively.

2. The RPA process automation generation method based on a large model and a custom-defined requirement template as described in claim 1, characterized in that, The training of the document parsing large model includes the following steps: Step 1.1: Collect requirement documents as the source documents, and manually add corresponding web page links to the parts of the collected requirement documents that involve specific process operations to form the requirement document format. Step 1.2: Randomly select 40% of the requirements document for manual content extraction and tagging to generate a manually annotated dataset. The training set was divided according to a 9:1 ratio. and test set ,in For the total number of data sets, for The document content set, for The set of answer results , These represent the number of training and testing sets, respectively. ; Step 1.3, The document is fed into the large document parsing model for initial fine-tuning. Step 1.4: Use document concatenation and random masking to augment the remaining 60% of the requirement documents, and use OCR algorithms to extract content from the augmented requirement documents. Input the extracted text into a fine-tuned document parsing model for analysis. Using the document content as the question and the document parsing model's answer as the result, generate a machine-labeled dataset. ,in For the total number of data sets, for Document content set, for Response result set; Step 1.5, and Combined to form a new dataset, it is input into the large document parsing model for further fine-tuning; using the test set Test the finely tuned document parsing model. If the model's accuracy reaches 80% or more, the model training is complete, and the final document parsing model is obtained. Otherwise, return to step 1.4 with the current trained model as the latest finely tuned model.

3. The RPA process automation generation method based on a large model and a custom-defined requirement template as described in claim 2, characterized in that, The training of the large model for code generation includes the following steps: Step 2.1, based on the dataset Chinese answer result set The corresponding process source code is extracted manually using a webpage source code extractor to generate the corresponding source code set. Use the RPA designer to generate the corresponding RPA code set. ;in For index values, the range is... between, , , They represent the first Answer results, webpage source code, RPA code; Step 2.2, with and The integrated content is used as a question set , As the answer result set of a large model This constitutes a large-scale code generation model with manually labeled datasets. Similarly, the training set should be divided in a 9:1 ratio. and test set ; Step 2.3, The code is then fed into the large code generation model for initial fine-tuning. Step 2.4, based on , and Generate large model machine annotation sets for code generation. The construction; Step 2.5, and Combined to form a new dataset, it is input into the large code generation model for further fine-tuning; using the test set Test the fine-tuned large model again. If the large model's accuracy reaches 80% or more, the model training is complete and the final code generation large model is obtained; otherwise, return to step 2.4 with the current trained model as the latest fine-tuned model.

4. The RPA process automation generation method based on a large model and a custom requirement template as described in claim 3, characterized in that, The basis , and Generate large model machine annotation sets for code generation. The specific steps for constructing it are as follows: Step 2.4.1: Create an empty machine-annotated source code set. ; Step 2.4.2, will Each answer result is related to The similarity of all responses is calculated to obtain a process similarity matrix. The specific calculation results are as follows: in, This is a function for calculating process similarity, using the Word2Vec model combined with the cosine similarity algorithm. for transpose, For index values, the range is... between, for The Middle 1 answer result; Step 2.4.3, Positioning Matrix The position with the highest similarity value in each row And based on this location in Search for the corresponding source code in the middle. Then get each row Store in collection middle; Step 2.4.4, with and Integration of content For the question set, fine-tune the code to generate the answers for the large model. For the result set, perform machine-labeled dataset. The construction of.

5. The RPA process automation generation method based on a large model and a custom-defined requirement template as described in claim 1, characterized in that, The webpage links and operation steps described in the RPA operation flowchart are used to extract the corresponding webpage source code using a webpage source code parser. The specific steps are as follows: Step 3.1.4.1: Use a webpage source code parser to parse the webpage links corresponding to each step of the RPA operation flowchart in sequence, and return the parsed DOM tree; Step 3.1.4.2: Parse the DOM tree layer by layer based on the depth-first search rule, and use a source code discrimination function to determine whether the webpage source code contained in the tags of this level is the source code required by the current operation process. The specific discrimination function is defined as follows: in, This is a function for judging the source code. , These are the hierarchical label text and the current operation process description text, respectively. , They are based on and The structural similarity judgment function and the vector cosine similarity discriminant function This function determines the geometric distance from the current level tag to the top of the DOM tree. Indicates simultaneous occurrence and The number of identical words in the text. This represents text vectorization, using the Word2Vec model to perform word vector conversion. , , , This is a source code function adjustment factor. The set threshold; Step 3.1.4.3: If there is no source code block in the entire DOM tree that satisfies the source code judgment function in step 3.1.4.2, it means that the large model has a parsing error in the requirement document, and return to step 3.1.2; otherwise, select the source code block contained in the level tag that satisfies the judgment condition and has the highest score as the source code required for the current operation process.

6. The RPA process automation generation method based on a large model and a custom-defined requirement template as described in claim 1, characterized in that, The generated RPA code is then compiled using an RPA designer to automate the generation of component groups. The specific steps are as follows: Step 4.1, based on the generated code... <assemblyreference> The tag content automatically loads the relevant project dependencies to ensure that subsequent component code can run in an orderly manner;< / assemblyreference> Step 4.2: After the dependency packages are successfully loaded, the RPA designer performs a visual page layout design based on the WorkflowViewState tag attribute; Step 4.3: Execute sequentially from top to bottom and from left to right. <sequence> All content contained within the tag is used to select components based on the internal tag elements; and the components are configured based on the internal tag attributes.< / sequence> Step 4.4: After execution, lay out the component groups on the visualization page according to the execution results, and save the layout results in .xaml format in the preset local location and inform the user to check and verify them in time.

7. A computer-readable storage medium storing a computer program, characterized in that, The computer program causes the computer to execute an RPA process automation generation method based on a large model and a custom requirement template as described in any one of claims 1-6.

8. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the RPA process automation generation method based on a large model and a custom requirement template as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Programming-friendly agile code automatic generation method

    CN107291450A

  • Text tagging method based on artificial intelligence, electronic device and storage medium

    CN111639480A