Multi-program language workflow generation method and device
Through multi -language natural semantic identification and deep learning technology, workflow data is split and feature extraction, generate workflow split models, solve the problem of cross -language and cross -platform work, and achieve efficient and automated workflow code. generate.
Patent Information
- Application Number
- CN202411243672.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-01-24
AI Technical Summary
It is difficult for the prior art to effectively generate cross-language and cross-platform workflows, and traditional methods rely on manual coding, which is time-consuming and labor-intensive, and difficult to share and reuse workflows.
By setting a multi-language natural semantic recognition algorithm, the historical workflow data is split, the operation unit and the state unit are extracted, and the attention sequence modeling model, graph neural network and cross-modal attention algorithm are used for feature extraction and fusion. Generate workflow semantic features, and finally generate a workflow split model through supervised learning training to achieve automated code generation of the target workflow.
It improves the accuracy and efficiency of multi-programming language workflow generation, reduces manual intervention, and realizes workflow automation and reusability.
Smart Images

Figure CN119356667A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a method and device for generating a workflow in multiple programming languages. Background Art
[0002] With the rapid development of information technology, enterprises and organizations increasingly rely on complex workflows to manage and optimize their business processes. These workflows often involve multiple systems, different programming languages, and various data formats, making the design, implementation, and maintenance of workflows complicated. Traditional workflow management systems are often limited to a single programming language or a specific technology stack, making it difficult to adapt to the diverse and rapidly changing needs of modern enterprises.
[0003] Currently, the design and implementation of workflows mainly rely on manual coding and configuration. This method is not only time-consuming and labor-intensive, but also prone to errors, especially when dealing with complex workflows across languages and platforms. In addition, due to the lack of a unified representation method, workflows between different languages and platforms are difficult to share and reuse, resulting in a lot of duplication of work.
[0004] In order to solve these problems, some researchers have begun to explore methods for automated workflow generation. Among them, workflow learning and generation based on historical data has become an important research direction. This method attempts to automatically generate new workflows by analyzing existing workflow data. However, how to effectively represent and learn cross-language and cross-platform workflows remains a challenge.
[0005] The development of natural language processing technology has provided new possibilities for the semantic understanding of workflows. By using multilingual natural semantic recognition algorithms, a unified understanding of workflows written in different programming languages can be achieved. However, how to effectively convert this semantic understanding into executable program code still requires further research.
[0006] Deep learning techniques, especially attention mechanisms and sequence modeling, perform well in processing sequence data. These techniques are introduced into the field of workflow processing to capture long-term dependencies and complex interactions in workflows. However, how to combine these techniques with traditional workflow representation methods remains an open problem.
[0007] Graph neural networks have been widely used in recent years. They can effectively process data with graph structures. Workflows can essentially be regarded as a special graph structure, so graph neural networks provide new ideas for modeling and learning workflows. However, how to design a graph neural network structure suitable for the characteristics of workflows, and how to effectively integrate graph structure learning with the features of other modalities, still need further exploration.
[0008] Cross-modal learning is a hot research topic in the field of artificial intelligence in recent years. In workflow processing, how to effectively integrate information from different modalities (such as text, graph structure, program syntax, etc.) to obtain a more comprehensive workflow representation is a problem worth studying.
[0009] In addition, existing workflow generation methods often lack in-depth consideration of the characteristics of different programming languages. How to generate optimized code for different target programming languages while maintaining the semantic consistency of the workflow is an unresolved challenge. Summary of the invention
[0010] In view of the problems in the prior art, the present application provides a method and device for generating a workflow in multiple programming languages, which can effectively improve the accuracy and efficiency of generating a workflow in multiple programming languages.
[0011] In order to solve at least one of the above problems, the present application provides the following technical solutions:
[0012] In a first aspect, the present application provides a workflow generation method for multiple programming languages, comprising:
[0013] By setting a multilingual natural semantic recognition algorithm to split the historical workflow data, corresponding operation units and state units are obtained, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units;
[0014] The operation unit and the state unit are set as a model training set and input into the encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, the extracted semantic features are input into a set graph neural network model to perform graph structure learning, and the graph structure perception features of each node in the graph neural network model are obtained, and the semantic features and the graph structure perception features are feature fused through a preset cross-modal attention algorithm to obtain workflow semantic features, and the workflow semantic features, the operation unit and the state unit are input into a preset initial classification model to perform end-to-end supervised learning training to obtain a trained workflow splitting model;
[0015] Receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
[0016] Furthermore, the historical workflow data is split by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, including:
[0017] By setting a multilingual natural semantic recognition algorithm to perform semantic recognition on historical workflow data, the corresponding operation behavior and object entity are obtained;
[0018] Two types of semantic elements, namely, operation units and state units, are determined according to the operation behavior and the object entity.
[0019] Furthermore, the operation unit and the state unit are set as a model training set and input into an encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, including:
[0020] Inputting the operation unit and the state unit as an input set of supervised training data into an encoder of a preset attention sequence modeling model;
[0021] Multi-level feature extraction and semantic modeling are performed through the attention sequence modeling model to obtain a feature vector containing workflow semantic information output by the attention sequence modeling model.
[0022] Furthermore, the extracted semantic features are input into a set graph neural network model for graph structure learning to obtain graph structure perception features of each node in the graph neural network model, including:
[0023] The extracted semantic features are input into a preset graph neural network model for graph structure learning and feature extraction, and the operation units and state units in the workflow are represented as nodes on the graph.
[0024] Through multi-level message propagation and feature aggregation, a graph structure-aware feature vector learned by each node in the graph neural network model is obtained.
[0025] Furthermore, the semantic features and the graph structure perception features are fused by a preset cross-modal attention algorithm to obtain workflow semantic features, including:
[0026] Inputting the graph structure feature as a query vector and the semantic feature as a value vector into a preset cross-modal attention algorithm;
[0027] The preset cross-modal attention algorithm is used to dynamically assign weights to different feature modalities, and the fused workflow semantic features are calculated.
[0028] Furthermore, the workflow semantic features, the operation unit, and the state unit are input into a preset initial classification model for end-to-end supervised learning training to obtain a trained workflow splitting model, including:
[0029] Using the workflow semantic features as input of a preset initial classification model, and using the operation unit and the state unit as supervision target labels of the preset initial classification model;
[0030] The parameters of the preset initial classification model are optimized and trained to obtain a trained workflow splitting model.
[0031] Further, the step of obtaining the workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit includes:
[0032] Match the target operation units with the preset function code library respectively, find the specific function code fragments corresponding thereto, and associate the target state unit with the preset logic code library to determine the corresponding control flow code fragments;
[0033] According to the sequence and dependency relationship between the operation unit and the state unit, the specific function code fragment and the control flow code fragment are organically combined and arranged to generate a complete program code corresponding to the target workflow.
[0034] In a second aspect, the present application provides a workflow generation device for multiple programming languages, comprising:
[0035] A workflow splitting module is used to split the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units;
[0036] An intelligent classification module is used to set the operation unit and the state unit as a model training set and input them into an encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, input the extracted semantic features into a set graph neural network model to perform graph structure learning, obtain graph structure perception features of each node in the graph neural network model, and perform feature fusion of the semantic features and the graph structure perception features through a preset cross-modal attention algorithm to obtain workflow semantic features, input the workflow semantic features, the operation unit and the state unit into a preset initial classification model to perform end-to-end supervised learning training, and obtain a trained workflow splitting model;
[0037] A target program generation module is used to receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
[0038] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the multi-program language workflow generation method when executing the program.
[0039] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the multi-programming language workflow generation method.
[0040] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the workflow generation method in multiple programming languages.
[0041] It can be seen from the above technical scheme that the present application provides a workflow generation method and device for multiple programming languages, which splits historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and status units, wherein the operation unit is used to characterize each specific operation in the workflow, and the status unit is used to characterize the dependency relationship between the operation units; receiving a target workflow conversion request sent by a user, outputting the target workflow in the target workflow conversion request to a workflow splitting model, obtaining a target operation unit and a target status unit output by the workflow splitting model, and obtaining a workflow target program code corresponding to the target workflow according to a combination of a function code in a preset function code library corresponding to the target operation unit and a logic code in a preset logic code library corresponding to the target status unit, thereby effectively improving the accuracy and efficiency of workflow generation in multiple programming languages. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1This is one of the flowcharts of the method for generating a workflow in multiple programming languages in an embodiment of the present application;
[0044] Figure 2 This is a second flowchart of the method for generating a workflow in multiple programming languages in an embodiment of the present application;
[0045] Figure 3 The third flowchart of the method for generating a workflow in multiple programming languages in an embodiment of the present application;
[0046] Figure 4 This is a fourth flowchart of the method for generating a workflow in multiple programming languages in an embodiment of the present application;
[0047] Figure 5 This is a fifth flowchart of the method for generating a workflow in multiple programming languages in an embodiment of the present application;
[0048] Figure 6 This is the sixth flowchart of the method for generating a workflow in multiple programming languages in an embodiment of the present application;
[0049] Figure 7 This is the seventh flowchart of the method for generating a workflow in multiple programming languages in an embodiment of the present application;
[0050] Figure 8 A structural diagram of a workflow generation device for multiple programming languages in an embodiment of the present application;
[0051] Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0052] Reference numerals:
[0053] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0056] In view of the problems existing in the prior art, the present application provides a workflow generation method and device for multiple programming languages, which splits historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and status units, wherein the operation unit is used to characterize each specific operation in the workflow, and the status unit is used to characterize the dependency relationship between the operation units; a target workflow conversion request sent by a user is received, and the target workflow in the target workflow conversion request is output to a workflow splitting model to obtain the target operation unit and the target status unit output by the workflow splitting model, and the workflow target program code corresponding to the target workflow is obtained according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target status unit, thereby effectively improving the accuracy of workflow generation in multiple programming languages.
[0057] In order to effectively improve the accuracy and efficiency of multi-programming language workflow generation, the present application provides an embodiment of a multi-programming language workflow generation method, see Figure 1 The multi-programming language workflow generation method specifically includes the following contents:
[0058] Step S101: splitting the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units;
[0059] Optionally, in this embodiment, first, we set a multilingual natural semantic recognition algorithm. The core of this algorithm is that it can understand and process workflow descriptions in multiple languages, which is particularly important for workflow management in multinational companies or multilingual environments. The algorithm uses the latest technologies in deep learning and natural language processing, including but not limited to transformer architecture, BERT model, etc., to ensure accurate understanding and processing of various language expressions.
[0060] In the specific implementation process, the algorithm will first pre-process the input historical workflow data. This includes steps such as text cleaning, word segmentation, and part-of-speech tagging. For input in different languages, the algorithm will automatically identify the language type and call the corresponding language model for processing. This multi-language processing capability greatly improves the algorithm's scope of application and practicality.
[0061] After preprocessing, the algorithm will use the pre-trained semantic understanding model to conduct an in-depth analysis of the workflow description. During this process, the algorithm will identify key actions, objects, conditions and other elements in the description. Through the combined analysis of these elements, the algorithm can accurately identify each specific operation in the workflow and mark it as an operation unit.
[0062] The identification of operation units is one of the keys to this step. Each operation unit represents an independent and complete task or action in the workflow. For example, in a document approval process, "submit document", "review document", "approve document", etc. may all be identified as independent operation units. The algorithm accurately defines these operation units by analyzing verbs, objects, and contextual information.
[0063] At the same time, the algorithm also analyzes the logical and temporal relationships between these operation units to identify state units. State units are used to characterize the dependencies between the operation units, and they define the structure and execution order of the workflow. For example, "Document Submitted" may be the pre-state of "Document Reviewed", and "Document Reviewed" may be the pre-state of "Document Approved".
[0064] In the process of identifying state units, the algorithm pays special attention to language features such as conditional statements, time expressions, and causal relationships. By analyzing these features, the algorithm can construct a complete workflow state transition diagram, clearly showing the dependencies between various operation units.
[0065] This approach of splitting workflows into operation units and state units solves several key technical problems faced in traditional workflow analysis. First, it improves the accuracy and granularity of workflow analysis. By accurately identifying each operation and state, we are able to understand the structure and logic of the workflow in more detail. Second, this approach greatly enhances the interpretability of workflow analysis. Each operation unit and state unit has a clear semantic meaning, which is easy for humans to understand and verify. Finally, this approach provides a solid foundation for subsequent workflow optimization and automation.
[0066] In terms of technical effects, this workflow splitting method based on multilingual natural semantic recognition has brought significant improvements. First, it greatly improves the efficiency of workflow analysis. Compared with traditional manual analysis methods, this automated method can process a large amount of historical workflow data in a short time, greatly reducing labor and time costs.
[0067] Secondly, this method significantly improves the accuracy of workflow analysis. Through advanced natural language processing technology, the algorithm can capture details and implicit logical relationships that humans may overlook, thereby providing a more comprehensive and accurate analysis of workflow structure.
[0068] Furthermore, the multi-language support feature of this method makes it easy to cope with complex workflow scenarios in a global context. Whether it is a multi-language workflow of a multinational company or an international cooperation project that needs to process descriptions in multiple languages, this method can provide consistent and high-quality analysis results.
[0069] Finally, by splitting the workflow into operation units and state units, this approach lays the foundation for subsequent workflow optimization, automation, and intelligence. For example, we can build a workflow simulation system based on these units to predict possible bottlenecks; or use these units to design an intelligent recommendation system to provide users with suggestions for the next step.
[0070] In general, this workflow data splitting method based on multilingual natural semantic recognition algorithm not only solves the efficiency and accuracy problems in traditional workflow analysis, but also provides new possibilities for further optimization and intelligence of workflows.
[0071] Step S102: The operation unit and the state unit are set as a model training set and input into the encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, the extracted semantic features are input into a set graph neural network model to perform graph structure learning, and the graph structure perception features of each node in the graph neural network model are obtained, and the semantic features and the graph structure perception features are feature fused through a preset cross-modal attention algorithm to obtain workflow semantic features, and the workflow semantic features, the operation unit and the state unit are input into a preset initial classification model to perform end-to-end supervised learning training to obtain a trained workflow splitting model;
[0072] Optionally, in this embodiment, we will describe in detail a complex workflow semantic feature extraction and model training method. This method combines multiple advanced machine learning techniques to build an efficient and accurate workflow splitting model. This process involves cutting-edge technologies in multiple fields such as attention mechanism, graph neural network, and cross-modal learning.
[0073] First, we take the operation units and state units obtained in the previous step as input data. These units contain the basic structure and semantic information of the workflow, which is the basis for subsequent processing. We use an encoder of a preset attention sequence modeling model to process these input data. This encoder is usually based on the Transformer architecture, which can effectively capture long-distance dependencies in sequence data.
[0074] In the encoder, we perform semantic feature extraction on the input operation units and state units. This process utilizes the self-attention mechanism, which enables the model to dynamically adjust the degree of attention to different input elements based on the context. For example, when processing a complex approval process, the model may pay more attention to the state units of key decision points, thereby better understanding the structure of the entire process.
[0075] Next, we input the extracted semantic features into a pre-set graph neural network (GNN) model. The introduction of the graph neural network model is to better capture the complex relationships between units in the workflow. In GNN, each operation unit and state unit is represented as a node in the graph, and the dependencies between them are represented as edges.
[0076] The graph neural network model learns the graph structure through a message passing mechanism. In this process, each node not only considers its own characteristics, but also considers the information of other nodes connected to it. This learning method enables the model to obtain the graph structure perception characteristics of each node. For example, for an approval node, its graph structure perception characteristics not only include its own attributes, but also include the information of the previous and subsequent nodes, thereby more comprehensively expressing the role and importance of the node in the entire workflow.
[0077] In order to make full use of semantic features and graph structure-aware features, we introduced a preset cross-modal attention algorithm. The core idea of this algorithm is to let the features of two different modalities "pay attention" to each other, so as to achieve more effective feature fusion. Specifically, semantic features may be better at expressing the intrinsic meaning of a single operation or state, while graph structure-aware features are better at expressing the position and relationship of nodes in the overall workflow. Through the cross-modal attention mechanism, we can create a more comprehensive and rich feature representation while retaining the respective advantages of the two features.
[0078] The result of this feature fusion is what we call workflow semantic features. This feature integrates the semantic information of operation units and state units, their position information in the workflow graph structure, and the complex dependencies between them. It provides a strong foundation for subsequent workflow analysis and optimization.
[0079] Finally, we input the obtained workflow semantic features, together with the original operation units and state units, into a preset initial classification model. This model is trained using an end-to-end supervised learning approach. During the training process, the model learns how to accurately identify and classify the various components in the workflow based on the input features.
[0080] This end-to-end training approach has several significant advantages. First, it allows the model to automatically adjust the parameters of each processing stage during training to achieve the best overall performance. Second, it can make full use of labeled data and directly learn the mapping relationship from input to target output. Finally, this approach also facilitates the deployment and use of the model because the entire processing flow is encapsulated in a unified model.
[0081] Through this training process, we finally obtained a trained workflow splitting model. This model integrates multiple advanced technologies such as attention mechanism, graph neural network, cross-modal learning, etc., and can effectively understand and disassemble complex workflow structures.
[0082] This method solves several key technical problems faced in traditional workflow analysis. First, it can better handle long-distance dependencies. In complex workflows, some operations may be affected by states from a long time ago. Traditional methods often have difficulty capturing such relationships, while attention mechanisms and graph neural networks can effectively solve this problem.
[0083] Secondly, this approach greatly improves the model’s ability to understand the structure of the workflow. By representing the workflow as a graph structure and using graph neural networks for learning, the model can better understand the role and importance of each operation and state in the entire workflow.
[0084] Furthermore, the introduction of the cross-modal attention algorithm enables the model to more comprehensively utilize different types of feature information. This approach not only improves the efficiency of feature utilization, but also enhances the robustness of the model, enabling it to better cope with various complex workflow scenarios.
[0085] In terms of technical effects, this method has brought significant improvements. First, it greatly improves the accuracy of workflow splitting. Compared with traditional methods, this deep learning-based method can capture more subtle patterns and regularities, thus providing high-quality splitting results in various complex scenarios.
[0086] Secondly, this method has strong generalization ability. By training on a large amount of diverse workflow data, the model can learn the general rules of workflows, so that it can still perform well when faced with new and unseen workflows.
[0087] Finally, this method provides a solid foundation for subsequent workflow optimization and automation. Based on the trained workflow splitting model, we can further develop advanced applications such as workflow optimization recommendation system and anomaly detection system, thereby promoting the entire workflow management field to a smarter and more efficient direction.
[0088] In general, this workflow splitting model training method that integrates multiple advanced machine learning techniques represents an important breakthrough in the field of workflow analysis. It not only solves many challenges faced by traditional methods, but also opens up new possibilities for intelligent management of workflows.
[0089] Step S103: Receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
[0090] Optionally, in this embodiment, we will describe in detail a method for converting a user's target workflow into executable program code based on a previously trained workflow splitting model. This process involves multiple key steps such as model reasoning, code base matching, and code combination, aiming to achieve automation and programming of workflows.
[0091] First, the system receives a target workflow conversion request sent by the user. This request usually contains a detailed description of the target workflow that the user wants to convert into program code. This description may be in text form or in some standardized workflow representation format. The system needs to be able to handle a variety of possible input formats to provide maximum flexibility and user-friendliness.
[0092] After receiving the request, the system inputs the target workflow into the previously trained workflow splitting model. This model has been trained with a large amount of historical workflow data in the previous steps and has a strong ability to understand and split workflows. The model will analyze and process the input target workflow and output the corresponding target operation unit and target state unit.
[0093] The target operation unit represents a specific operation or task in the workflow. For example, in a document processing workflow, "scanning documents", "OCR recognition", "data extraction", etc. may all be operation units. Each operation unit has its specific functions and execution conditions.
[0094] The target state unit represents the transition conditions and dependencies between the operations in the workflow. For example, "document scanning completed" may be a prerequisite for the start of "OCR recognition", and "OCR recognition completed" may be a prerequisite for "data extraction". These state units define the execution logic and process control of the workflow.
[0095] After obtaining these target operation units and target state units, the system will search for matching code segments in the preset function code library and logic code library. The function code library stores the implementation codes of various common operations, while the logic code library stores the codes of various process controls and state transitions.
[0096] For each target operation unit, the system searches for the corresponding function code in the function code library. This process may involve fuzzy matching or semantic matching, because the operation described by the user may not be exactly the same as the function name in the code library. For example, the "scan document" operation described by the user may match the "document_scan()" function in the code library.
[0097] Similarly, for each target state unit, the system will search for the corresponding logic code in the logic code library. These codes usually include process control statements such as conditional judgments and loop structures. For example, the state of "document scanning completed" may correspond to a conditional statement that checks the scanning results.
[0098] After finding all the necessary code segments, the system starts to combine these codes to generate the final workflow target program code. This combination process needs to consider the dependencies between operations to ensure that the generated code can correctly implement the logic of the workflow. For example, the system needs to ensure that the "scan document" function has been executed and the scan results have been checked before calling the "OCR recognition" function.
[0099] During the code assembly process, the system also needs to deal with some details. For example, it needs to correctly handle the scope of variables to ensure that data can be correctly passed between different operations. At the same time, the system also needs to generate appropriate error handling and exception catching code to improve the robustness of the generated program.
[0100] The final generated workflow target program code is a complete and executable program. It contains all the functional codes and control logic required to implement the target workflow and can automatically execute the entire workflow described by the user.
[0101] This method solves several key technical problems faced in traditional workflow automation. First, it greatly improves the automation of workflow to program code conversion. Traditional methods usually require programmers to manually write code to implement workflows, while this method can automatically generate most of the code, greatly improving efficiency.
[0102] Secondly, this approach improves the quality and consistency of the generated code. Since a pre-defined and tested code base is used, the generated code is usually of high quality and reliability. At the same time, for similar workflows, the generated code will also have a consistent structure and style, which is conducive to later maintenance and optimization.
[0103] Furthermore, this approach is highly flexible and scalable. By updating and expanding the functional code base and the logic code base, the system can continuously adapt to new needs and scenarios and handle increasingly complex workflows.
[0104] In terms of technical effects, this approach has brought significant improvements. First, it has greatly improved the efficiency of workflow automation. Users only need to describe their workflows, and the system can quickly generate the corresponding program code, greatly reducing the time from requirements to implementation.
[0105] Secondly, this method lowers the technical threshold of workflow automation. Even users who do not understand programming can obtain executable program code by describing their workflow, which greatly expands the application scope of workflow automation.
[0106] Finally, this approach improves the standardization of workflow implementations. Due to the use of a unified code base and generation logic, similar workflows implemented by different people or at different times will produce similar code, which is beneficial to the overall consistency and maintainability of the system.
[0107] In general, this automatic code generation method based on workflow split model and code base represents an important progress in the field of workflow automation. It not only greatly improves the efficiency and quality of workflow-to-program conversion, but also opens up new ways for the intelligent and automated implementation of workflows. The application of this method is expected to bring revolutionary changes in various fields that require frequent customization and updating of workflows, such as enterprise process management and automated testing.
[0108] From the above description, it can be seen that the workflow generation method for multiple programming languages provided in the embodiment of the present application can split the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to characterize each specific operation in the workflow, and the state unit is used to characterize the dependency relationship between the operation units; receive the target workflow conversion request sent by the user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit, thereby effectively improving the accuracy of multi-programming language workflow generation.
[0109] In one embodiment of the workflow generation method for multiple programming languages of the present application, see Figure 2 , and can also include the following:
[0110] Step S201: performing semantic recognition on historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation behaviors and object entities;
[0111] Step S202: determining two types of semantic elements, namely, operation units and state units, according to the operation behavior and the object entity.
[0112] Optionally, this embodiment provides an innovative workflow semantic analysis method, which achieves a deep understanding and structured representation of historical workflow data through two key steps: multilingual natural semantic recognition and semantic element classification. This method can not only process workflow descriptions in a multilingual environment, but also accurately identify and classify key semantic elements in the workflow, laying a solid foundation for subsequent workflow optimization and automation.
[0113] First, in step S201, the system uses an advanced multilingual natural semantic recognition algorithm. The core of this algorithm is a deep learning model trained on large-scale multilingual data, which may be based on the Transformer architecture, such as multilingual BERT or XLM-RoBERTa. This model can understand and process workflow descriptions in multiple languages, which is particularly important for multinational companies or scenarios that need to process multilingual workflows. For example, in an international manufacturing company, there may be workflows described in multiple languages such as Chinese, English, and German. The algorithm can uniformly process descriptions in these different languages and extract consistent semantic information.
[0114] The algorithm goes beyond simple keyword matching to deeply understand the semantic structure of sentences. It can handle synonyms, ambiguous words, and accurately understand the meaning of words based on context. For example, in the phrases "audit report" and "check file", the algorithm can understand that "audit" and "check" are similar operational behaviors in this context, while "report" and "file" are similar object entities.
[0115] The output of the algorithm is the operation behavior and object entity in the workflow description. Operation behavior is usually a verb or a verb phrase, which indicates a specific action in the workflow. For example, in the phrase "submit an application form", "submit" is an operation behavior. Object entity is usually a noun or a noun phrase, which indicates the object of the operation. In the same example, "application form" is an object entity.
[0116] This fine-grained semantic recognition provides rich information for subsequent analysis. For example, in a complex workflow description, "the sales representative generates a quotation, the manager reviews the quotation, and then sends it to the customer", the algorithm can identify the operation behaviors of "generate", "review", and "send", as well as the object entities of "sales representative", "manager", "quotation", and "customer". This precise recognition provides detailed and structured information for subsequent workflow modeling and optimization.
[0117] In step S202, the system further determines two types of semantic elements, namely, operation units and state units, based on the operation behaviors and object entities identified in the previous step. The purpose of this step is to transform the original semantic information into a more structured and standardized form to facilitate subsequent workflow analysis and modeling.
[0118] An operation unit usually consists of an operation behavior and related object entities, representing a specific task or activity in a workflow. For example, "generate a quotation" can be identified as an operation unit, where "generate" is an operation behavior and "quote" is an object entity. The determination of operation units needs to consider context and domain knowledge, because sometimes a complete operation may require a combination of multiple operation behaviors and object entities.
[0119] A state unit usually describes a state or condition of an object entity and is used to represent conditional judgment or phase transition in a workflow. For example, "Quotation has been reviewed" can be identified as a state unit. The identification of a state unit often requires analyzing the results or impact of an operation unit, and sometimes requires inferring implicit state changes.
[0120] When determining these two types of semantic elements, the system also needs to analyze the relationship between them. For example, the operation unit "generate quotation" will lead to the generation of the status unit "quotation pending review", while the operation unit "review quotation" will change the status to "quotation reviewed". The identification of this relationship is crucial to understanding the logical structure of the entire workflow.
[0121] This approach solves several key problems faced in traditional workflow analysis. First, it can effectively handle unstructured text descriptions, which are very common in practical applications. The workflows of many companies are often described in natural language rather than standardized flowcharts. Second, this approach can handle multilingual environments, which is very important for multinational companies or scenarios that need to process multilingual documents. Third, through fine-grained semantic analysis, this approach can capture the details and complex relationships in the workflow, providing rich information for subsequent optimization.
[0122] In terms of technical effects, this approach has brought significant improvements. First, it improves the degree of automation of workflow analysis. Traditional methods often require manual reading and interpretation of workflow descriptions, while this approach can automatically extract key information, greatly improving efficiency. Second, this approach improves the accuracy and consistency of workflow analysis. By using unified algorithms and standards, different analysts or analyses conducted at different times can obtain consistent results. Finally, this approach provides a solid foundation for workflow optimization and automation. By accurately identifying operation units and state units, the system can better understand the structure and logic of the workflow, thereby providing support for subsequent advanced applications such as process optimization and anomaly detection.
[0123] In general, this workflow analysis method based on multilingual natural semantic recognition and semantic element classification represents an important progress in the field of workflow management. It not only solves the problems of language barriers and unstructured data processing faced by traditional methods, but also opens up new possibilities for intelligent management of workflows. With this approach, enterprises can better understand, optimize and automate their business processes, thereby improving operational efficiency, reducing costs and enhancing competitiveness.
[0124] In one embodiment of the workflow generation method for multiple programming languages of the present application, see Figure 3 , and can also include the following:
[0125] Step S301: inputting the operation unit and the state unit as an input set of supervised training data into an encoder of a preset attention sequence modeling model;
[0126] Step S302: Perform multi-level feature extraction and semantic modeling through the attention sequence modeling model to obtain a feature vector containing workflow semantic information output by the attention sequence modeling model.
[0127] Optionally, this embodiment introduces an innovative workflow semantic modeling method, which uses a preset attention sequence modeling model to perform deep semantic analysis and feature extraction on the operation units and state units in the workflow. This method can not only capture the complex semantic relationships in the workflow, but also generate high-quality feature vectors, providing strong support for subsequent workflow analysis and optimization.
[0128] In step S301, the system inputs the previously identified operation units and state units as the input set of supervised training data into the encoder of the preset attention sequence modeling model. The attention sequence modeling model here is likely to be a deep learning model based on the Transformer architecture, such as BERT or its variants. The reason for choosing this model is its powerful sequence processing capabilities and effective modeling of long-distance dependencies.
[0129] The input operation unit and status unit form a sequence, and each unit can be regarded as an element in the sequence. For example, for a simple purchase approval workflow, the input sequence may be: ["Submit purchase requisition" (operation unit), "Purchase requisition to be reviewed" (status unit), "Review purchase requisition" (operation unit), "Purchase requisition reviewed" (status unit), "Generate purchase order" (operation unit)]. This input method retains the order information of each step in the workflow, which is crucial for understanding the logic of the entire process.
[0130] The encoder part of the model uses a multi-head self-attention mechanism to process the input sequence. The self-attention mechanism allows the model to consider the context of the entire sequence when processing each input element. This means that the model can capture long-range dependencies. For example, the "Generate Purchase Order" action unit may pay close attention to the "Purchase Requisition Approved" state unit, even if they are not adjacent in the sequence.
[0131] In step S302, the attention sequence modeling model performs multi-level feature extraction and semantic modeling, and finally outputs a feature vector containing workflow semantic information. This process involves calculations and conversions at multiple levels.
[0132] First, each layer of the model transforms and extracts features from the input. Features at lower levels may focus more on local grammatical and lexical information, while features at higher levels may capture more abstract semantic concepts and global relationships. For example, at a lower level, the model may learn that the word "review" is usually followed by an object, while at a higher level, the model may understand that the "review" operation usually changes the state of an object.
[0133] Second, through the multi-head attention mechanism, the model is able to understand the input sequence from different perspectives. Each attention head may focus on different types of relationships or patterns. For example, one attention head may pay special attention to the sequential relationship between operation units, while another attention head may pay more attention to the causal relationship between operation units and state units.
[0134] Thirdly, the model’s feedforward neural network layers perform further nonlinear transformations on the output of the attention mechanism, which helps the model learn more complex features and relationships. For example, the model may learn that certain combinations of operation units usually lead to specific state units.
[0135] Finally, the model generates a high-dimensional feature vector that condenses the semantic information of the entire workflow. This feature vector not only contains the information of each operation unit and state unit, but also encodes the complex relationship between them and the global structure of the entire workflow.
[0136] This method solves several key problems faced in traditional workflow analysis. First, it can effectively handle long sequences and complex dependencies. In actual workflows, the execution of certain operations may depend on a state from a long time ago. Traditional methods may find it difficult to capture such long-distance dependencies, while the attention mechanism can easily handle this situation.
[0137] Second, this approach can automatically learn important features and patterns in workflows without the need for manual feature design. This greatly reduces the reliance on domain expert knowledge and allows the system to more easily adapt to workflows in different domains.
[0138] Furthermore, by generating high-quality feature vectors, this method provides ideal input for various subsequent analysis and optimization tasks. For example, these feature vectors can be used for advanced applications such as workflow similarity calculation, anomaly detection, and process optimization recommendations.
[0139] In terms of technical effects, this approach brings significant improvements. First, it greatly improves the accuracy and comprehensiveness of workflow semantic modeling. Compared with traditional rule-based or simple statistical methods, this deep learning method can capture more subtle and complex semantic relationships.
[0140] Second, this approach has strong generalization capabilities. By training on a large number of different types of workflows, the model can learn the general structure and patterns of workflows, so that it can handle new workflows that have not been seen before. This is especially valuable for companies that need to frequently define new workflows.
[0141] Finally, this approach opens up new possibilities for intelligent management and optimization of workflows. For example, based on the generated feature vectors, the system can automatically identify bottlenecks, redundant steps, or potential optimization opportunities in the workflow. In a manufacturing company, the system may find that certain approval steps often cause delays and recommend streamlining this part of the process.
[0142] In general, this workflow semantic analysis method based on attention sequence modeling represents an important technological breakthrough in the field of workflow management. It not only improves the accuracy and efficiency of workflow analysis, but also provides a powerful tool for intelligent and automated management of workflows. With this approach, companies can better understand and optimize their business processes, improve operational efficiency, and enhance market competitiveness. With the further development and application of this technology, we can expect to see more innovative workflow management solutions to promote digital transformation in all walks of life.
[0143] In one embodiment of the workflow generation method for multiple programming languages of the present application, see Figure 4 , and can also include the following:
[0144] Step S401: input the extracted semantic features into a preset graph neural network model for graph structure learning and feature extraction, and represent the operation units and state units in the workflow as nodes on the graph;
[0145] Step S402: Obtain a graph structure-aware feature vector learned by each node in the graph neural network model through multi-level message propagation and feature aggregation.
[0146] Optionally, this embodiment introduces an innovative workflow modeling method that uses a graph neural network (GNN) model to perform deep structured analysis and feature extraction on the workflow. This method can not only effectively capture the complex relationships between the elements in the workflow, but also generate high-quality structure-aware feature vectors, providing strong support for subsequent workflow analysis, optimization, and automation.
[0147] In step S401, the system inputs the previously extracted semantic features into the preset graph neural network model. The core idea of this step is to represent the workflow as a graph structure, where the operation units and state units are represented as nodes on the graph. This representation method is very suitable for the nature of the workflow, because the workflow itself is a network structure composed of different operations and states.
[0148] For example, consider a simple customer order processing workflow. We may have the following nodes: "Receive Order" (operation unit), "Order Pending" (status unit), "Verify Inventory" (operation unit), "Inventory Adequate" (status unit), "Generate Shipping Note" (operation unit), "Order Shipped" (status unit), etc. The connections between these nodes reflect the logical order and dependencies of the workflow.
[0149] The choice of graph neural network model may be based on advanced GNN architectures such as Graph Attention Network (GAT) or Graph Convolutional Network (GCN). These models can effectively process graph structured data and learn complex relationships between nodes.
[0150] When constructing the graph, the system not only considers direct connections between nodes, but may also introduce some special edge types to represent different types of relationships. For example, there may be edges representing sequential relationships ("receive order" to "verify inventory"), edges representing state transitions ("verify inventory" to "sufficient inventory"), and edges representing dependency relationships ("generate delivery order" depends on "sufficient inventory"). This rich graph structure enables the model to capture various complex relationships in the workflow.
[0151] Step S402 involves the core operations of the graph neural network model: multi-level message propagation and feature aggregation. This process is the key to graph neural network learning node representation.
[0152] First, in the message propagation phase, each node collects information from its neighboring nodes. This process can be seen as the process of nodes "communicating" in the graph. For example, the "Verify Inventory" node may receive information from the "Receive Order" and "Orders Pending" nodes, which helps it understand its position and role in the entire workflow.
[0153] Message propagation usually involves some complex mathematical operations, such as attention mechanisms. Attention mechanisms allow nodes to selectively pay attention to certain neighbors, which is very important for capturing key dependencies in a workflow. For example, the "Generate Shipping Order" node may pay more attention to the information of the "Inventory Adequate" node and less attention to the information of the "Receive Order" node.
[0154] Next comes the feature aggregation phase. In this phase, each node will fuse the information collected from its neighbors with its own features to generate a new node representation. This process usually involves some nonlinear transformations, such as through neural network layers or activation functions. In this way, the node can comprehensively consider local and global information to form a more comprehensive representation.
[0155] This process of message propagation and feature aggregation is repeated multiple times, corresponding to multiple layers of the graph neural network. Each layer enables nodes to obtain a wider range of contextual information. For example, in the first layer, the "generate delivery order" node may only obtain the directly related "stock sufficient" information, but in the deeper layer, it may be able to obtain information about the entire order processing process.
[0156] After multiple layers of processing, each node will eventually learn a graph-structure-aware feature vector. This feature vector not only contains the node’s own information, but also encodes its position and role in the entire workflow graph. For example, the feature vector of the "Generate Shipping Order" node may reflect that it is a key operation node that depends on multiple previous states and directly affects the subsequent shipping process.
[0157] This approach solves several key problems faced in traditional workflow analysis. First, it can effectively model complex relationships and long-distance dependencies in workflows. In actual workflows, some operations may depend on multiple previous states or operations. Traditional sequence models may have difficulty capturing such complex dependencies, while graph neural networks can naturally handle this situation.
[0158] Secondly, this method provides a unified framework to handle workflows of different types and sizes. Whether it is a simple linear workflow or a complex mesh workflow, it can be represented by a graph and processed with the same model. This greatly enhances the versatility and scalability of the method.
[0159] Furthermore, by generating structure-aware feature vectors, this approach provides ideal input for various subsequent analysis and optimization tasks. These feature vectors not only encode information about individual operations or states, but also contain their structural relationships in the entire workflow, which is crucial for understanding and optimizing the entire workflow.
[0160] In terms of technical effects, this approach brings significant improvements. First, it greatly improves the accuracy and comprehensiveness of workflow modeling. Compared with traditional rule-based or simple statistical methods, this graph neural network-based method can capture more subtle and complex structural relationships.
[0161] Second, this approach has strong adaptability. By training on a large number of different types of workflows, the model can learn the general structure and patterns of workflows, so that it can handle new workflows or workflow variants that have not been seen before. This is especially valuable in dynamic enterprise environments where workflows need to be adjusted frequently.
[0162] In one embodiment of the workflow generation method for multiple programming languages of the present application, see Figure 5 , and can also include the following:
[0163] Step S501: inputting the graph structure feature as a query vector and the semantic feature as a value vector into a preset cross-modal attention algorithm;
[0164] Step S502: dynamically assigning weights to different feature modalities through the preset cross-modal attention algorithm, and calculating the fused workflow semantic features.
[0165] Optionally, this embodiment introduces an innovative workflow feature fusion method, which uses a preset cross-modal attention algorithm to intelligently fuse graph structure features and semantic features to generate a more comprehensive and accurate workflow representation. This method can not only effectively integrate information from different modalities, but also dynamically adjust the importance of each feature according to the specific situation, providing strong support for subsequent workflow analysis and optimization.
[0166] In step S501, the system uses the previously obtained graph structure features as query vectors and the semantic features as value vectors to input into the preset cross-modal attention algorithm. The core idea of this step is to use the attention mechanism to achieve intelligent interaction and fusion between different modal features.
[0167] Graph structure features usually contain the topological relationship and structural information between various elements in the workflow (such as operation units and state units). For example, in a customer service workflow, graph structure features may reflect the connection relationship and interaction mode between nodes such as "customer inquiry", "customer service response", and "problem solving". These features can capture the overall structure of the workflow and the dependencies between various links.
[0168] Semantic features mainly include the content and meaning of each element in the workflow. For example, for the "customer inquiry" link, the semantic features may include the type of inquiry, urgency, products or services involved, etc. These features can deeply describe the specific content and intention of each step in the workflow.
[0169] Using graph structural features as query vectors is a clever design. This means that the system will use graph structural information to "ask" or "retrieve" relevant semantic information. In other words, the system will decide which semantic features to focus on based on the structure of the workflow. This approach can effectively combine structural information and semantic information to generate a richer and more meaningful workflow representation.
[0170] In step S502, the preset cross-modal attention algorithm starts to work. The core task of this algorithm is to dynamically assign weights to different feature modalities and finally calculate the fused workflow semantic features. This process involves complex mathematical operations and deep learning technology.
[0171] First, the cross-modal attention algorithm calculates the similarity or correlation between the query vector (graph structure feature) and the key vector (usually derived from semantic features). This step can be understood as the system evaluating the importance of each semantic feature for understanding the current workflow structure. For example, when processing the "Customer Service Response" node, the system may pay more attention to semantic features related to the type and severity of customer questions, and less attention to other features that are not directly related.
[0172] Next, the algorithm uses these similarity or relevance scores to generate attention weights. These weights determine how much weight each semantic feature should have in the final fused features. The distribution of weights is dynamic and changes according to the specific workflow structure and context. This dynamism allows the system to adapt to different types of workflows and different analysis needs.
[0173] The algorithm then applies these weights to the value vector (semantic features) and performs weighted summation to obtain the fused feature representation. This process can be seen as an intelligent information filtering and integration mechanism that can highlight important information while suppressing irrelevant or minor information.
[0174] Finally, the algorithm may also apply some additional transformation or normalization operations to ensure that the final fused features have good mathematical properties for subsequent processing and analysis.
[0175] This feature fusion method based on cross-modal attention solves several key problems faced in traditional workflow analysis. First, it can effectively integrate structural information and semantic information, overcoming the limitations of single modality features. In actual workflow analysis, relying only on structural information or only on semantic information is often not comprehensive enough, and this fusion method can provide a more complete and accurate workflow representation.
[0176] Secondly, this method is highly adaptable and flexible. By dynamically assigning weights, the system can automatically adjust the degree of attention paid to different features according to different workflow characteristics and analysis requirements. This enables the same model to effectively handle workflows of various types and complexities, greatly improving the versatility and practicality of the method.
[0177] Furthermore, this method provides a powerful tool for handling complex workflow scenarios. In the real world, workflows are often multi-level and multi-dimensional, and may contain complex structures such as linear sequences, parallel branches, conditional jumps, etc. Traditional methods may find it difficult to fully capture these complexities, while cross-modal attention-based fusion methods can better handle these complex scenarios and generate more accurate and meaningful representations.
[0178] In terms of technical effects, this approach brings significant improvements. First, it greatly improves the accuracy and comprehensiveness of workflow representation. By intelligently fusing structural and semantic information, the system is able to generate richer and more accurate workflow descriptions, which lays a solid foundation for subsequent analysis and optimization.
[0179] Secondly, this method improves the interpretability of the system. By analyzing the distribution of attention weights, we can understand which features the system focuses on when making decisions, which is very helpful for understanding and verifying the behavior of the system. For example, we may find that when analyzing a specific type of workflow, the system pays special attention to the semantic features of certain key nodes, which may reveal important characteristics or potential optimization directions for this type of workflow.
[0180] In one embodiment of the workflow generation method for multiple programming languages of the present application, see Figure 6 , and can also include the following:
[0181] Step S601: using the workflow semantic features as input of a preset initial classification model, and using the operation unit and the state unit as supervision target labels of the preset initial classification model;
[0182] Step S602: Optimizing and training the parameters of the preset initial classification model to obtain a trained workflow splitting model.
[0183] Optionally, this embodiment introduces an innovative workflow splitting model training method, which uses previously obtained workflow semantic features as input, and uses the operation units and state units in the workflow as supervision target labels, and finally obtains a trained workflow splitting model by optimizing and training the preset initial classification model. This method can not only effectively learn the internal structure and semantic relationship of the workflow, but also automatically identify and classify the different components in the workflow, providing strong support for subsequent workflow analysis, optimization and automation.
[0184] In step S601, the system uses the previously obtained workflow semantic features as input to the preset initial classification model. These semantic features are obtained through complex processes such as neural network processing and cross-modal attention fusion in the previous steps, and they contain the structural information and semantic content of the workflow. For example, for a customer service workflow, these features may include information such as the type of customer request, the degree of urgency, the product or service category involved, and the logical relationship between the various processing steps.
[0185] At the same time, the system uses the operation unit and state unit in the workflow as the supervision target label of the preset initial classification model. The operation unit here may include specific operation steps such as "receiving customer requests", "assigning customer service personnel", and "providing solutions", while the state unit may include different states of the workflow such as "waiting for processing", "processing", and "resolved". This design enables the model to learn how to map complex workflow semantic features to specific operations and states, thereby realizing automatic splitting and classification of workflows.
[0186] The preset initial classification model may be a neural network model based on deep learning, such as a multi-layer perceptron (MLP), a long short-term memory network (LSTM), or a transformer. The choice of a specific model structure usually depends on the characteristics of the workflow data and the specific requirements of the task. For example, if there is an obvious sequence dependency in the workflow, LSTM may be a good choice; if you need to handle long-distance dependencies and parallel structures, Transformer may be more appropriate.
[0187] In step S602, the system starts to optimize the parameters of the preset initial classification model. This process involves complex machine learning algorithms and optimization techniques. The core goal of the training is to enable the model to accurately map the input workflow semantic features to the corresponding operation units and state units.
[0188] The training process usually uses batch gradient descent or its variants such as the Adam optimizer. In each round of training, the model receives a batch of workflow semantic features as input and then predicts the operation unit or state unit corresponding to each feature. The system calculates the difference between the predicted result and the actual label (usually using the cross entropy loss function), then calculates the gradient through the back-propagation algorithm and updates the model parameters.
[0189] In order to improve the generalization ability of the model and avoid overfitting, various regularization techniques may be used during training, such as L1 / L2 regularization, dropout, etc. In addition, cross-validation and other techniques may be used to adjust hyperparameters to find the best model configuration.
[0190] The training process may require multiple iterations until the model's performance on the validation set is no longer significantly improved. After the training, we obtained an optimized workflow splitting model. This model can automatically identify the operation units and state units in the workflow, laying the foundation for subsequent workflow analysis and optimization tasks.
[0191] This workflow splitting model training method solves several key problems faced in traditional workflow analysis. First, it realizes the automated splitting and classification of workflows. In traditional methods, the splitting and classification of workflows usually requires manual intervention, which is not only time-consuming and labor-intensive, but also easily affected by subjective factors. Through this machine learning method, the system can automatically and objectively identify the various components in the workflow, greatly improving efficiency and consistency.
[0192] Second, this approach is highly adaptable and scalable. Since the model is learned from a large amount of sample data, it can handle workflows of various types and complexities. Even when faced with new, previously unseen workflow patterns, the trained model can perform reasonable splitting and classification based on the learned common features. This flexibility enables the system to adapt to changing business needs and workflows.
[0193] Furthermore, this method provides a powerful tool for handling complex, unstructured workflows. In actual business, workflows are often complex and changeable, and may contain complex structures such as conditional branches, loops, and parallel tasks. Traditional rule-based methods may have difficulty handling this complexity, while machine learning-based methods can learn these complex patterns from data and achieve more intelligent and flexible workflow splitting.
[0194] In terms of technical effects, this approach has brought significant improvements. First, it greatly improves the efficiency and accuracy of workflow analysis. Through automated splitting and classification, the system can quickly process large amounts of workflow data and identify key components and structural features. This not only saves a lot of human resources, but also reduces the possibility of human error.
[0195] Secondly, this approach improves the consistency and repeatability of workflow analysis. Based on the same trained model, the system can consistently split and classify different workflows, which is very important for large-scale workflow management and comparative analysis.
[0196] In one embodiment of the workflow generation method for multiple programming languages of the present application, see Figure 7 , and can also include the following:
[0197] Step S701: matching the target operation unit with the preset function code library respectively, finding the corresponding specific function code fragment, and associating the target state unit with the preset logic code library to determine the corresponding control flow code fragment;
[0198] Step S702: organically combine and arrange the specific function code fragments and the control flow code fragments according to the sequence and dependency relationship of the operation unit and the state unit, so as to generate a complete program code corresponding to the target workflow.
[0199] Optionally, this embodiment introduces an innovative workflow automation code generation method, which matches the target operation unit with the preset function code library and associates the target state unit with the preset logic code library, and finally generates a complete program code corresponding to the target workflow. This method can not only effectively convert the abstract workflow description into a specific executable code, but also automatically organize the code structure according to the structure and logic of the workflow, providing strong support for the automation of the workflow.
[0200] In step S701, the system first matches the target operation unit with the preset function code library. This process involves complex pattern matching and semantic analysis techniques. The preset function code library is usually a database containing a large number of code implementations corresponding to common operation units. For example, for a customer service workflow, the "send email notification" operation unit may match a function code for sending emails. The matching process not only considers the name of the operation unit, but also analyzes its semantic content and context information to ensure that the most suitable code snippet is found.
[0201] At the same time, the system associates the target state unit with the preset logic code library to determine the corresponding control flow code snippet. The preset logic code library contains code templates for various control flow structures, such as conditional judgment, loop, state transition, etc. For example, the state unit "waiting for customer response" may be associated with a code structure that includes waiting and timeout processing. This process also needs to consider the semantics and context of the state unit to select the most appropriate control flow code.
[0202] The core of this step is to convert the abstract workflow description into a specific code implementation. Through the pre-established code library, the system can quickly find the code snippets corresponding to each part of the workflow, greatly improving the efficiency and accuracy of code generation. This method is also highly scalable. By continuously enriching and updating the code library, the system can adapt to increasingly complex and diverse workflow requirements.
[0203] In step S702, the system combines and arranges the specific function code fragments and the control flow code fragments according to the order and dependency of the operation unit and the state unit, and finally generates a complete program code corresponding to the target workflow. This process involves complex code structure analysis and organization technology.
[0204] First, the system analyzes the order and dependencies between the various units in the workflow. This includes various complex process patterns such as sequential execution, conditional branching, loop structures, parallel execution, etc. For example, in an order processing workflow, the system needs to understand the execution order and dependencies between the operation units such as "verify order", "inventory check", and "payment processing".
[0205] Then, the system will combine and arrange the previously matched code snippets based on these relationships. This process is not just a simple code splicing, but also needs to consider multiple aspects such as variable scope, data transfer, exception handling, etc. to ensure that the generated code structure is reasonable and logically correct.
[0206] For example, for a simple conditional branch, the system might generate code with the following structure:
[0207] if condition:
[0208] #Execute the code corresponding to operation unit A
[0209] function_A()
[0210] #Transition to state unit X
[0211] state = STATE_X
[0212] else:
[0213] #Execute the code corresponding to operation unit B
[0214] function_B()
[0215] #Switch to state unit Y
[0216] state = STATE_Y
[0217] For more complex structures, such as loops or parallel execution, the system generates corresponding code structures, which may involve advanced features such as loop statements, multithreading, or asynchronous programming.
[0218] Finally, the system will optimize and format the generated code to ensure the readability and efficiency of the code. This may include normalizing variable names, adjusting code indentation, deleting redundant code, and other operations.
[0219] This automated code generation method solves several key problems faced in traditional workflow implementation. First, it greatly reduces the difficulty and time cost of converting workflows into executable code. In traditional methods, this process usually requires professional developers to manually write code, which is not only time-consuming and labor-intensive, but also prone to human errors. Through automated generation, the system can quickly and accurately convert workflows into code, greatly improving efficiency.
[0220] Secondly, this method improves the consistency and maintainability of the code. Since the code is generated based on a preset code base and fixed combination rules, the code generated by different workflows will have a consistent structure and style, which greatly reduces the difficulty of later maintenance. At the same time, if the workflow needs to be modified, you only need to adjust the workflow description, and the system will automatically generate the updated code, avoiding the errors that may be caused by manual code modification.
[0221] Furthermore, this method provides a powerful tool for handling complex, large-scale workflows. In actual business, workflows can be very complex, containing a large number of operation units and state units, as well as complex logical relationships. Manually writing code for such complex workflows is not only difficult but also prone to errors. The automated generation method can easily handle this complexity and generate code with a clear structure and correct logic.
[0222] In terms of technical effects, this approach has brought significant improvements. First, it greatly improves the efficiency and accuracy of workflow implementation. Through automated code generation, the system can convert complex workflows into executable code in a very short time while ensuring the correctness and consistency of the code.
[0223] Secondly, this approach improves the flexibility and scalability of workflow implementation. Since the code is dynamically generated based on the workflow description, modifications and optimizations to the workflow can be quickly reflected in the code. This enables enterprises to respond more agilely to changes in business needs and quickly adjust and optimize their workflows.
[0224] Finally, this approach opens up new possibilities for intelligent management and optimization of workflows. Based on the automatically generated code, the system can perform more advanced analysis and optimization tasks, such as:
[0225] Code performance optimization: The system can analyze the generated code structure, automatically identify possible performance bottlenecks, and provide optimization suggestions or automatically perform optimization.
[0226] Cross-platform compatibility: By adjusting the code generation rules, the system can generate compatible code for different execution environments (such as different programming languages or operating platforms), improving the portability of the workflow.
[0227] Security analysis: The system can automatically check whether the generated code has potential security vulnerabilities and provide repair suggestions.
[0228] Automated test case generation: Based on the workflow structure and generated code, the system can automatically generate corresponding test cases to improve test coverage and efficiency.
[0229] Version control and difference analysis: The system can automatically track the change history of the workflow and generate code difference reports between different versions, making it easier for the development team to perform version management and code review.
[0230] In general, this workflow-based automated code generation method represents an important technological breakthrough in the field of software development and workflow management. It not only improves the efficiency and accuracy of workflow implementation, but also provides a powerful tool for intelligent management and optimization of workflows. With this approach, enterprises can transform their business processes into executable software systems more quickly and flexibly, thereby improving operational efficiency and enhancing market competitiveness. With the further development and application of this technology, we can expect to see more innovative workflow management and software development solutions, promote the digital transformation and intelligent upgrading of various industries, and ultimately achieve more efficient, flexible, and intelligent business process management and software development practices.
[0231] In order to effectively improve the accuracy and efficiency of multi-programming language workflow generation, the present application provides an embodiment of a multi-programming language workflow generation device for implementing all or part of the content of the multi-programming language workflow generation method, see Figure 8 The multi-programming language workflow generation device specifically includes the following contents:
[0232] The workflow splitting module 10 is used to split the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units;
[0233] An intelligent classification module 20 is used to set the operation unit and the state unit as a model training set and input them into an encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, input the extracted semantic features into a set graph neural network model to perform graph structure learning, obtain graph structure perception features of each node in the graph neural network model, and perform feature fusion of the semantic features and the graph structure perception features through a preset cross-modal attention algorithm to obtain workflow semantic features, input the workflow semantic features, the operation unit and the state unit into a preset initial classification model to perform end-to-end supervised learning training, and obtain a trained workflow splitting model;
[0234] The target program generation module 30 is used to receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
[0235] From the above description, it can be seen that the workflow generation device for multiple programming languages provided in the embodiment of the present application can split the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to characterize each specific operation in the workflow, and the state unit is used to characterize the dependency relationship between the operation units; receive the target workflow conversion request sent by the user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit, thereby effectively improving the accuracy of multi-program language workflow generation.
[0236] From the hardware level, in order to effectively improve the accuracy and efficiency of multi-programming language workflow generation, the present application provides an embodiment of an electronic device for implementing all or part of the content of the multi-programming language workflow generation method, and the electronic device specifically includes the following content:
[0237] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the workflow generation device of multiple programming languages and related devices such as core business systems, user terminals and related databases; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the workflow generation method of multiple programming languages in the embodiment, and the embodiment of the workflow generation device of multiple programming languages, the contents of which are incorporated herein, and the repeated parts are not repeated.
[0238] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0239] In practical applications, part of the workflow generation method for multiple programming languages can be executed on the electronic device side as described above, or all operations can be completed in the client device. The selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0240] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0241] Fig. 9 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig. 9As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig. 9 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0242] In one embodiment, the workflow generation method function of multiple programming languages can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:
[0243] Step S101: splitting the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units;
[0244] Step S102: The operation unit and the state unit are set as a model training set and input into the encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, the extracted semantic features are input into a set graph neural network model to perform graph structure learning, and the graph structure perception features of each node in the graph neural network model are obtained, and the semantic features and the graph structure perception features are feature fused through a preset cross-modal attention algorithm to obtain workflow semantic features, and the workflow semantic features, the operation unit and the state unit are input into a preset initial classification model to perform end-to-end supervised learning training to obtain a trained workflow splitting model;
[0245] Step S103: Receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
[0246] From the above description, it can be seen that the electronic device provided in the embodiment of the present application splits the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and status units, wherein the operation unit is used to characterize each specific operation in the workflow, and the status unit is used to characterize the dependency relationship between the operation units; receives a target workflow conversion request sent by a user, outputs the target workflow in the target workflow conversion request to the workflow splitting model, obtains the target operation unit and target status unit output by the workflow splitting model, and obtains the workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target status unit, thereby effectively improving the accuracy of multi-program language workflow generation.
[0247] In another embodiment, the workflow generation device for multiple programming languages can be configured separately from the central processing unit 9100. For example, the workflow generation device for multiple programming languages can be configured as a chip connected to the central processing unit 9100, and the function of the workflow generation method for multiple programming languages can be implemented through the control of the central processing unit.
[0248] like Fig. 9 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig. 9 In addition, the electronic device 9600 may also include Fig. 9 For components not shown, reference may be made to the prior art.
[0249] like Fig. 9 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0250] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0251] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0252] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0253] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0254] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0255] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0256] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all steps of the workflow generation method in multiple programming languages in the above embodiments, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all steps of the workflow generation method in multiple programming languages in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0257] Step S101: splitting the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units;
[0258] Step S102: The operation unit and the state unit are set as a model training set and input into the encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, the extracted semantic features are input into a set graph neural network model to perform graph structure learning, and the graph structure perception features of each node in the graph neural network model are obtained, and the semantic features and the graph structure perception features are feature fused through a preset cross-modal attention algorithm to obtain workflow semantic features, and the workflow semantic features, the operation unit and the state unit are input into a preset initial classification model to perform end-to-end supervised learning training to obtain a trained workflow splitting model;
[0259] Step S103: Receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
[0260] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application splits the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and status units, wherein the operation unit is used to characterize each specific operation in the workflow, and the status unit is used to characterize the dependency relationship between the operation units; receives a target workflow conversion request sent by a user, outputs the target workflow in the target workflow conversion request to the workflow splitting model, obtains the target operation unit and target status unit output by the workflow splitting model, and obtains the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target status unit, thereby effectively improving the accuracy of multi-program language workflow generation.
[0261] The embodiments of the present application also provide a computer program product capable of implementing all steps of the workflow generation method in multiple programming languages in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the workflow generation method in multiple programming languages are implemented. For example, the computer program / instruction implements the following steps:
[0262] Step S101: splitting the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units;
[0263] Step S102: The operation unit and the state unit are set as a model training set and input into the encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, the extracted semantic features are input into a set graph neural network model to perform graph structure learning, and the graph structure perception features of each node in the graph neural network model are obtained, and the semantic features and the graph structure perception features are feature fused through a preset cross-modal attention algorithm to obtain workflow semantic features, and the workflow semantic features, the operation unit and the state unit are input into a preset initial classification model to perform end-to-end supervised learning training to obtain a trained workflow splitting model;
[0264] Step S103: Receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
[0265] From the above description, it can be seen that the computer program product provided in the embodiment of the present application splits the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and status units, wherein the operation unit is used to characterize each specific operation in the workflow, and the status unit is used to characterize the dependency relationship between the operation units; receives a target workflow conversion request sent by a user, outputs the target workflow in the target workflow conversion request to the workflow splitting model, obtains the target operation unit and target status unit output by the workflow splitting model, and obtains the workflow target program code corresponding to the target workflow according to the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target status unit, thereby effectively improving the accuracy of multi-program language workflow generation.
[0266] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0267] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0268] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0269] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0270] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A workflow generation method for multiple programming languages, characterized in that: The method comprises: By setting a multilingual natural semantic recognition algorithm to split the historical workflow data, corresponding operation units and state units are obtained, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units; The operation unit and the state unit are set as a model training set and input into the encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, the extracted semantic features are input into a set graph neural network model to perform graph structure learning, and the graph structure perception features of each node in the graph neural network model are obtained, and the semantic features and the graph structure perception features are feature fused through a preset cross-modal attention algorithm to obtain workflow semantic features, and the workflow semantic features, the operation unit and the state unit are input into a preset initial classification model to perform end-to-end supervised learning training to obtain a trained workflow splitting model; Receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
2. The method for generating a workflow in multiple programming languages according to claim 1, characterized in that: The method of splitting the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units includes: By setting a multilingual natural semantic recognition algorithm to perform semantic recognition on historical workflow data, the corresponding operation behavior and object entity are obtained; Two types of semantic elements, namely, operation units and state units, are determined according to the operation behavior and the object entity.
3. The method for generating a workflow in multiple programming languages according to claim 1, characterized in that: The operation of setting the operation unit and the state unit as a model training set to be input into an encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation includes: Inputting the operation unit and the state unit as an input set of supervised training data into an encoder of a preset attention sequence modeling model; Multi-level feature extraction and semantic modeling are performed through the attention sequence modeling model to obtain a feature vector containing workflow semantic information output by the attention sequence modeling model.
4. The method for generating a workflow in multiple programming languages according to claim 1, characterized in that: The extracted semantic features are input into the set graph neural network model to perform graph structure learning, and the graph structure perception features of each node in the graph neural network model are obtained, including: The extracted semantic features are input into a preset graph neural network model for graph structure learning and feature extraction, and the operation units and state units in the workflow are represented as nodes on the graph. Through multi-level message propagation and feature aggregation, a graph structure-aware feature vector learned by each node in the graph neural network model is obtained.
5. The method for generating a workflow in multiple programming languages according to claim 1, characterized in that: The step of fusing the semantic features and the graph structure perception features by using a preset cross-modal attention algorithm to obtain workflow semantic features includes: Inputting the graph structure feature as a query vector and the semantic feature as a value vector into a preset cross-modal attention algorithm; The preset cross-modal attention algorithm is used to dynamically assign weights to different feature modalities, and the fused workflow semantic features are calculated.
6. The method for generating a workflow in multiple programming languages according to claim 1, characterized in that: The step of inputting the workflow semantic features, the operation unit, and the state unit into a preset initial classification model for end-to-end supervised learning training to obtain a trained workflow splitting model includes: Using the workflow semantic features as input of a preset initial classification model, and using the operation unit and the state unit as supervision target labels of the preset initial classification model; The parameters of the preset initial classification model are optimized and trained to obtain a trained workflow splitting model.
7. The method for generating a workflow in multiple programming languages according to claim 1, characterized in that: The step of obtaining a workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit comprises: Match the target operation units with the preset function code library respectively, find the specific function code fragments corresponding thereto, and associate the target state unit with the preset logic code library to determine the corresponding control flow code fragments; According to the sequence and dependency relationship between the operation unit and the state unit, the specific function code fragment and the control flow code fragment are organically combined and arranged to generate a complete program code corresponding to the target workflow.
8. A workflow generation device for multiple programming languages, characterized in that: The device comprises: A workflow splitting module is used to split the historical workflow data by setting a multilingual natural semantic recognition algorithm to obtain corresponding operation units and state units, wherein the operation unit is used to represent each specific operation in the workflow, and the state unit is used to represent the dependency relationship between the operation units; An intelligent classification module is used to set the operation unit and the state unit as a model training set and input them into an encoder of a preset attention sequence modeling model to perform a semantic feature extraction operation, input the extracted semantic features into a set graph neural network model to perform graph structure learning, obtain graph structure perception features of each node in the graph neural network model, and perform feature fusion of the semantic features and the graph structure perception features through a preset cross-modal attention algorithm to obtain workflow semantic features, input the workflow semantic features, the operation unit and the state unit into a preset initial classification model to perform end-to-end supervised learning training, and obtain a trained workflow splitting model; A target program generation module is used to receive a target workflow conversion request sent by a user, output the target workflow in the target workflow conversion request to the workflow splitting model, obtain the target operation unit and the target state unit output by the workflow splitting model, and obtain the workflow target program code corresponding to the target workflow according to the combination of the function code in the preset function code library corresponding to the target operation unit and the logic code in the preset logic code library corresponding to the target state unit.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the multi-programming language workflow generation method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-programming language workflow generation method according to any one of claims 1 to 7 are implemented.