Code generation method, device and equipment based on AI, RPA and AI Agent

Through the code generation method based on AI and AI Agent, the problem of inconvenient and inefficient RPA code generation process is solved, efficient and accurate code generation is achieved, and the automation needs of enterprises in digital transformation is met.

CN119045825APending Publication Date: 2024-11-29BEIJING BENYING NETWORK TECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411111223.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing RPA code generation process is not convenient, efficient, and has poor results, making it difficult to meet the efficient automation needs of enterprises in digital transformation.

Method used

Using code generation methods based on AI, RPA and AI Agent, we obtain code description information, obtain reference instruction information based on AI processing, and combine AI Agent to obtain code syntax to generate target RPA codes, improving the convenience and efficiency of code generation.

Benefits of technology

It significantly improves the convenience and efficiency of RPA code generation, lowers the development threshold, improves the accuracy and effectiveness of code generation, simplifies the maintenance process, and supports the automation of complex business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045825A_ABST
    Figure CN119045825A_ABST
Patent Text Reader

Abstract

The invention provides a code generation method, device and equipment based on AI, RPA and AI Agent, and relates to the field of AI, RPA and AI Agent.The method comprises the steps that code description information is obtained; based on the AI processing code description information, at least one piece of reference instruction information is obtained, and the reference instruction information is used for describing a reference advanced instruction related to the target RPA code; processing the at least one piece of reference instruction information and the reference advanced instruction based on the AI to obtain at least one target advanced instruction; obtaining a code grammar of the target RPA code based on the AI Agent; and processing the code grammar and the at least one target advanced instruction based on the AI Agent to obtain a target RPA code. Therefore, on the basis of AI, RPA and AI Agent technologies, the generation convenience of the RPA code is improved, and the generation efficiency and effect are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of artificial intelligence (AI), robotic process automation (RPA) and artificial intelligence agent (AI agent), and in particular to a code generation method, device and equipment based on AI, RPA and AI agent. Background Art

[0002] Robotic Process Automation (RPA) uses specific "robot software" to simulate human operations on computers and automatically execute process tasks according to rules.

[0003] Artificial Intelligence (AI) is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.

[0004] The artificial intelligence agent (AI agent) of the digital labor platform can perceive the environment, make decisions and perform actions. The difference from traditional artificial intelligence is that it has the ability to think and act independently and can call tools to complete given goals. AI Agent is based on large language models (LLM) as its core computing engine, which enables it to have conversations, perform tasks, reason and show a certain degree of autonomy. It has the ability to understand, perceive, plan, remember and use tools independently, and can automatically perform complex tasks. Specifically, the AI ​​agent, an intelligent assistant composed of multiple AI capabilities driven by LLM, can interact with employees in natural language, understand employees' instructions and needs, and provide feedback and responses; it can master domain knowledge related to the business to complete complex professional work; it can decompose complex tasks into several executable tasks and use data and tools to complete tasks; it can also collaborate with employees, and AI agents can also collaborate to complete complex tasks, so as to enable digital employees to achieve a leap from automation to intelligence, help employees complete their work more efficiently, and fully realize human-machine collaboration.

[0005] In today's wave of digital transformation, enterprises are increasingly relying on RPA to improve efficiency, reduce human errors and lower operating costs. In related technologies, RPA code is generated by manual coding, visualization tools, etc. In this way, the RPA code generation process is not convenient, efficient, and effective. Summary of the invention

[0006] The embodiments of the present disclosure provide a code generation method, apparatus and device based on AI, RPA and AI Agent to solve one of the technical problems existing in the related technologies. The technical solution is as follows:

[0007] In a first aspect, an embodiment of the present disclosure provides a code generation method based on AI, RPA, and AI Agent, including:

[0008] Get code description information;

[0009] Based on the AI ​​processing code description information, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code;

[0010] Processing at least one reference instruction information and a reference high-level instruction based on the AI ​​to obtain at least one target high-level instruction;

[0011] Obtain the code syntax of the target RPA code based on AI Agent;

[0012] Based on the AI ​​Agent processing code syntax and at least one target high-level instruction, a target RPA code is obtained.

[0013] In a second aspect, the embodiments of the present disclosure provide a code generation device based on AI, RPA and AI Agent, including:

[0014] A first acquisition module is used to acquire code description information;

[0015] A first processing module, configured to process the code description information based on the AI ​​to obtain at least one reference instruction information, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code;

[0016] A second processing module, configured to process at least one reference instruction information and a reference high-level instruction based on AI to obtain at least one target high-level instruction;

[0017] The second acquisition module is used to obtain the code syntax of the target RPA code based on the AI ​​Agent;

[0018] The third processing module is used to obtain the target RPA code based on the AI ​​Agent processing code syntax and at least one target high-level instruction.

[0019] In a third aspect, an embodiment of the present disclosure provides an electronic device, the electronic device comprising: a memory and a processor. The memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the processor executes the method in any one of the above-mentioned embodiments.

[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the method in any one of the above-mentioned embodiments is executed.

[0021] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which implements the method in any one of the above-mentioned aspects when executed by a processor.

[0022] The advantages or beneficial effects of the above technical solution include at least:

[0023] By acquiring code description information and processing the code description information based on AI, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe reference high-level instructions related to the target RPA code, at least one reference instruction information and a reference high-level instruction are processed based on AI to obtain at least one target high-level instruction, the code syntax of the target RPA code is acquired based on AI Agent, and the code syntax and at least one target high-level instruction are processed based on AI Agent to obtain the target RPA code. Based on AI, RPA and AI Agent technologies, the convenience of RPA code generation can be improved, and the generation efficiency and effect can be improved.

[0024] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present disclosure will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in accordance with the present disclosure and should not be regarded as limiting the scope of the present disclosure.

[0026] Figure 1 is a flowchart of a code generation method based on AI, RPA and AI Agent provided by an embodiment of the present disclosure;

[0027] Figure 2 is a flowchart of a code generation method based on AI, RPA and AI Agent provided by another embodiment of the present disclosure;

[0028] Figure 3 is a flowchart of a code generation method based on AI, RPA and AI Agent provided by another embodiment of the present disclosure;

[0029] Figure 4 is an application schematic diagram of an embodiment of the present disclosure;

[0030] Figure 5 is a structural diagram of a code generation device based on AI, RPA and AI Agent provided by an embodiment of the present disclosure;

[0031] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0032] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and cannot be understood as limiting the present disclosure.

[0033] In today's wave of digital transformation, enterprises are increasingly relying on RPA to improve efficiency, reduce human errors and lower operating costs. In related technologies, RPA code is generated by manual coding, visualization tools, etc. In this way, the RPA code generation process is not convenient, efficient, and effective.

[0034] In order to solve at least one of the above-mentioned problems, the embodiments of the present disclosure propose a code generation method, device and equipment based on artificial intelligence (AI), robotic process automation (RPA) and digital labor platform intelligent assistant (AI Agent).

[0035] These and other aspects of the embodiments of the present disclosure will be apparent with reference to the following description and drawings. In these descriptions and drawings, some specific implementations of the embodiments of the present disclosure are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present disclosure, but it should be understood that the scope of the embodiments of the present disclosure is not limited thereto. On the contrary, the embodiments of the present disclosure include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.

[0036] Before describing the embodiments of the present disclosure in detail, for ease of understanding, common technical terms are first introduced:

[0037] In the description of the present disclosure, the term "plurality" refers to two or more.

[0038] In the description of the present disclosure, the term “RPA code” refers to a computer program code for implementing RPA.

[0039] In the description of this disclosure, the term "code description information" refers to information describing the RPA code to be generated in a natural language.

[0040] In the description of the present disclosure, the term “high-level instructions” refers to computer program instructions for generating RPA codes.

[0041] In the description of the present disclosure, the term "instruction information" refers to information for describing high-level instructions.

[0042] In the description of the present disclosure, the term “reference high-level instruction” may be a high-level instruction as an alternative to generating an RPA code.

[0043] In the description of the present disclosure, the term “reference instruction information” refers to information for describing a reference high-level instruction.

[0044] In the description of the present disclosure, the term “target RPA code” refers to the RPA code to be generated.

[0045] In the description of the present disclosure, the term "target high-level instructions" refers to high-level instructions that are most suitable for generating target RPA codes and can ensure the generation accuracy of the target RPA codes.

[0046] In the description of this disclosure, the term “code syntax” refers to the grammatical rules of RPA code.

[0047] In the description of the present disclosure, the term "instruction tag" refers to an identifier, a tag, etc. used to index an instruction.

[0048] Figure 1 It is a flowchart of a code generation method based on AI, RPA and AI Agent provided by an embodiment of the present disclosure.

[0049] In a possible implementation method provided by an embodiment of the present disclosure, the present disclosure takes the code generation method based on AI, RPA and AI Agent as an example, and the code generation device based on AI, RPA and AI Agent is configured in the code generation device based on AI, RPA and AI Agent. The code generation device based on AI, RPA and AI Agent can be applied to any electronic device with computing capability.

[0050] The electronic device may be a personal computer, a mobile terminal, a service end (or server), etc. The mobile terminal may be, for example, a mobile phone, a tablet computer, a personal digital assistant, or other hardware device with various operating systems.

[0051] In another possible implementation of the embodiments of the present disclosure, the code generation method based on AI, RPA and AI Agent can be applied to AI Agent, wherein the AI ​​Agent can run in any electronic device with computing capabilities.

[0052] In another possible implementation of the embodiments of the present disclosure, the code generation method based on AI, RPA and AI Agent can be applied to a Robotic Process Automation (RPA) robot, wherein the RPA robot can run in any electronic device with computing capabilities.

[0053] like Figure 1 As shown, the code generation method based on AI, RPA and AI Agent may include the following steps S101 to S105:

[0054] Step S101: Obtain code description information.

[0055] In the description of this disclosure, the term "code description information" refers to information describing the RPA code to be generated in natural language. For example, it is a description information entered by a user, which is expressed in natural language and describes the user's requirements for the RPA code to be generated, and there is no limitation on this.

[0056] In some embodiments, a code description information input interface may be provided in the interface of a code generation device based on AI, RPA, and AI Agent, and the code description information input by the user may be collected based on the input interface; or, the code description information sent by a third-party device may be received; or, a recorded voice and / or description content may be parsed to determine the code description information, without limitation.

[0057] Step S102: Based on the AI ​​processing code description information, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code.

[0058] In the description of the present disclosure, the term “high-level instructions” refers to computer program instructions for generating RPA codes.

[0059] In the description of the present disclosure, the term "instruction information" refers to information for describing high-level instructions.

[0060] In the description of the present disclosure, the term “reference high-level instruction” may be a high-level instruction as an alternative to generating an RPA code.

[0061] In the description of the present disclosure, the term “reference instruction information” refers to information for describing a reference high-level instruction.

[0062] In the description of this disclosure, the term "target RPA code" refers to the RPA code to be generated. The reference high-level instructions can be used as an alternative or reference in the process of generating the target RPA code.

[0063] The reference advanced instruction is, for example, connecting to a mailbox, obtaining a mail list, downloading an attachment, etc. The reference instruction information is used to describe the name, type, etc. of the reference advanced instruction, and there is no limitation on this.

[0064] In some embodiments, the code description information can be semantically parsed based on AI to obtain the description semantics, and one or more reference instruction information can be retrieved based on the description semantics; or the code description information and candidate instruction information can be matched based on AI to match the most suitable candidate instruction information from multiple candidate instruction information, and the matched candidate instruction information can be used as reference instruction information; or the code description information can be processed based on AI in any other possible way to obtain at least one reference instruction information, without limitation.

[0065] Step S103: Process at least one reference instruction information and a reference high-level instruction based on AI to obtain at least one target high-level instruction.

[0066] In the description of the present disclosure, the term "target high-level instructions" refers to high-level instructions that are most suitable for generating target RPA codes and can ensure the generation accuracy of the target RPA codes.

[0067] After the code description information is processed based on AI to obtain at least one reference instruction information, one or more target high-level instructions that are most suitable for generating the target RPA code can be further analyzed based on AI. For example, accurate candidate high-level instructions can be determined from the configuration file. The candidate high-level instructions are usually high-level instructions with high expression accuracy obtained by testing based on big data analysis. Then, the reference high-level instructions and candidate high-level instructions can be compared with the instruction information, and one or more target high-level instructions can be determined based on the comparison results; or the reference high-level instructions can be detected in combination with the reference instruction information, and whether to use the reference high-level instructions as target high-level instructions can be determined based on the detection results; or it can also be realized based on any other possible way to process at least one reference instruction information and reference high-level instructions based on AI to obtain at least one target high-level instruction (for example, the reference instruction information and reference high-level instructions can be processed based on the AI ​​model to obtain one or more target high-level instructions output by the AI ​​model), without limitation.

[0068] Step S104: Obtain the code syntax of the target RPA code based on the AI ​​Agent.

[0069] In the description of this disclosure, the term “code syntax” refers to the grammatical rules of RPA code.

[0070] After AI processes at least one reference instruction information and reference high-level instruction to obtain at least one target high-level instruction, the code syntax of the target RPA code can also be obtained based on the AI ​​Agent. For example, the code description file of the RPA code can be obtained based on the AI ​​Agent, and the code syntax can be identified from the code description file, or the code logic and context semantics of the existing RPA code can be identified to analyze the grammatical rules of the RPA code, or any other possible method can be used to obtain the code syntax of the target RPA code based on the AI ​​Agent, without limitation.

[0071] Step S105: Obtain target RPA code based on the AI ​​Agent processing code syntax and at least one target high-level instruction.

[0072] After obtaining one or more target high-level instructions and determining the code syntax of the target RPA code, the target RPA code can be obtained based on the AI ​​Agent processing code syntax and at least one target high-level instruction. For example, one or more target high-level instructions can be encapsulated based on the AI ​​Agent reference code syntax to obtain the target RPA code; or it can be determined to obtain an RPA code template corresponding to the code syntax, and one or more target high-level instructions can be filled into the RPA code template, and the filled RPA code template can be instantiated to obtain the target RPA code, without limitation.

[0073] In this embodiment, by acquiring code description information and processing the code description information based on AI, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe reference high-level instructions related to the target RPA code, at least one reference instruction information and a reference high-level instruction are processed based on AI to obtain at least one target high-level instruction, the code syntax of the target RPA code is acquired based on AI Agent, and the code syntax and at least one target high-level instruction are processed based on AI Agent to obtain the target RPA code. Based on AI, RPA and AI Agent technologies, the convenience of RPA code generation can be improved, and the generation efficiency and effect can be improved.

[0074] In some embodiments of the present disclosure, after the target RPA code is generated, the detection result corresponding to each target high-level instruction in the target RPA code can be determined based on the AI ​​Agent. In response to the detection result indicating that the target high-level instruction does not meet the preset conditions, the update information corresponding to the target high-level instruction is obtained from the high-level instruction vector library, the target high-level instruction is updated according to the update information to obtain a new high-level instruction, and the target high-level instruction that does not meet the preset conditions in the target RPA code is replaced according to the new high-level instruction to obtain a new target RPA code, until each target high-level instruction in the new target RPA code meets the preset conditions. Thereby, the correctness detection of the target high-level instruction is realized, and when the target high-level instruction does not meet the conditions, the target high-level instruction in the target RPA code is corrected in a timely manner.

[0075] Among them, the advanced instruction vector library can pre-include correct advanced instructions as a reference, and can also include solutions and correction plans corresponding to various possible instruction error types. The updated information can be, for example, the aforementioned correct advanced instructions, or it can also be a solution and correction plan, without limitation.

[0076] The preset condition refers to a threshold condition for determining that there is no error in the target high-level instruction.

[0077] That is to say, if the target high-level instruction does not meet the preset conditions, the error type of the target high-level instruction can be determined, and based on the error type, a suitable solution can be retrieved from the high-level instruction vector library to modify and update the target high-level instruction to obtain a new high-level instruction. Alternatively, a new high-level instruction can be retrieved from the high-level instruction vector library based on the function identifier of the target high-level instruction, and there is no restriction on this.

[0078] Figure 2 It is a flowchart of a code generation method based on AI, RPA and AI Agent provided by another embodiment of the present disclosure.

[0079] like Figure 2 As shown, the code generation method based on AI, RPA and AI Agent may include the following steps S201 to S207:

[0080] Step S201: Obtain code description information.

[0081] Step S202: Based on the AI ​​processing code description information, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code.

[0082] For the description of step S201 - step S202 , please refer to the above embodiment for details, which will not be repeated here.

[0083] Step S203: extracting descriptive semantic features from the code description information based on the large model.

[0084] In the description of the present disclosure, the term "description semantic features" refers to the semantic features contained in the code description information.

[0085] In some embodiments, descriptive semantic features can be extracted from the code description information based on a large model. The large model can be specifically, for example, a large language model (LLM), which has the ability to identify semantic features contained in the code description information. The LLM can be pre-trained, and during the training process, a large amount of sample data (including sample code description information, sample semantic features of the sample code description information) can be used to train the deep learning model, so that the trained LLM can understand the descriptive semantic features carried by the code description information.

[0086] Step S204: Identify at least one instruction tag from the description semantic features.

[0087] In the description of the present disclosure, the term "instruction tag" refers to an identifier, a tag, etc. used to index an instruction.

[0088] After extracting the description semantic features from the code description information, one or more instruction tags can be identified based on the description semantic features. For example, the tag semantic features of the candidate instruction tags can be obtained. If the description semantic features match the tag semantic features successfully, the candidate instruction tag can be used as the identified instruction tag. The instruction tag can be used to index the first high-level instruction to be adapted.

[0089] Step S205: Determine at least one target high-level instruction based on the instruction tag, at least one reference instruction information and the reference high-level instruction.

[0090] In some embodiments, after one or more instruction tags are identified, a high-level instruction library corresponding to the reference instruction information can be determined from the high-level instruction directory, wherein the high-level instruction library contains multiple candidate high-level instructions, each candidate high-level instruction has a corresponding candidate tag, and a candidate tag matching the instruction tag is determined from the multiple candidate tags, and the candidate high-level instruction to which the matching candidate tag belongs is used as the first high-level instruction, and at least one target high-level instruction is determined based on the reference high-level instruction and at least one first high-level instruction. In this way, the acquisition efficiency of the target high-level instruction can be effectively improved, and the generation efficiency of the RPA code can be improved.

[0091] In the description of the present disclosure, the term “first high-level instruction” refers to a high-level instruction matched from a high-level instruction library.

[0092] In some embodiments, in the process of determining at least one target high-level instruction based on a reference high-level instruction and at least one first high-level instruction, the similarity between the reference high-level instruction and the first high-level instruction may be determined, and in response to the similarity being greater than or equal to a similarity threshold, the reference high-level instruction is used as the target high-level instruction, and in response to the similarity being less than the similarity threshold, the first high-level instruction is used as the target high-level instruction. Thus, the efficiency of acquiring the target high-level instruction can be effectively improved, and the efficiency of generating RPA code can be improved. Furthermore, since the first high-level instruction is obtained by indexing in the high-level instruction library, the target high-level instruction is determined by combining the reference high-level instruction and the first high-level instruction, which can effectively improve the generation accuracy of the target high-level instruction.

[0093] Step S206: Obtain the code syntax of the target RPA code based on the AI ​​Agent.

[0094] Step S207: Obtain target RPA code based on the AI ​​Agent processing code syntax and at least one target high-level instruction.

[0095] For the description of step S206 to step S207, please refer to the above embodiment for details, which will not be repeated here.

[0096] In this embodiment, by acquiring code description information and processing the code description information based on AI, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code, at least one reference instruction information and a reference high-level instruction are processed based on AI to obtain at least one target high-level instruction, the code syntax of the target RPA code is acquired based on the AI ​​Agent, and the code syntax and at least one target high-level instruction are processed based on the AI ​​Agent to obtain the target RPA code, which can improve the convenience of RPA code generation based on AI, RPA and AI Agent technologies, and improve the generation efficiency and effect. By extracting descriptive semantic features from the code description information based on a large model, identifying at least one instruction label from the descriptive semantic features, and determining at least one target high-level instruction based on the instruction label, at least one reference instruction information and a reference high-level instruction, the acquisition efficiency of the target high-level instruction can be effectively improved, and the generation efficiency of the RPA code can be improved.

[0097] Figure 3 It is a flowchart of a code generation method based on AI, RPA and AI Agent provided by another embodiment of the present disclosure.

[0098] like Figure 3 As shown, the code generation method based on AI, RPA and AI Agent may include the following steps S301 to S306:

[0099] Step S301: Obtain code description information.

[0100] Step S302: Based on the AI ​​processing code description information, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code.

[0101] Step S303: Process at least one reference instruction information and a reference high-level instruction based on AI to obtain at least one target high-level instruction.

[0102] Step S304: Obtain the code syntax of the target RPA code based on the AI ​​Agent.

[0103] For the description of steps S301 to S304, please refer to the above embodiments, which will not be repeated here.

[0104] Step S305: Obtain the RPA code context related to the target high-level instruction.

[0105] In some embodiments, after obtaining the code syntax of the target RPA code based on the AI ​​Agent, the RPA code context related to the target high-level instruction can also be obtained. The RPA code context can be used to assist in the generation of the target RPA code. The RPA code context can be the code semantics, code logic, etc. of the context code specifically including the target high-level instruction, and there is no limitation on this.

[0106] Step S306: Obtain target RPA code based on the AI ​​Agent processing code syntax, at least one target high-level instruction and RPA code context.

[0107] After obtaining the RPA code context related to the target high-level instruction, the AI ​​Agent can process the code syntax, at least one target high-level instruction and the RPA code context to obtain the target RPA code. For example, the AI ​​Agent can call the big model, use the big model to refer to the code syntax to process one or more target high-level instructions and RPA code context, and obtain the target RPA code output by the big model.

[0108] Among them, the large model can be specifically, for example, a large language model (LLM), which has the ability to identify reference code syntax to process one or more target high-level instructions, and combine the RPA code context during the processing to generate the target RPA code. The LLM can be pre-trained. During the training process, a large amount of sample data (including sample code syntax, sample high-level instructions, and code context of sample high-level instructions, sample RPA code) can be used to train the deep learning model, so that the trained LLM can refer to the code syntax, process at least one target high-level instruction and RPA code context, and obtain the target RPA code.

[0109] In this embodiment, by obtaining code description information and processing the code description information based on AI, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code, at least one reference instruction information and a reference high-level instruction are processed based on AI to obtain at least one target high-level instruction, the code syntax of the target RPA code is obtained based on the AI ​​Agent, and the code syntax and at least one target high-level instruction are processed based on the AI ​​Agent to obtain the target RPA code, which can improve the convenience of RPA code generation based on AI, RPA and AI Agent technology, and improve the generation efficiency and effect. By obtaining the RPA code context related to the target high-level instruction, and processing the code syntax, at least one target high-level instruction and the RPA code context based on the AI ​​Agent to obtain the target RPA code, the accuracy and generation efficiency of the target RPA code generation can be greatly improved.

[0110] The examples for the above embodiment are as follows:

[0111] like Figure 4 As shown, Figure 4 This is an application diagram in the embodiment of the present disclosure. The large model can be used to generate RPA code, thereby greatly simplifying the RPA code generation process. By combining the advanced instruction library and the basic syntax library, not only can RPA code be generated, but also errors in the RPA code can be automatically corrected to ensure that the generated RPA code is efficient and accurate. It includes the following:

[0112] User input:

[0113] Users enter the task description they want to automate through a simple interface. It can be a natural language description without professional programming terms.

[0114] Code context: used to support users to rewrite or continue existing code.

[0115] Visit the large model for reference and advanced instructions:

[0116] First, we can access the pre-trained large model to extract relevant high-level instructions from the description entered by the user. For example, we can index the high-level instruction library and high-level instruction directory to obtain high-level instructions (also called reference instructions, reference high-level instructions) that match the description entered by the user to ensure a high degree of match with the task requirements.

[0117] RPA Code Generation:

[0118] Specific RPA code can be generated using reference high-level instructions, basic syntax (an optional example of code syntax), and user input. This step is performed with the assistance of code context to ensure the coherence and logic of the code.

[0119] Code detection:

[0120] The code detection module automatically detects the generated RPA code to check for errors and potential problems in the code.

[0121] Error code correction:

[0122] If an error is detected, the advanced instruction vector library can be automatically accessed to correct the erroneous code.

[0123] Returns:

[0124] Finally, the generated RPA code can be returned to the user, who can directly use the code to perform their automation tasks.

[0125] Specific example:

[0126] Assume that the user input is: "Automatically log in to the mailbox and download attachments every morning." User input: "Automatically log in to the mailbox and download attachments every morning." Extract high-level instructions: connect to the mailbox, obtain the mail list, download attachments, etc. Code detection and correction: Detect non-existent instructions and replace them with correct instructions. Return result: The corrected efficient code is returned to the user, who can run it directly. Through the above steps, not only the efficiency and accuracy of RPA code generation are improved, but also the technical threshold of users is significantly reduced, which promotes the popularization and application of RPA technology.

[0127] The method provided by the implementation of the present disclosure can lower the threshold for RPA code development (RPA code is generated through natural language input, and non-technical personnel can easily create automation scripts without programming knowledge). Shorten the development cycle (automatically generate code and annotation functions, significantly reducing development and debugging time). Improve flexibility (the generated code supports manual modification and expansion to meet complex business needs). Simplify maintenance (supports automatic annotation and rewriting of code, which can help users sort out existing businesses and optimize code according to business process changes).

[0128] The code generation method based on AI, RPA and AI Agent provided in the embodiments of the present disclosure can be applied to a digital employee development assistant (digital employee development intelligent assistant), wherein the digital employee development assistant has intelligent data processing capabilities and an automated code generation mechanism. It can automatically parse and process complex data sets, reducing reliance on manual programming, thereby reducing labor costs. In addition, the extended command library of the digital employee development assistant can quickly generate computer program code that seamlessly connects with RPA products, improves the code reuse rate, and shortens the development cycle. In addition, the "self-healing" function of the digital employee development assistant can automatically adapt to changes in the user interface, reducing maintenance work and related costs caused by interface updates. When the code generation method based on AI, RPA and AI Agent is applied to the digital employee development assistant, the digital employee development assistant can conveniently generate RPA code with the assistance of AI, RPA and AI Agent technologies, thereby improving the efficiency and effect of RPA code generation.

[0129] Figure 5 It is a structural diagram of a code generation device based on AI, RPA and AI Agent provided by an embodiment of the present disclosure.

[0130] like Figure 5 As shown, the code generation device 50 based on AI, RPA and AI Agent includes:

[0131] The first acquisition module 501 is used to acquire code description information.

[0132] The first processing module 502 is used to obtain at least one reference instruction information based on the AI ​​processing code description information, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code.

[0133] The second processing module 503 is used to process at least one reference instruction information and a reference high-level instruction based on AI to obtain at least one target high-level instruction.

[0134] The second acquisition module 504 is used to acquire the code syntax of the target RPA code based on the AI ​​Agent.

[0135] The third processing module 505 is used to obtain the target RPA code based on the AI ​​Agent processing code syntax and at least one target high-level instruction.

[0136] In some embodiments of the present disclosure, the device is applied to an RPA robot.

[0137] In some embodiments of the present disclosure, the second processing module includes:

[0138] An extraction unit, used for extracting description semantic features from the code description information based on the large model;

[0139] A recognition unit, used to recognize at least one instruction tag from the description semantic features;

[0140] The determining unit is used to determine at least one target high-level instruction based on the instruction tag, at least one reference instruction information and the reference high-level instruction.

[0141] In some embodiments of the present disclosure, the determining unit is specifically configured to:

[0142] Determine a high-level instruction library corresponding to the reference instruction information from the high-level instruction directory, wherein the high-level instruction library includes a plurality of candidate high-level instructions, and each candidate high-level instruction has a corresponding candidate tag;

[0143] Determine a candidate tag that matches the instruction tag from the multiple candidate tags, and use the candidate high-level instruction to which the matching candidate tag belongs as the first high-level instruction;

[0144] At least one target high level instruction is determined based on the reference high level instruction and the at least one first high level instruction.

[0145] In some embodiments of the present disclosure, the determining unit is specifically configured to:

[0146] determining a similarity between the reference high-level instruction and the first high-level instruction;

[0147] In response to the similarity being greater than or equal to a similarity threshold, taking the reference high-level instruction as a target high-level instruction;

[0148] In response to the similarity being less than a similarity threshold, the first high-level instruction is used as a target high-level instruction.

[0149] In some embodiments of the present disclosure, the third processing module is specifically configured to:

[0150] Get the RPA code context related to the target high-level instructions;

[0151] The target RPA code is obtained based on the AI ​​Agent processing code syntax, at least one target high-level instruction and the RPA code context.

[0152] In some embodiments of the present disclosure, the apparatus further comprises:

[0153] A detection module is used to determine the detection result corresponding to each target high-level instruction in the target RPA code based on the AI ​​Agent, and in response to the detection result indicating that the target high-level instruction does not meet the preset condition, obtain the update information corresponding to the target high-level instruction from the high-level instruction vector library,

[0154] The target high-level instructions are updated according to the update information to obtain new high-level instructions, and the target high-level instructions that do not meet the preset conditions in the target RPA code are replaced according to the new high-level instructions to obtain new target RPA code, until each target high-level instruction in the new target RPA code meets the preset conditions.

[0155] The functions of each module in each device in the embodiments of the present disclosure can be found in the corresponding description of any of the above methods, and will not be repeated here.

[0156] It should be noted here that the code generation device based on AI, RPA and AI Agent provided in the embodiments of the present disclosure can implement all the method steps implemented in any of the above-mentioned method embodiments, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as those of the method embodiment will not be described in detail here.

[0157] In this embodiment, by acquiring code description information and processing the code description information based on AI, at least one reference instruction information is obtained, wherein the reference instruction information is used to describe reference high-level instructions related to the target RPA code, at least one reference instruction information and a reference high-level instruction are processed based on AI to obtain at least one target high-level instruction, the code syntax of the target RPA code is acquired based on AI Agent, and the code syntax and at least one target high-level instruction are processed based on AI Agent to obtain the target RPA code. Based on AI, RPA and AI Agent technologies, the convenience of RPA code generation can be improved, and the generation efficiency and effect can be improved.

[0158] Figure 6 FIG. 1 is a block diagram showing a structure of an electronic device according to an embodiment of the present disclosure. Figure 6 As shown, the electronic device includes: a memory 610 and a processor 620, wherein the memory 610 stores a computer program that can be run on the processor 620. When the processor 620 executes the computer program, the code generation method based on AI, RPA and AI Agent in the above embodiment is implemented. The number of the memory 610 and the processor 620 can be one or more.

[0159] The electronic device also includes:

[0160] The communication interface 630 is used to communicate with external devices and perform data exchange transmission.

[0161] If the memory 610, the processor 620 and the communication interface 630 are implemented independently, the memory 610, the processor 620 and the communication interface 630 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0162] Optionally, in a specific implementation, if the memory 610, the processor 620 and the communication interface 630 are integrated on a chip, the memory 610, the processor 620 and the communication interface 630 can communicate with each other through an internal interface.

[0163] An embodiment of the present disclosure provides a computer-readable storage medium storing a computer program, which implements the method provided in any embodiment of the present disclosure when the program is executed by a processor.

[0164] An embodiment of the present disclosure also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes a method provided by any embodiment of the present disclosure.

[0165] The embodiment of the present disclosure also provides a chip, including: an input interface, an output interface, a processor and a memory. The input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0166] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0167] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0168] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0169] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0170] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0171] Any process or method description described in the flowchart or otherwise herein can be understood to represent a module, segment or portion of code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiments of the present disclosure includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0172] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0173] It should be understood that the various parts of the present disclosure may be implemented with hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods may be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method may be completed by instructing the relevant hardware through a program, which may be stored in a computer-readable storage medium, and when the program is executed, includes one or a combination of the steps of the method embodiment.

[0174] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a disk or an optical disk, etc.

[0175] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A code generation method based on artificial intelligence AI, robotic process automation RPA and digital labor platform intelligent assistant AIAgent, characterized in that: include: Get code description information; Processing the code description information based on AI to obtain at least one reference instruction information, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code; Processing the at least one reference instruction information and the reference high-level instruction based on the AI ​​to obtain at least one target high-level instruction; Acquire the code syntax of the target RPA code based on the AI ​​Agent; The target RPA code is obtained by processing the code syntax and the at least one target high-level instruction based on the AIAgent.

2. The method according to claim 1, characterized in that The method is performed by an RPA robot.

3. The method according to any one of claims 1 to 2, characterized in that: The step of processing the at least one reference instruction information and the reference high-level instruction based on the AI ​​to obtain at least one target high-level instruction includes: Extracting descriptive semantic features from the code description information based on a large model; identifying at least one instruction tag from the descriptive semantic features; The at least one target high-level instruction is determined based on the instruction tag, the at least one reference instruction information and the reference high-level instruction.

4. The method according to claim 3, characterized in that The determining the at least one target high-level instruction based on the instruction tag, the at least one reference instruction information and the reference high-level instruction comprises: Determine a high-level instruction library corresponding to the reference instruction information from a high-level instruction directory, wherein the high-level instruction library contains a plurality of candidate high-level instructions, each of the candidate high-level instructions having a corresponding candidate tag; Determine a candidate tag that matches the instruction tag from the plurality of candidate tags, and use the candidate high-level instruction to which the matching candidate tag belongs as the first high-level instruction; Based on the reference high-level instructions and at least one of the first high-level instructions, the at least one target high-level instruction is determined.

5. The method according to claim 4, characterized in that The determining, based on the reference high-level instruction and at least one of the first high-level instructions, the at least one target high-level instruction comprises: determining a similarity between the reference high-level instruction and the first high-level instruction; In response to the similarity being greater than or equal to a similarity threshold, taking the reference high-level instruction as the target high-level instruction; In response to the similarity being less than the similarity threshold, the first high-level instruction is used as the target high-level instruction.

6. The method according to any one of claims 1-2, characterized in that: The step of processing the code syntax and the at least one target high-level instruction based on the AI ​​Agent to obtain the target RPA code includes: Obtaining an RPA code context related to the target high-level instruction; The target RPA code is obtained based on the AIAgent processing the code syntax, the at least one target high-level instruction and the RPA code context.

7. The method according to any one of claims 1-2, characterized in that: The method further comprises: Determining, based on the AI ​​Agent, a detection result corresponding to each target high-level instruction in the target RPA code; in response to the detection result indicating that the target high-level instruction does not meet a preset condition, obtaining update information corresponding to the target high-level instruction from a high-level instruction vector library; Update the target high-level instruction according to the update information to obtain a new high-level instruction; The target high-level instructions in the target RPA code that do not meet the preset conditions are replaced according to the new high-level instructions to obtain a new target RPA code, until each of the target high-level instructions in the new target RPA code meets the preset conditions.

8. A code generation device based on artificial intelligence AI, robotic process automation RPA and digital labor platform intelligent assistant AIAgent, characterized in that: include: A first acquisition module is used to acquire code description information; A first processing module, configured to process the code description information based on AI to obtain at least one reference instruction information, wherein the reference instruction information is used to describe a reference high-level instruction related to the target RPA code; A second processing module, configured to process the at least one reference instruction information and the reference high-level instruction based on the AI ​​to obtain at least one target high-level instruction; A second acquisition module, configured to acquire a code syntax of the target RPA code based on the AI ​​Agent; The third processing module is used to process the code syntax and the at least one target high-level instruction based on the AIAgent to obtain the target RPA code.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Code generation method and device, equipment, medium and product

    CN119917108A