A decision flow generation method and system based on text rule extraction
By using a decision flow generation method based on text rule extraction, the problem of low efficiency in understanding text-based rules is solved. This method enables the rapid construction and efficient execution of decision flows, reduces the workload of manual understanding, and improves the accuracy of rule execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, text-based rules are inefficient to understand, difficult to execute, hard to quickly map to software applications, and suffer from misunderstanding and execution complexity.
The decision flow generation method based on text rule extraction, including decision flow extraction, service flow mapping and feedback iteration, utilizes entity recognition, entity relationship extraction and service mapping technologies to quickly construct rule decision flows and optimize the model through user feedback.
It enables the rapid construction of rule decision-making processes, reduces the workload of manual interpretation, removes communication barriers between rule makers and coders, and improves the accuracy and efficiency of rule execution.
Smart Images

Figure CN117076680B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning and workflow automatic construction, and particularly relates to a decision flow generation method and system based on text rule extraction. BACKGROUND
[0002] The rule system of the text is a summary file formed according to the actual work operation strategy law, and is mainly to describe the environmental conditions faced in decision-making and the actions performed under the corresponding environment. However, due to the universal ambiguity and abstraction of various text rules and experience summaries, they are mostly executed after being learned and understood by people. For example, the Chinese patent with the application number CN202011021805.6 discloses a decision engine implementation method, which improves the convenience of manual editing of decision logic by visualizing the editing of decision flow, but cannot solve the path from text to rule logic understanding and execution. There are understanding deviations and execution complexity and uncertainty in the process of learning and understanding by people and then executing.
[0003] Firstly, the representation of rule knowledge is quite complex, involving multiple requirements such as time and space dimensions, coarse and fine granularity, time sequence relationship, application scenarios, and background knowledge such as part of common sense knowledge and device attributes, which is a complex and huge system. This puts forward requirements for the system design of the entire rule knowledge representation. Secondly, due to the dynamicity and complexity of the application scenarios, the number of rule knowledge in the fine scene is small, and the data in the fine-grained field is scarce. Finally, rules are expressed in the form of scene description text, and each scene is different. Based on specific scenes, rules are also different, and there is no complete definition of unified description expression, resulting in poor meta-knowledge quality and difficulty in mining deep-level rule knowledge. SUMMARY
[0004] The technical problem to be solved by the present application is to accelerate the understanding and operation of rules and improve the execution accuracy by a decision flow generation method and system based on text rule extraction, aiming at the low efficiency and high difficulty of existing text rule understanding.
[0005] Technical scheme: In order to solve the above technical problems, the present application discloses a decision flow generation method based on text rule extraction in the first aspect, comprising:
[0006] Step 1, decision flow extraction, the action and condition in the text rule are extracted by the text rule extraction model to form a formatted rule decision flow;
[0007] Step 2, mapping of service flow, mapping the extracted rule decision flow with the service list and driving operation as needed;
[0008] Step 3: Feedback iteration. Record the service feedback results, format them, and convert them into a training dataset to correct the text rule extraction model.
[0009] Furthermore, the text rule extraction model described in step 1 is used to sequentially perform classification filtering, entity recognition, and entity relation extraction. Step 1 includes:
[0010] Step 1-1: Generate a set of rule statements in the text rules. Preprocess the text rules to be processed, and classify and filter the statements containing conditions and actions in the preprocessed text rules. Add the filtering results to the set of rule statements.
[0011] Steps 1-2: Extraction of actions and conditions within the domain. First, entity recognition is used to extract entities from each text rule in the rule statement set. Then, the domain-related entities are extracted by inclusion judgment with the domain lexicon of interest. Finally, the relationship between actions and conditions is extracted by entity relation extraction, thus forming the association pairs of actions and conditions.
[0012] Steps 1-3: Combine actions and conditions by sequential logical relationships to generate a logical diagram of actions and conditions. After normalization, generate a rule activity diagram, and then perform formatted representation to generate a rule decision flow.
[0013] Further, step 2 includes:
[0014] Step 2-1, Service Integration Management: Service providers develop services and add them to the service integration framework. All services in the service integration framework need to include a service description, container image name, and container startup script. The container startup script needs to send the service description information to the registry center. The registry center provides a consistent service scheduling entry point as a unified directory.
[0015] Step 2-2, Action-Service Mapping: Based on the service and rule activity graph, actions and services are mapped using the service mapping model;
[0016] Steps 2-3: Application adapter matching: When an action request is received from the rule activity graph, the service parameters are normalized and the service interface description is mapped consistently, so that the interface address and parameters can be accurately matched in the end.
[0017] Steps 2-4: On-demand invocation: When the conditions in the rule decision flow are met, the mapped service is invoked through an action.
[0018] Furthermore, step 2-2 includes:
[0019] Step 2-2-1: First, normalize the conditions in the rule activity diagram, including splitting complex multi-condition statements into single conditions and unifying the data units in the conditions; then, convert the condition statements into formatted code; finally, map and correct the formatted code to the service parameters to ensure consistency with the format specified in the call.
[0020] Step 2-2-2: First, perform semantic understanding on the action statements in the rule activity diagram. Then, calculate the semantic similarity between the action statements and the service descriptions attached in the service integration management. Select the service with the highest similarity for action mapping. Finally, modify and select the service name. The modification and selection of the service name includes manual modification of the service name. Manual modification of the service name is required when the following two situations exist:
[0021] If there are cases where the similarity is too high, the service names to be mapped need to be manually corrected.
[0022] The similarity value of the service with the highest similarity is insufficient to meet the minimum threshold for service invocation, requiring manual correction of the service name to be mapped.
[0023] Furthermore, step 3 includes:
[0024] Step 3-1: Analyze the services of the service integration framework, and analyze whether the service feedback is successful or not. If successful, record the service operation and feedback. If it fails, proceed to step 3-2.
[0025] Step 3-2: After feedback failure, the correctness of multiple rules in the rule activity graph is judged. If the rule extraction is incorrect, it is manually corrected, and the error and correct operation are recorded and compared. If the rule is correct, it means that there is a problem with the mapping of actions and services. The correction log of the mapping service is also recorded. Both records are stored to generate feedback learning corpus, so as to continuously iterate and optimize the text rule extraction model and service mapping model.
[0026] The second aspect discloses a decision flow generation system based on text rule extraction, including a decision flow extraction module, a service flow mapping module, and a feedback iteration module;
[0027] The decision flow extraction module is used to perform natural language processing on texts including rules and regulations and requirement rules, extract key actions and corresponding condition information, and use the actions as input for application adaptation; the relationship between the extracted actions and conditions forms a rule activity graph, which is represented in XML format to generate a rule decision flow;
[0028] The service flow mapping module is used to consistently represent various service APIs through traditional service integration functions. After receiving an API mapping request, it associates the action described in natural language with the service name, extracts service parameters from the condition information to match and call the service, and performs unified service request scheduling according to the service flow.
[0029] The feedback iteration module is used to record the entire execution process of the service flow mapping module, statistically analyze the success rate of request execution, correct errors, and iteratively modify the rule decision flow after recording.
[0030] Furthermore, the decision flow extraction module includes a text rule extraction module. The text rule extraction module first performs text preprocessing operations on the text rules, including word segmentation and stop word removal; then, it divides the sentences in the preprocessed text into natural sentences, classifies them into categories, and filters out rule-type texts; subsequently, it extracts the combination graph of domain entities, entity relationships, and formation conditions and actions, and stores it in the form of a rule activity graph after normalization and standardization.
[0031] Furthermore, the service flow mapping module includes a service integration management unit, an action service mapping model, an application adapter matching unit, and an on-demand invocation unit. The service integration management unit is used to manage the services provided by the service provider. The service provider develops services on demand and registers the services to the registration center in the form of containers. The registration content includes service information such as service description and container image name to assist in mapping.
[0032] The action service mapping model is used to map actions and services based on the service and rule activity graph;
[0033] The application adapter matching unit is used to normalize the service parameters and perform consistent mapping of the service interface description when it receives an action request in the rule activity graph, so as to accurately match the interface address and parameters.
[0034] The on-demand invocation unit is used to invoke the mapped service through an action when the conditions in the rule decision flow are met.
[0035] The service flow mapping process, after generating the rule activity graph from the extracted action conditions, needs to be combined and mapped through the condition specification mapping module and the action specification mapping module.
[0036] Furthermore, the action service mapping model includes a condition specification mapping subunit and an action specification mapping subunit. After the rule activity graph extracted from the action conditions is generated, it needs to be combined and mapped through the condition specification mapping subunit and the action specification mapping subunit.
[0037] The conditional specification mapping subunit is used to standardize the conditions, consistently extract them into conditional "if...else" statements, and normalize the units in the conditions;
[0038] The action specification mapping subunit is used to perform semantic understanding on the actions described in natural semantics, map and associate them with the description content and functional domain of the service, and select the correct service name for invocation after correction.
[0039] Furthermore, the feedback iteration module is used to record the execution of the workflow according to the activity graph, analyze and judge the feedback information. If the execution is successful, the service operation and feedback record are recorded; if the feedback information fails, the correctness of the generated rule graph is judged, and the problem is located as either a service mapping problem or a rule generation problem; if the rule extraction is incorrect, it is manually corrected, and the error and correct operation are recorded and compared; if the rule is correct, it indicates that there is a problem with the mapping of actions and services, and the correction log of the mapping service is also recorded; both types of records are stored to generate feedback learning corpus, thereby enabling continuous iterative optimization of the text rule extraction model and the service mapping model.
[0040] Beneficial effects:
[0041] The principle of this invention is as follows: by using entity recognition, entity relationship extraction, text semantic understanding technology, service mapping scheduling technology, and user feedback learning, a rapid and agile construction of decision flow based on text rules is achieved. Compared with existing technologies, it has the following three significant advantages:
[0042] 1) By using natural language processing technology to build a rule extraction model for text, and by associating and mapping it with existing service APIs, it is possible to quickly organize and schedule software applications, which can greatly accelerate the construction speed of rule-based applications. This enables rapid response to requirements and on-demand construction of capabilities, reduces the workload of manually understanding a large number of rules, and quickly generates rules based on the text rule extraction model, which is then confirmed and corrected manually. This solves the problem that current text-based regulations and requirement rules are difficult to quickly map to software applications.
[0043] 2) Directly mapping actions from services eliminates the need for coding after understanding the rules, bridging the communication gap between business personnel who formulate rules and coders;
[0044] 3) When the rules of the text are adjusted and corrected, the service can quickly rearrange and correct them without the need for secondary encoding, compilation and execution. Attached Figure Description
[0045] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and other aspects will become clearer.
[0046] Figure 1 This is a flowchart illustrating a decision flow generation method based on text rule extraction, as described in an embodiment of this application.
[0047] Figure 2 This is a flowchart illustrating the rule activity graph generation process of a decision flow generation method based on text rule extraction, as described in an embodiment of this application.
[0048] Figure 3 This document presents a flowchart illustrating the application adapter matching process for implementing a decision flow generation method based on text rule extraction, as described in this application.
[0049] Figure 4 This is a flowchart illustrating the action mapping process of a decision flow generation method based on text rule extraction, as described in an embodiment of this application.
[0050] Figure 5 This is a flowchart illustrating the feedback iteration process of a decision flow generation method based on text rule extraction, as described in an embodiment of this application.
[0051] Figure 6 This is a schematic diagram of a rule decision flow generation method based on text rule extraction, as provided in an embodiment of this application. Detailed Implementation
[0052] The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0053] This embodiment provides a decision flow generation method based on text rule extraction, which can be applied to extract text-based rules to generate decision flows. For example, in large-scale collaborative production scenarios, guidance documents issued by superiors and organizational rules and regulations may change in various ways depending on the situation. How to quickly react and accurately build and run applications, thereby accelerating the understanding and operation of rules and improving execution accuracy.
[0054] Combined with appendix Figure 1 The overall process of the decision flow generation method based on text rule extraction disclosed in the first embodiment of this application is described below, with the following steps:
[0055] Step 1: Decision flow extraction. The actions and conditions in the text rules, including regulations and demand rules, are extracted using a text rule extraction model to form a formatted rule decision flow.
[0056] The text rule extraction model described in step 1 is used to sequentially perform classification filtering, entity recognition, and entity relation extraction. This text rule extraction model is existing technology and is not limited in this embodiment. Before performing text rule extraction, a training set of text rules for the corresponding scenario needs to be obtained to train the text rule extraction model. In specific implementation, the text rule extraction model can be orchestrated using a pipeline-based model flow. Specifically, the text rule extraction model includes a rule classification filtering model, an entity recognition model, and an entity relation extraction model. The rule classification filtering model can use TextCNN or BERT+CNN, while the entity recognition and entity relation extraction models can use BERT-Bi-LSTM-CRF. An example of a text rule is provided:
[0057] In the event of an attack, the following six battle formations may be adopted depending on the situation:
[0058] (1) Column formation (single column or two columns)
[0059] (2) Wedge formation
[0060] (3) V-shaped formation
[0061] (4) Echelon formation (left echelon or right echelon)
[0062] (5) Line formation
[0063] (6) Box formation
[0064] During offensive maneuvers, a company may adopt various formations depending on the situation, including company column, diamond (wedge), V-shape, trapezoid, or line formation. When using a company column, each platoon forms a wedge formation. When the frontal width is approximately 150-200 meters, the leading platoon advances under cover, the following platoons advance under cover, and the rear platoons move using normal marching methods.
[0065] Combination Figure 1 The content of “① Decision Flow Extraction” and Figure 2 Step 1 is explained as follows:
[0066] Step 1-1: Generate the rule statement set in the text rules. This mainly involves preprocessing the text rules to be processed through common text processing steps such as word segmentation and stop word removal. Statements in the preprocessed text rules that may contain conditions and actions are then categorized and filtered, and the filtered results are added to the rule statement set. For example, the filtering results of the above text rule example are:
[0067] When using a column formation, each platoon forms a wedge shape. When the front is about 150-200 meters wide, the leading platoon advances under cover, the following platoons advance under cover, and the rear platoons move in a normal marching manner.
[0068] Steps 1-2: Domain-Specific Action and Condition Extraction. First, entity recognition is used to extract entities from each text rule in the rule statement set. Then, domain-related entities are extracted by "blinding" (containment judgment) against the domain-specific lexicon. Finally, entity relation extraction is used to extract the relationships between actions and conditions, ultimately forming action-condition association pairs. For example, the action-condition association pairs formed by the above text rule example:
[0069] Action: The first rank advances under cover, the following ranks advance under cover, and the last rank moves normally.
[0070] Conditions: Front width approximately 150-200 meters
[0071] Steps 1-3: By combining action and condition pairs according to the sequential logical relationships, a logical diagram of action and condition pairs can be generated. After normalization, a rule activity diagram is generated, and then a formatted representation is performed to generate a rule decision flow. This can be represented and stored in XML format; for example, the rule decision flow generated by the text rule example is... Figure 6 As shown
[0072] Step 2: Map the service flow by mapping the extracted rule decision flow to the service list and driving its execution on demand; for example... Figure 1 The content shown in "② Decision Flow Mapping" includes:
[0073] Step 2-1, Service Integration Management: Service providers develop services and add them to the service integration framework. All services in the service integration framework need to include a service description, container image name, and container startup script. The container startup script needs to send the service description information to the registry center. The registry center provides a consistent service scheduling entry point as a unified directory. For example, one of the services is named distanceJudge, and its service description is to calculate the distance based on the real-time status.
[0074] Step 2-2, Action Service Mapping: Based on the service and rule activity graph, actions and services are mapped through a service mapping model. The service mapping model can be a mapping model in the prior art, such as a similarity mapping model, etc., and this embodiment of the application does not limit it.
[0075] Combination Figure 4 The two sub-processes of action mapping in step 2-2 are described as follows:
[0076] Step 2-2-1: First, normalize the conditions in the rule activity diagram. For example, break down complex multi-condition statements into single-condition statements. The units of measurement for data in the conditions also need to be consistent; for instance, all length units should be calculated in meters, and all time units in seconds. Then, convert the condition statements into formatted code. Finally, map and correct the formatted code to the service parameters to ensure consistency with the format specified in the call. For example:
[0077] distance(army)>150m and distance(army)<200m.
[0078] Step 2-2-2: First, perform semantic understanding on the action statements in the rule activity diagram. Then, calculate the semantic similarity between the action statements and the service descriptions attached in the service integration management. Select the service with the highest similarity for action mapping. Finally, modify and select the service name. The modification and selection of the service name includes manual modification of the service name. Manual modification of the service name to be mapped is required in the following two situations:
[0079] If there are cases where the similarity is too high, the service names to be mapped need to be manually corrected.
[0080] The similarity value of the service with the highest similarity cannot meet the minimum threshold for service invocation, so the service name needs to be manually corrected; the setting of the minimum threshold for service invocation is existing technology and is not specifically limited in this embodiment.
[0081] For example, select the distanceJudge service.
[0082] Steps 2-3: Application Adapter Matching: Upon receiving an action request from the rule activity graph, the service parameters are normalized, and the service interface description is consistently mapped to ensure accurate matching of the interface address and parameters. Figure 3 As shown; for example, the current team's location information is passed as a parameter to the selected distanceJudge service.
[0083] Steps 2-4: On-demand invocation: When the conditions in the rule decision flow are met, the mapped service is invoked through an action.
[0084] Step 3: Feedback iteration. Record the specific results of the service feedback, format them and convert them into a training dataset to correct the text rule extraction model.
[0085] Combination Figure 5 The sub-process of step 3 feedback iteration is described as follows:
[0086] Step 3-1: Analyze the services of the driver service integration framework, and analyze whether the service feedback is successful or not. If successful, record the service operation and feedback. If it fails, proceed to step 3-2.
[0087] Step 3-2: After feedback failure, the correctness of multiple rules in the rule activity graph is judged. If the rule extraction is incorrect, it is manually corrected, and the incorrect and correct operations are recorded and compared. If the rule is correct, it means that there is a problem with the mapping of actions and services. The correction log of the mapping service is also recorded. Both of these records are stored to generate feedback learning corpus, so as to continuously iterate and optimize the rule extraction model and service mapping model.
[0088] The second embodiment of this application discloses a decision flow generation system based on text rule extraction, including a decision flow extraction module, a service flow mapping module, and a feedback iteration module;
[0089] The decision flow extraction module is used to perform natural language processing on texts including rules and regulations and requirement rules, extract key actions and corresponding condition information, and use the actions as input for application adaptation; the relationship between the extracted actions and conditions forms a rule activity graph, which is represented in XML format to generate a rule decision flow;
[0090] The decision flow extraction module includes a text rule extraction module. The text rule extraction module first performs text preprocessing operations on the text rules, including word segmentation and stop word removal. Then, it divides the sentences in the preprocessed text into natural sentences, classifies them into categories, and filters out rule-type texts. Subsequently, it extracts the combination graph of domain entities, entity relationship formation conditions and actions, and stores it in the form of rule activity graphs after normalization and standardization.
[0091] The service flow mapping module is used to consistently represent various service APIs through traditional service integration functions. After receiving an API mapping request, it associates the action described in natural language with the service name, extracts service parameters from the condition information to match and call the service, and performs unified service request scheduling according to the service flow.
[0092] The service flow mapping module includes a service integration management unit, an action service mapping model, an application adapter matching unit, and an on-demand invocation unit. The service integration management unit is used to manage the services provided by the service provider. The service provider develops services on demand and registers the services to the registration center in the form of containers. The registration content includes service information such as service description and container image name to assist in mapping.
[0093] The action service mapping model is used to map actions and services based on service and rule activity graphs; it includes a condition specification mapping subunit and an action specification mapping subunit. After the rule activity graph extracted from the action conditions is generated, it needs to be combined and mapped through the condition specification mapping subunit and the action specification mapping subunit.
[0094] The conditional specification mapping subunit is used to standardize the conditions, consistently extract them into conditional "if...else" statements, and normalize the units in the conditions;
[0095] The action specification mapping subunit is used to perform semantic understanding on the actions described in natural semantics, map and associate them with the description content and functional domain of the service, and select the correct service name for invocation after correction.
[0096] The application adapter matching unit is used to normalize the service parameters and perform consistent mapping of the service interface description when it receives an action request in the rule activity graph, so as to accurately match the interface address and parameters.
[0097] The on-demand invocation unit is used to invoke the mapped service through an action when the conditions in the rule decision flow are met.
[0098] The feedback iteration module is used to record the entire execution process of the service flow mapping module, statistically analyze the success rate of request execution, correct errors, and iteratively revise the rule decision flow and text rule extraction model after recording. This includes: recording the execution of the workflow according to the activity graph; analyzing and judging feedback information; recording service operations and feedback records if execution is successful; judging the correctness of the generated rule graph if feedback fails, identifying whether the problem is in service mapping or rule generation; manually correcting rules if extraction is incorrect, recording and comparing the errors with correct operations; recording the correction logs for the mapping service if the rules are correct, indicating a problem in the mapping of actions and services; storing both types of records to generate feedback learning corpus, thereby enabling continuous iterative optimization of the text rule extraction model and service mapping model.
[0099] In its specific implementation, this application provides a computer storage medium and a corresponding data processing unit. The computer storage medium is capable of storing a computer program, which, when executed by the data processing unit, can run the invention's content regarding a decision flow generation method based on text rule extraction, as well as some or all of the steps in various embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0100] Those skilled in the art will clearly understand that the technical solutions in the embodiments of the present invention can be implemented using computer programs and their corresponding general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of computer programs, i.e., software products. These computer program software products can be stored in a storage medium and include several instructions to cause a device containing a data processing unit (which may be a personal computer, server, microcontroller, MUU, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0101] This invention provides a method and system for generating decision flows based on text rule extraction. Many methods and approaches exist for implementing this technical solution; the above description is merely a specific embodiment of this invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A decision flow generation method based on text rule extraction, characterized in that, include: Step 1: Decision flow extraction. The actions and conditions in the text rules are extracted by the text rule extraction model to form a formatted representation of the rule decision flow. Step 2: Map the service flow by mapping the extracted rule decision flow to the service list and driving the operation on demand; Step 3: Feedback iteration. Record the service feedback results, format them, and convert them into a training dataset to correct the text rule extraction model. The text rule extraction model described in step 1 is used to sequentially perform text rule classification and filtering, entity recognition, and entity relation extraction. Step 1 includes: Step 1-1: Generate a set of rule statements in the text rules. Preprocess the text rules to be processed, and classify and filter the statements containing conditions and actions in the preprocessed text rules. Add the filtering results to the set of rule statements. Steps 1-2: Extraction of actions and conditions within the domain. First, entity recognition is used to extract entities from each text rule in the rule statement set. Then, the domain-related entities are extracted by inclusion judgment with the domain lexicon of interest. Finally, the relationship between actions and conditions is extracted by entity relation extraction, thus forming the association pairs of actions and conditions. Steps 1-3: Combine actions and conditions by sequential logical relationships to generate a logical diagram of actions and conditions. After normalization, generate a rule activity diagram, and then perform formatted representation to generate a rule decision flow.
2. The decision flow generation method based on text rule extraction according to claim 1, characterized in that, Step 2 includes: Step 2-1, Service Integration Management: Service providers develop services and add them to the service integration framework. All services in the service integration framework need to include a service description, container image name, and container startup script. The container startup script needs to send the service description information to the registry center. The registry center provides a consistent service scheduling entry point as a unified directory. Step 2-2, Action-Service Mapping: Based on the service and rule activity graph, actions and services are mapped using the service mapping model; Steps 2-3: Application adapter matching: When an action request is received from the rule activity graph, the service parameters are normalized and the service interface description is mapped consistently, so that the interface address and parameters can be accurately matched in the end. Steps 2-4: On-demand invocation: When the conditions in the rule decision flow are met, the mapped service is invoked through an action.
3. The decision flow generation method based on text rule extraction according to claim 2, characterized in that, Step 2-2 includes: Step 2-2-1: First, normalize the conditions in the rule activity diagram, including splitting complex multi-condition statements into single conditions and unifying the data units in the conditions; then, convert the condition statements into formatted code; finally, map and correct the formatted code to the service parameters to ensure consistency with the format specified in the call. Step 2-2-2: First, perform semantic understanding on the action statements in the rule activity diagram. Then, calculate the semantic similarity between the action statements and the service descriptions attached in the service integration management. Select the service with the highest similarity for action mapping. Finally, modify and select the service name. The modification and selection of the service name includes manual modification of the service name. Manual modification of the service name is required when the following two situations exist: If there are cases where the similarity is too high, the service names to be mapped need to be manually corrected. The similarity value of the service with the highest similarity is insufficient to meet the minimum threshold for service invocation, requiring manual correction of the service name to be mapped.
4. The decision flow generation method based on text rule extraction according to claim 3, characterized in that, Step 3 includes: Step 3-1: Analyze the services of the service integration framework, and analyze whether the service feedback is successful or not. If successful, record the service operation and feedback. If it fails, proceed to step 3-2. Step 3-2: After feedback failure, the correctness of multiple rules in the rule activity graph is judged. If the rule extraction is incorrect, it is manually corrected, and the error and correct operation are recorded and compared. If the rule is correct, it means that there is a problem with the mapping of actions and services. The correction log of the mapping service is also recorded. Both records are stored to generate feedback learning corpus, so as to continuously iterate and optimize the text rule extraction model and service mapping model.
5. A decision flow generation system based on text rule extraction, characterized in that, It includes a decision flow extraction module, a service flow mapping module, and a feedback iteration module; The decision flow extraction module is used to perform natural language processing on texts including rules and regulations and requirement rules, extract key actions and corresponding condition information, and use the actions as input for application adaptation. The relationships between actions and conditions are extracted to form a rule activity graph, which is then represented in XML format to generate a rule decision flow. The service flow mapping module is used to consistently represent various service APIs through traditional service integration functions. After receiving an API mapping request, it associates the action described in natural language with the service name, extracts service parameters from the condition information to match and call the service, and performs unified service request scheduling according to the service flow. The feedback iteration module is used to record the entire execution process of the service flow mapping module, statistically analyze the success rate of request execution, correct errors, and iteratively modify the rule decision flow after recording. The decision flow extraction module includes a text rule extraction module. The text rule extraction module first performs text preprocessing operations on the text rules, including word segmentation and stop word removal; then, it divides the sentences in the preprocessed text into natural sentences, classifies them into categories, and filters out the rule-type text. Subsequently, the combination graph of domain entities, entity relationships, and actions is extracted and stored in the form of a rule-based activity graph after normalization and standardization.
6. A decision flow generation system based on text rule extraction according to claim 5, characterized in that, The service flow mapping module includes a service integration management unit, an action service mapping model, an application adapter matching unit, and an on-demand invocation unit. The service integration management unit is used to manage the services provided by the service provider. The service provider develops services on demand and registers the services to the registration center in the form of containers. The registration content includes service information including service description and container image name. The action service mapping model is used to map actions and services based on the service and rule activity graph; The application adapter matching unit is used to normalize the service parameters and perform consistent mapping of the service interface description when it receives an action request in the rule activity graph, so as to accurately match the interface address and parameters. The on-demand invocation unit is used to invoke the mapped service through an action when the conditions in the rule decision flow are met.
7. A decision flow generation system based on text rule extraction according to claim 6, characterized in that, The action service mapping model includes a condition specification mapping subunit and an action specification mapping subunit. After the rule activity graph extracted from the action conditions is generated, it needs to be combined and mapped through the condition specification mapping subunit and the action specification mapping subunit. The conditional specification mapping subunit is used to standardize the conditions, extract them into conditional statements in a consistent manner, and normalize the units in the conditions. The action specification mapping subunit is used to perform semantic understanding on the actions described in natural semantics, map and associate them with the description content and functional domain of the service, and select the correct service name for invocation after correction.
8. A decision flow generation system based on text rule extraction according to claim 7, characterized in that, The feedback iteration module is used to record the execution of the workflow according to the activity diagram, analyze and judge the feedback information, and record the service operation and feedback record if the execution is successful. If the feedback fails, the correctness of the generated rule graph is determined to pinpoint whether the problem is a service mapping issue or a rule generation issue. If an error occurs during rule extraction, it will be manually corrected, and the error and the correct operation will be recorded and compared. If the rule is correct, it indicates a problem with the mapping between actions and services. The correction log for the mapping service will also be recorded. Both types of records are stored to generate corpus for feedback learning, thereby enabling continuous iteration and optimization of the text rule extraction model and the service mapping model.
Citation Information
Patent Citations
Decision engine implementation method, device and apparatus and storage medium
CN112148260A
Man-machine interaction question-answering method and system based on complex intention intelligent identification
CN111708874A
Structured airport alarm processing method based on entity relationship extraction
CN113268595A