Digital employee generation method and device, electronic equipment and storage medium

By using user drag and drop to generate flowcharts and combining large language models to optimize code, the problem of inefficient technology construction of existing digital employees is solved, and rapid and flexible digital employee construction and batch deployment are achieved.

CN119396379APending Publication Date: 2025-02-07INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411358788.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The lack of universal and instrumental platforms for existing digital employee technology can build digital employees, resulting in each digital employee needing to carefully design for their tasks, and cannot be built in batches, making the construction inefficient.

Method used

The flowchart is generated through the user's drag and drop operation, and digital employee code is generated based on the preset traversal algorithm, natural language instructions are received and input into the pre-trained large language model, and digital employee code is modified and optimized.

Benefits of technology

It realizes rapid construction and batch deployment of digital employees, reduces construction costs and time, improves construction efficiency and flexibility, and can adjust instantly according to business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396379A_ABST
    Figure CN119396379A_ABST
Patent Text Reader

Abstract

The invention provides a digital employee generation method and device, electronic equipment and a storage medium, and belongs to the technical field of data processing, and the method comprises the steps: generating a flow chart based on a dragging operation of a user; traversing the flow chart based on a preset traversal algorithm to generate a digital employee code corresponding to the flow chart; receiving a natural language instruction input by the user; and inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model. According to the scheme, a user can quickly generate the corresponding code by dragging the component and generating the flow chart, so that digital employee establishment is realized, a user who does not compete code programming can also establish digital employees, the digital employee establishment cost is reduced, and the digital employee establishment efficiency is improved; in addition, digital employee codes are corrected through a large language model, and the flexibility of digital employee building is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for generating a digital employee. Background Art

[0002] Digital workers, as an emerging automation solution, are software entities built using advanced artificial intelligence, machine learning, and natural language processing technologies. They can simulate human work behaviors and perform a variety of tasks, including but not limited to customer service, data analysis, content creation, and daily office affairs processing.

[0003] At present, the existing digital employee technology is an automated service for specific tasks. Therefore, the construction of digital employees is achieved by manually writing code. There is a lack of a universal and instrumental platform for building digital employees. This requires each digital employee to be carefully designed for his or her task, and digital employees cannot be built in batches. The efficiency of digital employee construction is low, which is not conducive to the popularization of digital employee technology.

[0004] Therefore, how to improve the efficiency of building digital employees has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The present invention provides a digital employee generation method, device, electronic device and storage medium, which are used to solve the problem of low efficiency in manually building digital employees in the prior art.

[0006] The present invention provides a method for generating a digital employee, comprising the following steps: Generate a flowchart based on the user's drag operation; Based on a preset traversal algorithm, the flowchart is traversed to generate a digital employee code corresponding to the flowchart; Receiving a natural language instruction input by the user; The digital employee code and the natural language instruction are input into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

[0007] According to a method for generating a digital employee provided by the present invention, after inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model, the method further includes: Inputting the digital employee code into a compiler for checking to obtain a checking result; If the inspection result indicates that there is an error in the digital employee code, the corresponding error report is supplemented and input into the large language model to obtain the corrected digital employee code output by the large language model, and then the process returns to the step of inputting the digital employee code into the compiler for inspection to obtain the inspection result.

[0008] According to a method for generating a digital employee provided by the present invention, after inputting the digital employee code into a compiler for checking and obtaining a check result, the method further comprises: If the checking result is correct, compiling the digital employee code; Convert said digital employee code into a control flow graph.

[0009] According to a digital employee generation method provided by the present invention, converting the digital employee code into a control flow chart includes: Decomposing the digital employee code into lexical units tokens; Based on the lexical units tokens, construct an abstract syntax tree; The abstract syntax tree is converted into a control flow graph.

[0010] According to a method for generating a digital employee provided by the present invention, before inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model, the method further includes: Acquire a sample data set, the sample data set comprising multiple sets of sample data, any set of sample data in the multiple sets of sample data comprising original code, natural language instructions and modified code; Amplifying the sample data set to obtain a training data set; Based on the training data set, the large language model is fine-tuned to obtain the pre-trained large language model.

[0011] The present invention also provides a digital employee generation device, comprising the following modules: A flowchart generation module is used to generate a flowchart based on the user's drag operation; A code generation module, used to traverse the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; An instruction receiving module, used for receiving a natural language instruction input by the user; The code adjustment module is used to input the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

[0012] The present invention also provides a digital employee generation system, which uses any of the digital employee generation methods described above, including: A programming mode, in which a programming interface is displayed for a user to write code; Flowchart mode: in the flowchart mode, a visual flowchart design tool is displayed to provide a flowchart drag component for the user to drag and drop to generate a flowchart.

[0013] The present invention also provides 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, any one of the above-mentioned methods for generating a digital employee is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for generating a digital employee as described above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for generating a digital employee as described above is implemented.

[0016] The digital employee generation method, device, electronic device and storage medium provided by the present invention generate a flowchart based on the user's dragging operation; traverse the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; receive a natural language instruction input by the user; input the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model. Through this solution, users can generate flowcharts by dragging components, and then quickly generate corresponding codes to achieve the construction of digital employees. Users who are not proficient in code programming can also build digital employees, reducing the cost of building digital employees and improving the efficiency of building digital employees. In addition, based on the user's natural language instructions, the digital employee code is corrected through a pre-trained large language model, further improving the flexibility of digital employee construction and achieving instant adjustment of digital employees according to business needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of the digital employee generation method provided by the present invention.

[0019] Figure 2 It is a structural schematic diagram of the digital employee generating device provided by the present invention.

[0020] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] It should be noted that in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. The orientation or position relationship indicated by the terms "upper", "lower" and the like is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be a connection between two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0023] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0024] Combine the following Figure 1-Figure 3 The digital employee generation method, device, electronic device and storage medium provided in the embodiments of the present invention are described.

[0025] Figure 1 is a flow chart of the method for generating digital employees provided by the present invention, such as Figure 1 As shown, the method includes the following: S110, generating a flow chart based on the user's drag operation; S120, traversing the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; S130, receiving a natural language instruction input by the user; S140, inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

[0026] It should be noted that the execution subject of the digital employee generation method provided in the embodiment of the present invention may be a digital employee generation system, and the digital employee generation system may be deployed in a digital employee generation device, and the digital employee generation device may be a server, a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, or a personal digital assistant (personal digital assistant, PDA), etc. For ease of understanding, the digital employee generation method provided by the present invention is described below with the digital employee generation system as the execution subject.

[0027] In S110, a variety of flowchart components are provided, including but not limited to a termination component for indicating the start or end of a process, a processing component for indicating a specific processing step, a decision component for indicating a decision point, an input / output component for indicating an input / output operation, a preparation component for indicating an initialization operation, a sub-process component for indicating a sub-process call, etc. The user can construct a flowchart by selecting and dragging different components without writing complex logic codes.

[0028] In S120, the nodes and edges in the flowchart are parsed out, and each node can contain different types of information, such as conditional judgment, loop, function call, etc., to form a directed graph, which is stored in an adjacency list or an adjacency matrix. Starting from the starting node, the flowchart is traversed according to the structure of the flowchart. The depth-first traversal algorithm or the breadth-first traversal algorithm can be used for traversal. During the traversal process, the nodes that have been visited are recorded, and corresponding code snippets are generated according to the type of the node. For example, if statements are generated for conditional judgment nodes, for loop nodes, for loop nodes, for function call statements, for function call nodes, for ordinary nodes, corresponding assignment, output, etc. statements are generated, and for end nodes, a return statement or end mark, such as return, is generated, and finally the digital employee code corresponding to the flowchart is obtained.

[0029] In S130, natural language instructions input by the user through voice can be received, and text content can be obtained through voice recognition for subsequent input into the large language model; natural language instructions input directly by the user through text can also be accepted and directly input into the large language model; the specific implementation method is not limited here.

[0030] In S140, the pre-trained large language model adjusts the digital employee code according to the natural language instruction input by the user, so as to realize the rapid adjustment of the digital employee code. The natural language instruction input by the user may be to instruct the large language model to adjust some functions implemented by the digital employee code, or to adjust some specific parameters in the digital employee code, or to adjust some logic in the digital employee code, and the specific content is not limited here. For example, the natural language instruction input by the user instructs the large language model to modify the judgment condition of a judgment statement in a section of the digital employee code to another judgment condition.

[0031] It is understandable that there is no strict timing restriction for S120 and S130, that is, S120 may be executed first and then S130, or S130 may be executed first and then S120, or S120 and S130 may be executed simultaneously.

[0032] Optionally, the programming language required for digital employees is designed using the same syntax as the C language. This design allows users with a simple C language foundation to quickly get started with digital employees, and also allows large models to learn the required programming knowledge more quickly. Compared with computer programs, digital employees are less complex, can abandon the concept of functions, and do not support the import of external packages. In order to support high-order mathematical operations, operators are supported in addition to arithmetic and remainder operations. For ease of use, keywords in the C language can be inherited. At the same time, in order to support external interfaces, the keyword interface is designed, which accepts a string as input. The string content is the external interface to be called, which is user-defined. When the interface keyword is executed, the terminal (such as cmd) will run the command in the parameter. For example, for "delete order xxx", the corresponding command is interface("manager delete_order --oid xxx"), where manager is the application that interfaces with the server backend.

[0033] The digital employee generation method provided in the embodiment of the present invention generates a flowchart based on the user's dragging operation; traverses the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; receives a natural language instruction input by the user; inputs the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model. Through this solution, users can generate flowcharts by dragging components, and then quickly generate corresponding codes to achieve the construction of digital employees. Users who are not proficient in code programming can also build digital employees, reducing the cost of building digital employees and improving the efficiency of building digital employees. In addition, based on the user's natural language instructions, the digital employee code is corrected through a pre-trained large language model, further improving the flexibility of digital employee construction and achieving instant adjustment of digital employees according to business needs.

[0034] In an optional embodiment, after inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model, the method further includes: Inputting the digital employee code into a compiler for checking to obtain a checking result; If the inspection result indicates that there is an error in the digital employee code, the corresponding error report is supplemented and input into the large language model to obtain the corrected digital employee code output by the large language model, and then the process returns to the step of inputting the digital employee code into the compiler for inspection to obtain the inspection result.

[0035] Specifically, after obtaining the digital employee code, the generated digital employee code is input into the compiler for compilation. If there is an error, the error report is supplemented into the context and re-input into the pre-trained large language model for modification again.

[0036] The digital employee generation method provided by the embodiment of the present invention adds the compilation error report to the context and re-inputs it into the pre-trained large language model. The large language model automatically modifies the digital employee code according to the error report, thereby improving the automation and efficiency of digital employee generation.

[0037] In an optional embodiment, after inputting the digital employee code into a compiler for checking and obtaining a check result, the method further includes: If the checking result is correct, compiling the digital employee code; Convert said digital employee code into a control flow graph.

[0038] Specifically, if the current mode is a flowchart, that is, the user generates a flowchart by dragging and dropping, and generates a digital employee code, after the digital employee code is modified and checked, it will be converted into a control flow chart again so that the user can view the control flow of the built digital employee.

[0039] Furthermore, the converting the digital employee code into a control flow chart includes: Decomposing the digital employee code into lexical units tokens; Based on the lexical units tokens, construct an abstract syntax tree; The abstract syntax tree is converted into a control flow graph.

[0040] In the embodiment of the present invention, considering that most users adopt a low-code development method based on flowcharts to build digital employees, the digital employee generation system is also directly executed based on flowcharts at runtime. To this end, it is necessary to realize the interchangeability of flowcharts and codes. The conversion from flowcharts to codes can be achieved by traversal, and the conversion from codes to flowcharts requires the use of a compiler.

[0041] Syntax-Directed Definition (SDD) is a core concept in compiler theory, which associates attributes and semantic rules with the productions of context-free grammars. In this way, each grammatical structure is bound to corresponding semantic attributes, allowing the compiler to calculate these attributes while parsing the source code. These attributes may include the data type of variables, the value of expressions, storage locations, etc., and the semantic rules define how to calculate the attributes of the parent structure from the attributes of the child structure; A translation scheme is a special type of syntax-directed definition that embeds execution code (usually actions for intermediate code generation) in the productions of the grammar. This approach allows semantic actions to be executed during syntax analysis, thereby completing the translation task when generating an abstract syntax tree or directly generating target code. Translation schemes are often used to implement the front end of a compiler, especially in the lexical, syntax analysis, and preliminary semantic analysis stages; In practical applications, syntax-directed definitions and translation schemes greatly simplify the design and implementation of compilers. With these tools, compiler developers can systematically combine the grammatical rules of a programming language with its semantic processing logic. For example, when processing assignment statements, syntax-directed definitions can be used to check type compatibility, calculate expression values, and generate corresponding storage code. Such an integrated approach improves the efficiency and accuracy of the compilation process because the semantic analysis and code generation steps are closely integrated, reducing the complexity and potential errors of the intermediate representation; The design of syntax-directed definitions and translation schemes should consider clarity, efficiency, and ease of implementation. Well-designed syntax-directed definitions can ensure the correct order of property calculations, avoid circular dependencies and undefined property values. At the same time, by optimizing the timing of action execution in the translation scheme, the performance of the compiler can be further improved.

[0042] In the embodiment of the present invention, the conversion of code to a flowchart includes two steps, one is converting the code into an Abstract Syntax Tree (AST), and the other is converting the abstract syntax tree into a flowchart. The compiler is used to convert the code into the abstract syntax tree.

[0043] Here, when the compiler parses the user code, the first step is to perform lexical analysis. Lexical analysis is the first step in the compilation process and is responsible for breaking down the continuous character stream of the source code into a series of meaningful symbols, called lexemes. These lexemes are then further mapped into tokens, which provide the necessary grammatical and semantic information for the subsequent stages of the compiler. This process is performed by a component called a lexical analyzer or scanner, which reads the input code and identifies the patterns that constitute individual programming language elements, such as identifiers, keywords, operators, and delimiters. The key challenge of lexical analysis is to efficiently and accurately identify various lexemes and convert them into corresponding tokens. This is usually implemented by a state machine (especially a deterministic finite automaton, DFA), which identifies the patterns of various lexemes based on the state transitions of the input character sequence. In addition, the lexical analyzer must handle whitespace characters, comments, and other non-semantic characters in the source code to ensure that they do not interfere with the subsequent compilation stages. Through this stage of processing, the source code is effectively prepared in the appropriate format for deeper grammatical and semantic analysis. Optionally, Flex is used to write a lexical analyzer.

[0044] Here, after the lexical analysis is completed, the syntax analysis is performed, that is, the syntax tree is constructed according to the grammar and translation scheme. In compiler theory, grammar (usually refers to context-free grammar) is a tool used to describe the syntax rules of a programming language. Grammar defines the structure of a valid program in a programming language and guides the compiler on how to parse the source code. Compiler designers usually use grammars to specify how to decompose program source code into lexical units (tokens) and how to build grammatical structures from these lexical units, such as abstract syntax trees (ASTs). Grammars are mainly used in the syntax analysis phase during the compilation process. The syntax analyzer reads the token stream produced by the lexical analyzer and checks whether the arrangement of these tokens conforms to the grammatical provisions of the language according to the rules of the grammar. This process usually involves finding patterns in the token sequence, which correspond to the production rules in the grammar. If the token stream conforms to the rules defined by the grammar, the source code is considered to be grammatically correct; otherwise, the compiler will report a syntax error. Grammar rules are usually expressed as production rules in the form of ,in is a non-terminal symbol, representing a certain grammatical structure. It is a sequence of non-terminal symbols and terminal symbols (i.e., basic symbols, such as keywords, operators, etc.). Compiler designers fully describe the grammar of a programming language by defining a series of such productions. These rules not only guide the compiler on how to recognize and build language structures, but also help maintain code consistency and perform effective error detection. Optionally, use Bison to build a syntax analyzer. After using the syntax analyzer to obtain the abstract syntax tree, traverse the abstract syntax tree from the root node to obtain a flowchart.

[0045] The digital employee generation method provided by the embodiment of the present invention integrates the core links of compilation principles such as lexical analysis, syntax analysis, syntax guidance and translation scheme, and realizes the automatic conversion from code to flow chart.

[0046] Based on any of the above embodiments, before inputting the digital employee code and the natural language instruction into the pre-trained large language model to obtain the modified digital employee code output by the large language model, the method further includes: Acquire a sample data set, the sample data set comprising multiple sets of sample data, any set of sample data in the multiple sets of sample data comprising original code, natural language instructions and modified code; Amplifying the sample data set to obtain a training data set; Based on the training data set, the large language model is fine-tuned to obtain the pre-trained large language model.

[0047] Large Language Models (LLMs), such as OpenAI's GPT series, represent a state-of-the-art technology in the field of Natural Language Processing (NLP). These models are usually based on the Transformer architecture and have the ability to process and generate natural language text. Large language models learn the deep grammatical and semantic regularities of language by pre-training on large-scale text datasets. The pre-training stage mainly involves self-supervised learning tasks such as masked language models, in which the model predicts words that are randomly masked in the text. This training method enables large language models to capture subtle associations and complex structures in language.

[0048] Fine-tuning is a common technique used to adapt a large pre-trained language model to a specific application scenario. In the fine-tuning phase, the model continues to be trained on a smaller but highly specialized dataset based on pre-training to adapt to a specific task or domain, such as sentiment analysis, legal document analysis, or medical record interpretation. This process involves adjusting the parameters of the model to optimize the response to specific data, thereby improving performance on a specific task. Fine-tuning can be thought of as increasing the model's sensitivity to domain-specific knowledge while retaining large-scale general knowledge.

[0049] The application of large language models and fine-tuning techniques is of great significance, as they can significantly improve the efficiency and accuracy of various natural language processing tasks. For example, in the fields of automatic translation, content generation, summary generation, etc., accurately fine-tuned models can generate more natural and accurate text output. In addition, these technologies have also promoted the development of natural language understanding and interactive machine learning systems, such as intelligent assistants and customer service robots, which can better understand and respond to the needs of human users.

[0050] In an embodiment of the present invention, the training of the large language model starts from the data collection stage. The data set is manually written, and each data is divided into three parts: original code, user instructions, and modified code. The programming language used by the platform is a subset of the C language, so training can be completed with less data. For different code modification and code writing scenarios, multiple dialogue samples, such as 1,000, are written. After the data set is built, the content is manually reviewed to ensure that the data set is completely correct. In addition, by amplifying the dialogue samples using synonym conversion, 1,000 dialogue samples can be expanded to more than 10,000 dialogue samples.

[0051] Optionally, Llama3 can be fine-tuned using instruction fine-tuning techniques, such as using LoRA technology, to obtain a pre-trained large language model in about one day on a single A100.

[0052] To sum up, the digital employee generation method provided by the present invention can serve a variety of application scenarios. The construction of digital employees is no longer limited to a single task. In the flowchart mode, the low-code development feature allows non-professional users to quickly build digital employees by dragging components, which greatly reduces the technical threshold and accelerates the popularization of digital employees. By integrating the large language model with the traditional programming method, it not only supports professional users to quickly develop complex logic in the form of code, but also allows users to use natural language instructions to adjust the behavior of digital employees, which not only shortens the development cycle, but also enhances the flexibility and adaptability of the system, and can be adjusted instantly according to business needs. It integrates the core links of compilation principles such as lexical analysis, grammatical analysis, grammar guidance and translation schemes, and realizes the automatic conversion from code to flowchart. This process not only improves the construction efficiency, but also improves the code quality with the help of intelligent code suggestions and logic optimization provided by the AI ​​model.

[0053] The digital employee generating device provided by an embodiment of the present invention is described below. The digital employee generating device described below and the digital employee generating method described above can be referenced to each other.

[0054] Figure 2 is a structural diagram of a digital employee generating device provided by the present invention, such as Figure 2 As shown, the digital employee generating device may include but is not limited to; A flowchart generating module 210, for generating a flowchart based on a user's dragging operation; A code generation module 220, for traversing the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; The instruction receiving module 230 is used to receive the natural language instruction input by the user; The code adjustment module 240 is used to input the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

[0055] It should be noted that the digital employee generation device provided in the embodiment of the present invention can execute the digital employee generation method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0056] The digital employee generation system provided by the embodiment of the present invention is described below. The digital employee generation system described below and the digital employee generation method described above can be referred to each other. The digital employee generation system includes: A programming mode, in which a programming interface is displayed for a user to write code; Flowchart mode: in the flowchart mode, a visual flowchart design tool is displayed to provide a flowchart drag component for the user to drag and drop to generate a flowchart.

[0057] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the digital employee generation method, which includes: generating a flow chart based on the user's drag operation; traversing the flow chart based on a preset traversal algorithm to generate a digital employee code corresponding to the flow chart; receiving a natural language instruction input by the user; inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

[0058] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0059] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the digital employee generation method provided by the above-mentioned methods, and the method includes: generating a flowchart based on the user's drag operation; traversing the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; receiving a natural language instruction input by the user; inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

[0060] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the digital employee generation method provided by the above-mentioned methods, the method comprising: generating a flowchart based on the user's drag operation; traversing the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; receiving a natural language instruction input by the user; inputting the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

[0061] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0062] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating digital employees, characterized in that: include: Generate a flowchart based on the user's drag operation; Based on a preset traversal algorithm, the flowchart is traversed to generate a digital employee code corresponding to the flowchart; Receiving a natural language instruction input by the user; The digital employee code and the natural language instruction are input into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

2. The method for generating digital employees according to claim 1, characterized in that: After inputting the digital employee code and the natural language instruction into the pre-trained large language model to obtain the modified digital employee code output by the large language model, the method further includes: Inputting the digital employee code into a compiler for checking to obtain a checking result; If the inspection result indicates that there is an error in the digital employee code, the corresponding error report is supplemented and input into the large language model to obtain the corrected digital employee code output by the large language model, and then the process returns to the step of inputting the digital employee code into the compiler for inspection to obtain the inspection result.

3. The method for generating digital employees according to claim 2, characterized in that: After the digital employee code is input into the compiler for checking and the checking result is obtained, the method further includes: If the checking result is correct, compiling the digital employee code; Convert said digital employee code into a control flow graph.

4. The method for generating digital employees according to claim 3, characterized in that: The converting the digital employee code into a control flow chart comprises: Decomposing the digital employee code into lexical units tokens; Based on the lexical units tokens, construct an abstract syntax tree; The abstract syntax tree is converted into a control flow graph.

5. The method for generating a digital employee according to any one of claims 1 to 4, characterized in that: Before inputting the digital employee code and the natural language instruction into the pre-trained large language model to obtain the modified digital employee code output by the large language model, the method further includes: Acquire a sample data set, the sample data set comprising multiple sets of sample data, any set of sample data in the multiple sets of sample data comprising original code, natural language instructions and modified code; Amplifying the sample data set to obtain a training data set; Based on the training data set, the large language model is fine-tuned to obtain the pre-trained large language model.

6. A digital employee generation device, characterized in that: include: A flowchart generation module is used to generate a flowchart based on the user's drag operation; A code generation module, used to traverse the flowchart based on a preset traversal algorithm to generate a digital employee code corresponding to the flowchart; An instruction receiving module, used for receiving a natural language instruction input by the user; The code adjustment module is used to input the digital employee code and the natural language instruction into a pre-trained large language model to obtain a modified digital employee code output by the large language model.

7. A digital employee generation system, characterized in that: The method for generating digital employees according to claim 1 is applied, comprising: A programming mode, in which a programming interface is displayed for a user to write code; Flowchart mode: in the flowchart mode, a visual flowchart design tool is displayed to provide a flowchart drag component for the user to drag and drop to generate a flowchart.

8. 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, the method for generating a digital employee according to any one of claims 1 to 5 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a digital employee according to any one of claims 1 to 5 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for generating a digital employee according to any one of claims 1 to 5 is implemented.