Front-end form generation method and device
By receiving business rules input by users, extracting entity features and intentions, building logical expressions, and generating cross-decision tables, the problems of complex and inefficient business rules management in the existing technology are solved, and efficient and accurate front-end form generation is achieved.
Patent Information
- Application Number
- CN202411142957.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-20
AI Technical Summary
In the prior art, business rules management is complex, manual development depends on developers with high level, low efficiency and poor reusability, which cannot meet the enterprise's requirements for efficient and accurate rule management.
By receiving business rules input by users, extracting entity features, performing entity semantic disambiguation and intent recognition, building business rule logical expressions, generating rule cross-decision tables, and improving the efficiency and accuracy of front-end form generation.
The automatic extraction technology based on rules is realized, which improves the efficiency and accuracy of front-end form generation, reduces manual intervention, and improves the efficiency and accuracy of rule management.
Smart Images

Figure CN118656077B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of front-end technology, and in particular to a front-end form generation method and device. Background Art
[0002] Business rules are instructions that define or constrain an enterprise's business activities. They specify the enterprise's goals and provide guidance on how processes should be performed. Many enterprises have informal, undocumented business rules in which employees know what they are supposed to do and do it based on their understanding of their job functions.
[0003] But undocumented business rules can lead to inefficiencies and inconsistencies in processes across the enterprise. Business rule management is a way to formally define how an enterprise's business processes are executed. Through business rule management, all members of the enterprise know the business goals and processes, which enables the enterprise to scale its operations while providing employees with effective autonomy.
[0004] The amount of data generated in the current Internet era is huge, and the management of business rules is complex. Manually developing a rule relies more on the level of the developer, and requires in-depth communication between developers and managers to fully understand the business logic of the enterprise. Otherwise, it is easy to cause low efficiency in the operation of the rules and fail to achieve the expected goals. This development method is too inefficient, and because each enterprise has different business needs, the reusability of the business rules defined is poor, which cannot meet the enterprise's requirements for efficiency and accuracy of rule management. Summary of the invention
[0005] In response to the problems in the prior art, the present application provides a front-end form generation method and device, which can improve the efficiency and accuracy of front-end form generation based on rule-based automatic extraction technology.
[0006] In order to solve at least one of the above problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a front-end form generation method, comprising:
[0008] Receive business rules input by a user, extract entity features in the business rules, perform entity relationship recognition operations on the entity features according to a preset knowledge graph, determine corresponding inter-entity relationship features, perform entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determine corresponding preprocessing business rules;
[0009] Input the preprocessed business rules into a preset intent recognition algorithm, determine the corresponding business rule intent according to the prediction results output by the preset intent recognition algorithm and a preset synonym dictionary; determine the corresponding business rule entity according to the preprocessed business rules and a preset entity extraction model; perform dependency syntactic analysis operations and relational pattern matching operations on the preprocessed business rules to determine the corresponding business rule relationship;
[0010] Construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition values according to the extracted condition variables, determine the corresponding condition combinations according to the condition variables and the condition values, construct a rule cross-decision table according to the condition combinations, and render the obtained rule cross-decision table to the front-end interactive page.
[0011] Furthermore, performing entity semantic disambiguation operation on the entity features according to the inter-entity relationship features to determine corresponding pre-processing business rules includes:
[0012] Determine a synonym entity feature corresponding to the entity feature according to the inter-entity relationship feature, and perform a disambiguation operation on the synonym entity feature to determine a corresponding updated entity feature, wherein the disambiguation operation includes at least one of replacement and merging;
[0013] The business rules are updated according to the updated entity characteristics, and corresponding pre-processing business rules are determined.
[0014] Furthermore, the preprocessing business rule is input into a preset intent recognition algorithm, and the corresponding business rule intent is determined according to the prediction result output by the preset intent recognition algorithm and a preset synonym dictionary, including:
[0015] Inputting the text features extracted from the preprocessing business rules into a preset intent recognition long short-term memory network to determine the corresponding prediction results;
[0016] A data enhancement operation is performed according to the prediction result and a preset synonym dictionary to determine the corresponding business rule intention, wherein the data enhancement operation includes at least one of synonym expansion, synonym replacement and sentence reorganization.
[0017] Further, the determining the corresponding business rule entity according to the pre-processed business rule and the preset entity extraction model includes:
[0018] Inputting the text features extracted from the preprocessing business rules into a preset entity extraction conditional random field model, performing a feature capture operation on the text features according to a feature function layer of the preset entity extraction conditional random field model, and determining corresponding capture features;
[0019] Inputting the captured features into the potential energy function layer of the preset entity extraction conditional random field model to determine the corresponding normalized potential energy;
[0020] The normalized potential energy is input into the output layer of the preset entity extraction conditional random field model to determine the corresponding business rule entity.
[0021] Further, the performing dependency syntactic analysis and relational pattern matching operations on the pre-processed business rules to determine corresponding business rule relationships includes:
[0022] Performing dependency syntactic analysis on the preprocessing business rules to determine corresponding sentence structures;
[0023] Perform a relational pattern matching operation according to the preset logical connectives and the sentence structure to determine a corresponding relational matching graph;
[0024] A relationship classification operation is performed according to the relationship matching graph to determine the corresponding business rule relationship.
[0025] Furthermore, the corresponding business rule logic expression is constructed according to the business rule intent, the business rule entity and the business rule relationship;
[0026] Building a basic expression according to the business rule intent and the business rule entity;
[0027] A business rule logic expression is constructed according to the basic expression, the business rule relationship and the preset nested logic rule.
[0028] Further, determining a corresponding condition combination according to the condition variable and the condition value, and constructing a rule cross decision table according to the condition combination, includes:
[0029] Determine a condition combination according to the condition variable and the condition value, and determine a corresponding decision result according to the condition combination and the logical expression;
[0030] The decision result is mapped to the condition combination to construct a corresponding rule intersection decision table.
[0031] In a second aspect, the present application provides a front-end form generating device, comprising:
[0032] A business rule preprocessing module is used to receive business rules input by a user, extract entity features in the business rules, perform entity relationship recognition operations on the entity features according to a preset knowledge graph, determine corresponding inter-entity relationship features, perform entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determine corresponding preprocessing business rules;
[0033] A business rule identification module is used to input the pre-processed business rules into a preset intent identification algorithm, determine the corresponding business rule intent according to the prediction results output by the preset intent identification algorithm and a preset synonym dictionary; determine the corresponding business rule entity according to the pre-processed business rules and a preset entity extraction model; perform dependency syntactic analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationship;
[0034] The business rule logic construction module is used to construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition value according to the extracted condition variable, determine the corresponding condition combination according to the condition variable and the condition value, construct a rule cross-decision table according to the condition combination, and render the obtained rule cross-decision table to the front-end interactive page.
[0035] It can be seen from the above technical scheme that the present application provides a front-end form generation method and device, which receives business rules input by users, extracts entity features in business rules, performs entity semantic disambiguation operations on entity features according to relationship features between entities, determines corresponding pre-processed business rules, inputs the pre-processed business rules into a preset intent recognition algorithm, and determines corresponding business rule intents; determines corresponding business rule entities according to pre-processed business rules and preset entity extraction models; performs dependency syntactic analysis operations and relational pattern matching operations on pre-processed business rules to determine corresponding business rule relationships; constructs corresponding business rule logical expressions according to business rule intents, business rule entities, and business rule relationships; determines corresponding condition combinations according to conditional variables and conditional values, and constructs a rule cross-decision table according to the condition combinations, thereby improving the efficiency and accuracy of front-end form generation based on rule automatic extraction technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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.
[0037] Figure 1 This is one of the flow charts of the front-end form generation method in the embodiment of the present application;
[0038] Figure 2 This is the second flow chart of the front-end form generation method in the embodiment of the present application;
[0039] Figure 3 The third flowchart of the front-end form generation method in the embodiment of the present application;
[0040] Figure 4 This is a fourth flow chart of the front-end form generation method in an embodiment of the present application;
[0041] Figure 5 This is a fifth flow chart of the front-end form generation method in an embodiment of the present application;
[0042] Figure 6 This is a sixth flow chart of the front-end form generation method in an embodiment of the present application;
[0043] Figure 7 FIG7 is a flow chart of the front-end form generation method in the embodiment of the present application;
[0044] Figure 8 It is a structural diagram of the front-end form generating device in the embodiment of the present application;
[0045] Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0046] Reference numerals:
[0047] Business rule preprocessing module 10 , business rule identification module 20 , business rule logic construction module 30 .
[0048] 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
[0049] 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.
[0050] 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.
[0051] Considering that the current form development process is too dependent on manual definition, has poor reusability, low efficiency and low accuracy, and cannot meet the requirements of enterprises for efficiency and accuracy of rule management. The present application provides a front-end form generation method and device, which receives business rules input by users, extracts entity features in business rules, performs entity semantic disambiguation operations on entity features according to the relationship features between entities, determines the corresponding pre-processed business rules, inputs the pre-processed business rules into a preset intent recognition algorithm, and determines the corresponding business rule intent; determines the corresponding business rule entity according to the pre-processed business rules and the preset entity extraction model; performs dependency syntax analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationship; constructs the corresponding business rule logical expression according to the business rule intent, business rule entity and business rule relationship; determines the corresponding condition combination according to the condition variable and condition value, and constructs a rule cross-decision table according to the condition combination, thereby improving the efficiency and accuracy of front-end form generation based on rule automatic extraction technology.
[0052] In order to improve the efficiency and accuracy of front-end form generation based on rule-based automatic extraction technology, the present application provides an embodiment of a front-end form generation method, see Figure 1 , the front-end form generation method specifically includes the following contents:
[0053] Step S101: receiving a business rule input by a user, extracting entity features in the business rule, performing entity relationship recognition operations on the entity features according to a preset knowledge graph, determining corresponding inter-entity relationship features, performing entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determining corresponding pre-processing business rules;
[0054] Optionally, in this embodiment, the main purpose of this step is to pre-process the business rules input by the user so that the subsequent input algorithm model can predict the pre-processed data. Pre-processing includes but is not limited to: standardization, data type conversion, data deduplication, disambiguation, and alignment.
[0055] Among them, the most critical step is the disambiguation operation. Through data disambiguation, the ambiguous problems in the data can be resolved and the consistency and accuracy of the data can be ensured.
[0056] Optionally, in this embodiment, an entity relationship recognition operation is performed on the entity features according to a preset knowledge graph. This step is to use the knowledge graph to identify the relationship between entities and concepts, such as "Company H acquired Company A".
[0057] According to the above relationship characteristics, find the synonyms that are closest to the entity relationship, such as "Group H acquired Company A", "HAWEI Company acquired Company A", etc. in the knowledge graph. At this time, according to the knowledge graph, synonyms or different titles related to "Company H" include "Group H", "HAWEI Company", etc. At this time, perform disambiguation operations to resolve the ambiguity that may be caused by synonyms, ensure that they point to the same entity, update the entity's feature information based on the disambiguation results, and use the updated entity information to improve or correct the original business rules.
[0058] Understandably, the result is pre-processed and updated business rules that are now more accurate and suitable for automated processing.
[0059] For example:
[0060] Assume that the user enters the following business rule:
[0061] "When customers purchase more than 1,000 yuan, the system automatically issues coupons."
[0062] In this example, the steps might be:
[0063] Extract entity features: Identify "customer" and "1,000 yuan" as entities.
[0064] Entity relationship identification: Determine that "purchase" is an action and associate "customer" and "amount".
[0065] Determine the characteristics of relationships between entities: "Purchase" is a transaction type relationship.
[0066] Synonym entity features: If “customer” is referred to as “user” or “consumer” elsewhere, identify these as synonyms.
[0067] Disambiguation: Ensure that the term "customer" refers to the same entity throughout the business rules to avoid ambiguity.
[0068] Update entity characteristics: If "customer" has multiple meanings, update it to a more specific entity, such as "registered customer" or "VIP customer".
[0069] Update business rules: Update the original rule to "When a registered customer purchases more than 1,000 yuan, the system automatically issues a VIP coupon."
[0070] Preprocessing business rules: The rules that are finally updated and preprocessed can be used by the system to automate the logic of issuing coupons.
[0071] Through this process, the original business rules are preprocessed to make them more accurate and automation-friendly, laying a solid data preprocessing foundation for the subsequent input of business rules into the algorithm model for model training.
[0072] Step S102: input the pre-processed business rules into a preset intent recognition algorithm, determine the corresponding business rule intent according to the prediction result output by the preset intent recognition algorithm and a preset synonym dictionary; determine the corresponding business rule entity according to the pre-processed business rules and a preset entity extraction model; perform dependency syntactic analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationship;
[0073] Optionally, in this embodiment, by extracting business rule intent, business rule entities and business rule relationships from pre-processed business rules, a foundation is laid for the subsequent construction of business rule logical expressions. The three extraction steps are performed by preset natural language processing technology. Among them, business rule intent is the intention behind the user input text; business rule entities are entities with specific meanings, such as names, places, times, conditions, operations and values; business rule relationships involve identifying and understanding the logical connections between entities in the text.
[0074] For example, a user enters the business rule "If the user is over 18 years old and the account balance exceeds 1,000 yuan, the user is allowed to make large transfers."
[0075] Identify intent:
[0076] The intention is to "allow users to transfer large amounts of money."
[0077] Identify entities:
[0078] Entity 1: User Age (Condition)
[0079] Entity 2: Account Balance (Condition)
[0080] Identify the relationship:
[0081] Relation 1: User age > 18 years old (Condition 1)
[0082] Relation 2: Account balance > 1,000 yuan (condition 2)
[0083] Logical Connectives: "AND" (AND Operation)
[0084] Using the identified intents, entities, and relationships, we can build the following logical expressions:
[0085] IF (user age>18) AND (account balance>1000)
[0086] THEN allows users to transfer large amounts
[0087] Through the above operations, the language input by the user can be converted into a logical expression through natural language processing (NLP) technology, laying the foundation for the subsequent generation of a cross-validation table.
[0088] Optionally, in this embodiment, the intent of extracting business rules uses an intent recognition algorithm in natural language processing (NLP) technology.
[0089] Optionally, in this embodiment, the preprocessed business rules are input into a preset intent recognition algorithm, and the corresponding business rule intent is determined based on the prediction results output by the preset intent recognition algorithm and a preset synonym dictionary. The purpose of this step is to use machine learning to identify the intent in the business rules input by the user. The purpose of using the synonym dictionary in this step is to enhance the data and help identify the user intent more accurately, and the purpose of using synonyms in the above step S101 is to disambiguate and ensure that the original data is clean to facilitate machine learning.
[0090] Specifically, in this embodiment, the preprocessed business rules are used for text feature extraction and input into a trained long short-term memory network (LSTM) for intent recognition. It can be understood that the use of a sequence model can effectively enhance the model's understanding of the context and increase the accuracy of intent recognition.
[0091] In order to further increase the accuracy of intent recognition, the prediction results output by the long short-term memory network (LSTM) model are enhanced through data enhancement technology, and the enhanced data is input into the model to obtain business rule intent. After data enhancement, the model can more accurately identify user intent and lay the foundation for the subsequent construction of user business logic expressions.
[0092] Data augmentation technology can increase the diversity of training data and help improve the generalization ability of the model. Data augmentation includes but is not limited to:
[0093] 1. Synonym expansion: Use a synonym dictionary to replace certain words in the text with their synonyms.
[0094] For example, replace "buy" with "get" or "order".
[0095] Original sentence: "I would like to buy a book."
[0096] Enhance the sentence: "I would like to get a book."
[0097] 2. Synonym replacement: Use a synonym dictionary to replace words in a sentence.
[0098] Original sentence: "I can't access my email."
[0099] Enhanced sentence: "I can't access my email account."
[0100] 3. Sentence Reorganization: Changing the word order in a sentence while keeping the semantics intact. This can be achieved through grammatical parsing and reorganizing the sentence structure.
[0101] Original sentence: "I need help setting up my account."
[0102] Enhanced sentence: "I need help setting up my account."
[0103] 4. Random Insertion: Randomly insert context-related words in the sentence, which are selected from the intent-related vocabulary.
[0104] Original sentence: "I can't find my order."
[0105] Enhanced sentence: "I can't find my order details in my account."
[0106] 5. Random swap: Randomly swap the nouns or adjectives in a sentence while maintaining the meaning of the sentence.
[0107] Original sentence: "I need a big red school bag."
[0108] Enhance the sentence: "I need a large red school bag."
[0109] It is understandable that through data augmentation technology, the diversity and coverage of training data can be effectively increased, thereby helping the model to learn and generalize better and increasing the accuracy of intent recognition output by the model.
[0110] Optionally, in this embodiment, an entity extraction model in natural language processing (NLP) technology is used to extract business rule entities.
[0111] Optionally, in this embodiment, the corresponding business rule entity is determined based on the preprocessed business rules and the preset entity extraction model. The purpose of this step is to use machine learning to identify the rule entities in the business rules input by the user, which helps to subsequently construct logical expressions.
[0112] Specifically, in this embodiment, first, the preprocessed business rules are subjected to text feature extraction and input into the input layer of the entity extraction conditional random field (CRF) model. The input layer is a functional layer in which the model receives feature representations of input sequences and passes them to the next layer.
[0113] Secondly, the features output by the input layer are input into the feature function layer, which defines the feature functions (state features) used in the model to capture local features in the input sequence.
[0114] Then, the output of the feature function layer is input into the potential energy function layer, and the potential energy function layer calculates the potential energy of each label sequence according to the output of the feature function, including: at least one of the local normalized potential energy and the global normalized potential energy, wherein the local normalized potential energy is used to capture the state of a single label, and the global normalized potential energy is used to capture the transfer between label sequences.
[0115] Finally, the output of the potential function layer is input to the output layer, which generates the predicted label of the sequence. During the decoding process, the Viterbi algorithm is usually used to find the label sequence with the highest joint probability.
[0116] It can be understood that performing entity extraction on business rules using the entity extraction model trained in the above manner can increase the efficiency and accuracy of entity extraction.
[0117] Optionally, in this embodiment, dependency syntactic analysis in natural language processing (NLP) technology is used to extract business rule relationships.
[0118] Optionally, in this embodiment, dependency syntactic analysis and relational pattern matching operations are performed on the pre-processed business rules to determine the corresponding business rule relationships. The purpose of this step is to analyze and identify the relationship between the business rules input by the user through technical means, which helps to subsequently construct logical expressions.
[0119] Specifically, in this embodiment, firstly, the business rules are subjected to dependency syntactic analysis to determine the dependency relationship between words in the sentence structure. In dependency syntactic analysis, there is a binary inequality relationship between words in a sentence: a master-slave relationship. In a sentence, if one word modifies another word, the modifier is called a dependent word, and the modified word is called a head word. The grammatical relationship between the two is a dependency relation.
[0120] For example, there is the following sentence: "Zhang San borrowed 500 yuan from Li Si on June 21, 2023, and agreed to return it in one month." According to dependency syntactic analysis, the dependency relationship between words is determined. "Borrowed" depends on "Zhang San", indicating the executor of the action. "500 yuan" depends on "borrowed", indicating the object of the action. Secondly, identify the preset logical connectives. In the above example, the logical connective is "and", which indicates a parallel relationship and connects two actions: "borrowed 500 yuan" and "agreed to return it in one month." The preset logical connectives also include words that express conditional, parallel, transitional and other relationships. Then, a relationship matching graph is constructed through the above sentence structure and logical connectives, and the identified entities and relationships are represented in a graphical way. Finally, the identified relationships are classified. In the above example, they can be classified as:
[0121] Loan relationship: the loan behavior between Zhang San and Li Si.
[0122] Temporal relationship: the time when the borrowing behavior occurs.
[0123] It can be understood that by performing relational pattern matching based on dependency syntactic division and logical connectives, the relationship between business rules can be accurately obtained, which is helpful for the subsequent construction of logical expressions.
[0124] Through the above three extraction steps, the business rule intent, business rule entities and business rule relationships in the business rules input by the user are obtained. According to the obtained results, a solid foundation can be laid for the subsequent construction of business rule expressions.
[0125] Step S103: construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition values according to the extracted condition variables, determine the corresponding condition combinations according to the condition variables and the condition values, construct a rule cross-decision table according to the condition combinations, and render the obtained rule cross-decision table to the front-end interactive page.
[0126] Optionally, in this embodiment, the business rule intent, business rule entity and business rule relationship obtained in step S102 can be used to construct a business rule logic expression. The construction process first constructs a basic expression through the business rule intent and business rule entity, and then constructs a logical expression based on the business rule relationship and nested structure.
[0127] For example, Example 1:
[0128] The user enters the business rule "If the user is over 18 years old and the account balance exceeds 1,000 yuan, the user is allowed to make large transfers."
[0129] Step 1: Determine the business rule intent
[0130] The purpose of the business rule is to determine whether a user is allowed to make a large transfer. The rule has two conditions that must be met at the same time: the user is over 18 years old and the account balance is more than 1,000 yuan.
[0131] Step 2: Extract business rule entities
[0132] From the business rule text, the following entities can be extracted: user age, account balance.
[0133] Step 3: Build basic expressions using intent and entities
[0134] User age is over 18: User age>18
[0135] Account balance exceeds 1,000 yuan: Account balance>1,000
[0136] Step 4: Determine business rule relationships
[0137] These two conditions are in an AND relationship, that is, both conditions must be met.
[0138] Finally, the following logical expression can be constructed:
[0139] IF (user age>18) AND (account balance>1000)
[0140] THEN allows users to transfer large amounts.
[0141] Optionally, in this embodiment, the construction process uses a rule-based approach, that is, using predefined rule templates and conditional variables to automatically construct logical expressions through a rule engine.
[0142] First, define a rule template that can insert specific conditional variables and operations, for example:
[0143] IF [condition 1] AND [condition 2] THEN [action]
[0144] The rule template is then populated based on the intent, entities, and relationships identified by the business rules.
[0145] It will be appreciated that a rules engine can be configured to receive real-time data streams and automatically make decisions based on predefined rules. For example, an online banking system can use a rules engine to automatically approve or deny loan applications, or an e-commerce platform can use a rules engine to automatically apply discounts and promotions.
[0146] Optionally, in this embodiment, if there are rules in addition to the above rules:
[0147] For example, Example 2:
[0148] User input business rules:
[0149] Rule 1: If the user is over 18 years old and the account balance exceeds 1,000 yuan, the user is allowed to make large transfers.
[0150] Rule 2: If the user is a VIP, large transfers are allowed regardless of the account balance.
[0151] Using the identified intents, entities, and relationships, we can build the following logical expressions:
[0152] Allow large transfers = ((age>18)∧(account balance>1000))∨(VIP).
[0153] ∧: Logical AND, meaning both conditions must be true.
[0154] ∨: Logical OR, indicating that at least one of the conditions is true.
[0155] (Age>18)∧(Account Balance>1000) means that the user is older than 18 and the account balance exceeds 1000 yuan.
[0156] VIP means the user is a VIP. The entire expression uses the logical OR ∨ to connect the two parts, indicating that as long as any condition is met, the user can make large transfers.
[0157] Optionally, in this embodiment, the conditional variables in the business rule logic expression are extracted. The logic expression is a standard structure expression. Therefore, it is most effective to use a regular expression for extraction. Conditional variables are the basic elements that constitute logical judgments. They represent specific conditions that need to be evaluated as true or false. Logical operators divide expressions into different clauses. When extracting conditional variables, specific numerical values and comparison operators in the clauses need to be ignored. Therefore, in the above example, the conditional variables are age, account balance, and VIP.
[0158] Optionally, in this embodiment, the corresponding condition value is determined based on the extracted condition variable, and the condition value is formed based on the condition variable. For example, if the condition variable is age, there are two corresponding condition values: >18 years old is yes; ≦18 years old is no.
[0159] Optionally, in this embodiment, a corresponding condition combination is determined according to the condition variable and the condition value, and a rule cross decision table is constructed according to the condition combination. This step is to determine the decision result through all possible combinations of condition variables and condition values, for example:
[0160] 1. The conditional value of the age conditional variable is "yes"; the conditional value of the account balance conditional variable is "yes", and the decision result corresponding to the comprehensive judgment is "allow".
[0161] 2. The conditional value of the age conditional variable is "yes"; the conditional value of the account balance conditional variable is "no", and the corresponding decision result of the comprehensive judgment is "not allowed".
[0162] 3. The conditional value of the age conditional variable is "No"; the conditional value of the account balance conditional variable is "Yes", and the decision result corresponding to the comprehensive judgment is "Not Allowed".
[0163] 4. The conditional value of the age conditional variable is "No"; the conditional value of the account balance conditional variable is "No", and the corresponding decision result of the comprehensive judgment is "Not Allowed".
[0164] Above, according to the logical expression, R is allowed only when A is "yes" and B is "yes".
[0165] The decision results obtained according to the above conditional variables, conditional values and logical expressions are mapped to the corresponding conditional combinations to obtain the corresponding cross-decision table in tabular form, and the obtained table is rendered to the page for display.
[0166] This example demonstrates how this embodiment uses natural language processing technology to extract business rule intent, business rule entities, and business rule relationships in the business rule requirements input by the user, builds a logical expression based on a predefined rule engine, and finally obtains a front-end form (cross-decision table) suitable for the user's business through the conditional variables and conditional values in the logical expression.
[0167] From the above description, it can be seen that the front-end form generation method provided in the embodiment of the present application can extract entity features in the business rules by receiving business rules input by the user, perform entity semantic disambiguation operations on the entity features according to the relationship features between entities, determine the corresponding pre-processed business rules, input the pre-processed business rules into the preset intent recognition algorithm, and determine the corresponding business rule intent; determine the corresponding business rule entities according to the pre-processed business rules and the preset entity extraction model; perform dependency syntax analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationships; construct the corresponding business rule logical expressions according to the business rule intents, business rule entities and business rule relationships; determine the corresponding condition combinations according to the condition variables and condition values, and construct a rule cross-decision table according to the condition combinations, thereby improving the efficiency and accuracy of front-end form generation based on rule automatic extraction technology.
[0168] In one embodiment of the front-end form generation method of the present application, see Figure 2, and can also include the following:
[0169] Step S201: determining a synonym entity feature corresponding to the entity feature according to the inter-entity relationship feature, and performing a disambiguation operation on the synonym entity feature to determine a corresponding updated entity feature, wherein the disambiguation operation includes at least one of replacement and merging;
[0170] Step S202: updating the business rules according to the update entity characteristics and determining corresponding pre-processing business rules.
[0171] Optionally, in this embodiment, the synonym entity features corresponding to the entity features are determined according to the inter-entity relationship features, and the synonym entity features with the closest relationship to the entity features are identified according to the preset knowledge graph, for example: for example, "Company H acquired Company A". According to the above relationship features, the synonyms with the closest entity relationship are found, such as "Group H acquired Company A", "HAWEI Company acquired Company A", etc. that have appeared in the knowledge graph. At this time, according to the knowledge graph, synonyms or different titles related to "Company H" include "Group H", "HAWEI Company", etc.
[0172] Optionally, in this embodiment, a disambiguation operation is performed on the synonym entity features to determine the corresponding updated entity features. At this time, a disambiguation operation is performed to resolve ambiguities that may be caused by synonyms and ensure that they point to the same entity. The feature information of the entity is updated according to the disambiguation results and the updated entity information is used to improve or correct the original business rules.
[0173] Optionally, in this embodiment, the disambiguation operation may merge all synonyms into one representative word, or may replace other synonyms with one word.
[0174] It is understandable that the business rules are updated using the disambiguated data, ultimately resulting in pre-processed and updated business rules that are now more accurate and suitable for automated processing.
[0175] Through step S202, this embodiment obtains the preprocessed user business rules, which are consistent in data format and meaning, and lay a solid foundation for subsequent use of the preprocessed data for machine learning.
[0176] In one embodiment of the front-end form generation method of the present application, see Figure 3 , and can also include the following:
[0177] Step S301: inputting the text features extracted from the preprocessing business rules into a preset intention recognition long short-term memory network to determine the corresponding prediction results;
[0178] Step S302: performing data enhancement operations according to the prediction results and a preset synonym dictionary to determine the corresponding business rule intent, wherein the data enhancement operations include at least one of synonym expansion, synonym replacement, and sentence reorganization.
[0179] Optionally, in this embodiment, the intent of the business rule is extracted using an intent recognition algorithm in natural language processing (NLP). The preprocessed business rule is input into a preset intent recognition algorithm, and the corresponding business rule intent is determined based on the prediction result output by the preset intent recognition algorithm and a preset synonym dictionary. The purpose of this step is to use machine learning to identify the intent in the business rule input by the user. The purpose of using the synonym dictionary in this step is to enhance the data and help identify the user intent more accurately.
[0180] Specifically, in this embodiment, the preprocessed business rules are used for text feature extraction and input into a trained long short-term memory network (LSTM) for intent recognition. It can be understood that the use of a sequence model can effectively enhance the model's understanding of the context and increase the accuracy of intent recognition.
[0181] In order to further increase the accuracy of intent recognition, the prediction results output by the long short-term memory network (LSTM) model are enhanced through data enhancement technology, and the enhanced data is input into the model to obtain business rule intent. After data enhancement, the model can more accurately identify user intent and lay the foundation for the subsequent construction of user business logic expressions.
[0182] Data augmentation technology can increase the diversity of training data and help improve the generalization ability of the model. Data augmentation includes but is not limited to:
[0183] 1. Synonym expansion: Use a synonym dictionary to replace certain words in the text with their synonyms.
[0184] For example, replace "buy" with "get" or "order".
[0185] Original sentence: "I would like to buy a book."
[0186] Enhance the sentence: "I would like to get a book."
[0187] 2. Synonym replacement: Use a synonym dictionary to replace words in a sentence.
[0188] Original sentence: "I can't access my email."
[0189] Enhanced sentence: "I can't access my email account."
[0190] 3. Sentence Reorganization: Changing the word order in a sentence while keeping the semantics intact. This can be achieved through grammatical parsing and reorganizing the sentence structure.
[0191] Original sentence: "I need help setting up my account."
[0192] Enhanced sentence: "I need help setting up my account."
[0193] 4. Random Insertion: Randomly insert context-related words in the sentence, which are selected from the intent-related vocabulary.
[0194] Original sentence: "I can't find my order."
[0195] Enhanced sentence: "I can't find my order details in my account."
[0196] 5. Random swap: Randomly swap the nouns or adjectives in a sentence while maintaining the meaning of the sentence.
[0197] Original sentence: "I need a big red school bag."
[0198] Enhance the sentence: "I need a large red school bag."
[0199] It is understandable that through data augmentation technology, the diversity and coverage of training data can be effectively increased, thereby helping the model to learn and generalize better and increasing the accuracy of intent recognition output by the model.
[0200] Through step S302, this embodiment realizes accurate recognition of user intention in user rules, laying a solid foundation for subsequent construction of logical expressions.
[0201] In one embodiment of the front-end form generation method of the present application, see Figure 4 , and can also include the following:
[0202] Step S401: inputting the text features extracted from the preprocessing business rules into a preset entity extraction conditional random field model, performing a feature capture operation on the text features according to the feature function layer of the preset entity extraction conditional random field model, and determining corresponding capture features;
[0203] Step S402: inputting the captured features into the potential energy function layer of the preset entity extraction conditional random field model to determine the corresponding normalized potential energy;
[0204] Step S403: input the normalized potential energy into the output layer of the preset entity extraction conditional random field model to determine the corresponding business rule entity.
[0205] Optionally, in this embodiment, the corresponding business rule entity is determined based on the preprocessed business rules and the preset entity extraction model. The purpose of this step is to use machine learning to identify the rule entities in the business rules input by the user, which helps to subsequently construct logical expressions.
[0206] Specifically, in this embodiment, first, the preprocessed business rules are subjected to text feature extraction and input into the input layer of the entity extraction conditional random field (CRF) model. The input layer is a functional layer in which the model receives feature representations of input sequences and passes them to the next layer.
[0207] Secondly, the features output by the input layer are input into the feature function layer, which defines the feature functions (state features) used in the model to capture local features in the input sequence.
[0208] Then, the output of the feature function layer is input into the potential energy function layer, and the potential energy function layer calculates the potential energy of each label sequence according to the output of the feature function, including: at least one of the local normalized potential energy and the global normalized potential energy, wherein the local normalized potential energy is used to capture the state of a single label, and the global normalized potential energy is used to capture the transfer between label sequences.
[0209] Finally, the output of the potential function layer is input to the output layer, which generates the predicted label of the sequence. During the decoding process, the Viterbi algorithm is usually used to find the label sequence with the highest joint probability.
[0210] It can be understood that performing entity extraction on business rules using the entity extraction model trained in the above manner can increase the efficiency and accuracy of entity extraction.
[0211] Through step S403, this embodiment successfully realizes accurate identification of user entities in user rules, laying a solid foundation for subsequent construction of logical expressions.
[0212] In one embodiment of the front-end form generation method of the present application, see Figure 5 , and can also include the following:
[0213] Step S501: performing dependency syntactic analysis on the pre-processing business rule to determine the corresponding sentence structure;
[0214] Step S502: performing a relational pattern matching operation according to preset logical connectives and the sentence structure to determine a corresponding relational matching graph;
[0215] Step S503: performing a relationship classification operation according to the relationship matching graph to determine the corresponding business rule relationship.
[0216] Optionally, in this embodiment, dependency syntactic analysis in natural language processing (NLP) technology is used to extract business rule relationships.
[0217] Optionally, in this embodiment, dependency syntactic analysis and relational pattern matching operations are performed on the pre-processed business rules to determine the corresponding business rule relationships. The purpose of this step is to analyze and identify the relationship between the business rules input by the user through technical means, which helps to subsequently construct logical expressions.
[0218] Specifically, in this embodiment, firstly, the business rules are subjected to dependency syntactic analysis to determine the dependency relationship between words in the sentence structure. In dependency syntactic analysis, there is a binary inequality relationship between words in a sentence: a master-slave relationship. In a sentence, if one word modifies another word, the modifier is called a dependent word, and the modified word is called a head word. The grammatical relationship between the two is a dependency relation.
[0219] For example, there is the following sentence: "Zhang San borrowed 500 yuan from Li Si on June 21, 2023, and agreed to return it in one month." According to dependency syntactic analysis, the dependency relationship between words is determined. "Borrowed" depends on "Zhang San", indicating the executor of the action. "500 yuan" depends on "borrowed", indicating the object of the action. Secondly, identify the preset logical connectives. In the above example, the logical connective is "and", which indicates a parallel relationship and connects two actions: "borrowed 500 yuan" and "agreed to return it in one month." The preset logical connectives also include words that express conditional, parallel, transitional and other relationships. Then, a relationship matching graph is constructed through the above sentence structure and logical connectives, and the identified entities and relationships are represented in a graphical way. Finally, the identified relationships are classified. In the above example, they can be classified as:
[0220] Loan relationship: the loan behavior between Zhang San and Li Si.
[0221] Temporal relationship: the time when the borrowing behavior occurs.
[0222] It can be understood that by performing relational pattern matching based on dependency syntactic division and logical connectives, the relationship between business rules can be accurately obtained, which is helpful for the subsequent construction of logical expressions.
[0223] Through step S503, this embodiment successfully realizes accurate identification of user relationships in user rules, laying a solid foundation for subsequent construction of logical expressions.
[0224] In one embodiment of the front-end form generation method of the present application, see Figure 6 , and can also include the following:
[0225] Step S601: construct a basic expression according to the business rule intent and the business rule entity;
[0226] Step S602: construct a business rule logic expression according to the basic expression, the business rule relationship and the preset nested logic rule.
[0227] Optionally, in this embodiment, the business rule intent, business rule entity and business rule relationship obtained through the above steps can be used to construct a business rule logic expression. The construction process first constructs a basic expression through the business rule intent and business rule entity, and then constructs a logical expression based on the business rule relationship and nested structure.
[0228] For example,
[0229] The user enters the business rule "If the user is over 18 years old and the account balance exceeds 1,000 yuan, the user is allowed to make large transfers."
[0230] Step 1: Based on the above business rule intent and business rule entity, construct the basic expression as follows:
[0231] User age is over 18: User age>18
[0232] Account balance exceeds 1,000 yuan: Account balance>1,000
[0233] Step 2: Construct the logical expression based on the business rule relationship and nested structure as follows:
[0234] IF (user age>18) AND (account balance>1000)
[0235] THEN allows users to make large transfers.
[0236] Optionally, in this embodiment, the construction process uses a rule-based approach, that is, using predefined rule templates and conditional variables to automatically construct logical expressions through a rule engine.
[0237] First, define a rule template that can insert specific conditional variables and operations, for example:
[0238] IF [condition 1] AND [condition 2] THEN [action]
[0239] The rule template is then populated based on the intent, entities, and relationships identified by the business rules.
[0240] It will be appreciated that a rules engine can be configured to receive real-time data streams and automatically make decisions based on predefined rules. For example, an online banking system can use a rules engine to automatically approve or deny loan applications, or an e-commerce platform can use a rules engine to automatically apply discounts and promotions.
[0241] Through step S602, this embodiment successfully obtains the user rule logical expression, laying a solid foundation for subsequently building a front-end form according to the logical expression.
[0242] In one embodiment of the front-end form generation method of the present application, see Figure 7 , and can also include the following:
[0243] Step S701: determining a condition combination according to the condition variable and the condition value, and determining a corresponding decision result according to the condition combination and the logical expression;
[0244] Step S702: Mapping the decision result to the condition combination to construct a corresponding rule intersection decision table;
[0245] Optionally, in this embodiment, the conditional variables in the business rule logic expression are extracted. The logic expression is a standard structure expression. Therefore, it is most effective to use a regular expression for extraction. The conditional variables are the basic elements that constitute logical judgments. They represent specific conditions that need to be evaluated as true or false. Logical operators divide the expression into different clauses. When extracting the conditional variables, the specific numerical values and comparison operators in the clauses need to be ignored.
[0246] For example, a user enters the business rule "If the user is over 18 years old and the account balance exceeds 1,000 yuan, the user is allowed to make large transfers."
[0247] The logical expression is as follows: Allow large transfers = ((age>18)∧(account balance>1000))
[0248] Among them, the conditional variables are age and account balance.
[0249] There are two cases for the conditional values corresponding to the conditional variable: when age>18, the conditional value is yes; when age≦18, the conditional value is no.
[0250] All condition combinations can be constructed based on condition variables and condition values, and the corresponding decision results can be determined based on whether the condition combinations conform to the logical expression. Taking the above example, there are four condition combinations, and the decision results are:
[0251] 1. The conditional value of the age conditional variable is "yes"; the conditional value of the account balance conditional variable is "yes", and the decision result corresponding to the comprehensive judgment is "allow".
[0252] 2. The conditional value of the age conditional variable is "yes"; the conditional value of the account balance conditional variable is "no", and the corresponding decision result of the comprehensive judgment is "not allowed".
[0253] 3. The conditional value of the age conditional variable is "No"; the conditional value of the account balance conditional variable is "Yes", and the decision result corresponding to the comprehensive judgment is "Not Allowed".
[0254] 4. The conditional value of the age conditional variable is "No"; the conditional value of the account balance conditional variable is "No", and the corresponding decision result of the comprehensive judgment is "Not Allowed".
[0255] Above, according to the logical expression, R is allowed only when A is "yes" and B is "yes".
[0256] The decision results obtained according to the above conditional variables, conditional values and logical expressions are mapped to the corresponding conditional combinations to obtain the corresponding cross-decision table in tabular form, and the obtained table is rendered to the page for display.
[0257] Through step S702, this embodiment successfully obtains a front-end form (cross decision table) suitable for the user's business through the conditional variables and conditional values in the logical expression.
[0258] In order to improve the efficiency and accuracy of front-end form generation based on rule-based automatic extraction technology, the present application provides an embodiment of a front-end form generation device for implementing all or part of the content of the front-end form generation method, see Figure 8 , the front-end form generating device specifically includes the following contents:
[0259] The business rule preprocessing module 10 is used to receive the business rules input by the user, extract the entity features in the business rules, perform entity relationship recognition operations on the entity features according to the preset knowledge graph, determine the corresponding inter-entity relationship features, perform entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determine the corresponding preprocessing business rules;
[0260] The business rule identification module 20 is used to input the pre-processed business rules into a preset intent identification algorithm, determine the corresponding business rule intent according to the prediction result output by the preset intent identification algorithm and a preset synonym dictionary; determine the corresponding business rule entity according to the pre-processed business rules and a preset entity extraction model; perform dependency syntactic analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationship;
[0261] The business rule logic construction module 30 is used to construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition values according to the extracted condition variables, determine the corresponding condition combination according to the condition variables and the condition values, construct a rule cross-decision table according to the condition combination, and render the obtained rule cross-decision table to the front-end interactive page.
[0262] From the above description, it can be seen that the front-end form generation device provided in the embodiment of the present application can extract entity features in the business rules by receiving business rules input by the user, perform entity semantic disambiguation operations on the entity features according to the relationship features between entities, determine the corresponding pre-processed business rules, input the pre-processed business rules into the preset intent recognition algorithm, and determine the corresponding business rule intent; determine the corresponding business rule entities according to the pre-processed business rules and the preset entity extraction model; perform dependency syntax analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationships; construct the corresponding business rule logical expressions according to the business rule intents, business rule entities and business rule relationships; determine the corresponding condition combinations according to the condition variables and condition values, and construct a rule cross-decision table according to the condition combinations, thereby improving the efficiency and accuracy of front-end form generation based on rule automatic extraction technology.
[0263] From the hardware level, in order to improve the efficiency and accuracy of front-end form generation based on rule-based automatic extraction technology, the present application provides an embodiment of an electronic device for implementing all or part of the content of the front-end form generation method, and the electronic device specifically includes the following content:
[0264] 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 front-end form generation method and related devices such as the core business system, user terminal and related database; 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 front-end form generation method in the embodiment, and the embodiment of the front-end form generation method, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0265] 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.
[0266] In practical applications, part of the front-end form generation method 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.
[0267] 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.
[0268] 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. 9 As 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.
[0269] In one embodiment, the front-end form generation method function may be integrated into the central processing unit 9100. The central processing unit 9100 may be configured to perform the following control:
[0270] Step S101: receiving a business rule input by a user, extracting entity features in the business rule, performing entity relationship recognition operations on the entity features according to a preset knowledge graph, determining corresponding inter-entity relationship features, performing entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determining corresponding pre-processing business rules;
[0271] Step S102: input the pre-processed business rules into a preset intent recognition algorithm, determine the corresponding business rule intent according to the prediction result output by the preset intent recognition algorithm and a preset synonym dictionary; determine the corresponding business rule entity according to the pre-processed business rules and a preset entity extraction model; perform dependency syntactic analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationship;
[0272] Step S103: construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition values according to the extracted condition variables, determine the corresponding condition combinations according to the condition variables and the condition values, construct a rule cross-decision table according to the condition combinations, and render the obtained rule cross-decision table to the front-end interactive page.
[0273] From the above description, it can be seen that the electronic device provided in the embodiment of the present application receives business rules input by the user, extracts entity features in the business rules, performs entity semantic disambiguation operations on the entity features according to the relationship features between entities, determines the corresponding pre-processed business rules, inputs the pre-processed business rules into the preset intent recognition algorithm, and determines the corresponding business rule intent; determines the corresponding business rule entities according to the pre-processed business rules and the preset entity extraction model; performs dependency syntax analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationships; constructs the corresponding business rule logical expressions according to the business rule intents, business rule entities and business rule relationships; determines the corresponding condition combinations according to the condition variables and condition values, and constructs a rule cross-decision table according to the condition combinations, thereby improving the efficiency and accuracy of front-end form generation based on rule automatic extraction technology.
[0274] In another embodiment, the front-end form generation method can be configured separately from the central processing unit 9100. For example, the front-end form generation method can be configured as a chip connected to the central processing unit 9100, and the functions of the front-end form generation method are realized through the control of the central processing unit.
[0275] 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.
[0276] like Fig. 9As 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.
[0277] 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.
[0278] 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.
[0279] 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.
[0280] 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.).
[0281] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 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.
[0282] 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 local area network module, etc. The communication module 9110 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 machine through the microphone 9132, and the sound stored on the machine can be played through the speaker 9131.
[0283] The embodiments of the present application also provide a computer-readable storage medium for storing a front-end form that can implement all the steps in the front-end form generation method in the above embodiment, 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 the steps in the front-end form generation method in the above embodiment, where the execution subject is a server or a client, are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0284] Step S101: receiving a business rule input by a user, extracting entity features in the business rule, performing entity relationship recognition operations on the entity features according to a preset knowledge graph, determining corresponding inter-entity relationship features, performing entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determining corresponding pre-processing business rules;
[0285] Step S102: input the pre-processed business rules into a preset intent recognition algorithm, determine the corresponding business rule intent according to the prediction result output by the preset intent recognition algorithm and a preset synonym dictionary; determine the corresponding business rule entity according to the pre-processed business rules and a preset entity extraction model; perform dependency syntax analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relational message analysis model;
[0286] Step S103: construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition values according to the extracted condition variables, determine the corresponding condition combinations according to the condition variables and the condition values, construct a rule cross-decision table according to the condition combinations, and render the obtained rule cross-decision table to the front-end interactive page.
[0287] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application receives business rules input by the user, extracts entity features in the business rules, performs entity semantic disambiguation operations on the entity features according to the relationship features between entities, determines the corresponding pre-processed business rules, inputs the pre-processed business rules into the preset intent recognition algorithm, and determines the corresponding business rule intent; determines the corresponding business rule entities according to the pre-processed business rules and the preset entity extraction model; performs dependency syntactic analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationships; constructs the corresponding business rule logical expressions according to the business rule intents, business rule entities and business rule relationships; determines the corresponding condition combinations according to the condition variables and condition values, and constructs a rule cross-decision table according to the condition combinations, thereby improving the efficiency and accuracy of front-end form generation based on rule automatic extraction technology.
[0288] The embodiments of the present application also provide a computer program product capable of implementing all the steps of the front-end form generation method 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 front-end form generation method are implemented. For example, the computer program / instruction implements the following steps:
[0289] Step S101: receiving a business rule input by a user, extracting entity features in the business rule, performing entity relationship recognition operations on the entity features according to a preset knowledge graph, determining corresponding inter-entity relationship features, performing entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determining corresponding pre-processing business rules;
[0290] Step S102: input the pre-processed business rules into a preset intent recognition algorithm, determine the corresponding business rule intent according to the prediction result output by the preset intent recognition algorithm and a preset synonym dictionary; determine the corresponding business rule entity according to the pre-processed business rules and a preset entity extraction model; perform dependency syntactic analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationship;
[0291] Step S103: construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition values according to the extracted condition variables, determine the corresponding condition combinations according to the condition variables and the condition values, construct a rule cross-decision table according to the condition combinations, and render the obtained rule cross-decision table to the front-end interactive page.
[0292] From the above description, it can be seen that the computer program product provided in the embodiment of the present application receives business rules input by the user, extracts entity features in the business rules, performs entity semantic disambiguation operations on the entity features according to the relationship features between entities, determines the corresponding pre-processed business rules, inputs the pre-processed business rules into the preset intent recognition algorithm, and determines the corresponding business rule intent; determines the corresponding business rule entities according to the pre-processed business rules and the preset entity extraction model; performs dependency syntactic analysis operations and relational pattern matching operations on the pre-processed business rules to determine the corresponding business rule relationships; constructs the corresponding business rule logical expressions according to the business rule intents, business rule entities and business rule relationships; determines the corresponding condition combinations according to the condition variables and condition values, and constructs a rule cross-decision table according to the condition combinations, thereby improving the efficiency and accuracy of front-end form generation based on rule automatic extraction technology.
[0293] It should be understood 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 aspects. 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.
[0294] 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.
[0295] 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.
[0296] 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 The steps for the functions specified in one or more boxes.
[0297] 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 front-end form generation method, characterized in that: The method comprises: Receive business rules input by a user, extract entity features in the business rules, perform entity relationship recognition operations on the entity features according to a preset knowledge graph, determine corresponding inter-entity relationship features, perform entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determine corresponding preprocessing business rules; Inputting the text features extracted from the preprocessed business rules into a preset intent recognition long short-term memory network to determine a corresponding prediction result, performing a data enhancement operation based on the prediction result and a preset synonym dictionary to determine a corresponding business rule intent, wherein the data enhancement operation includes at least one of synonym expansion, synonym replacement, and sentence reorganization; Input the text features extracted from the preprocessing business rules into a preset entity extraction conditional random field model, perform feature capture operations on the text features according to the feature function layer of the preset entity extraction conditional random field model, and determine corresponding captured features; input the captured features into the potential energy function layer of the preset entity extraction conditional random field model to determine corresponding normalized potential energy; input the normalized potential energy into the output layer of the preset entity extraction conditional random field model to determine the corresponding business rule entity; Performing dependency syntactic analysis on the preprocessed business rules to determine the corresponding sentence structure; performing a relational pattern matching operation based on preset logical connectives and the sentence structure to determine the corresponding relational matching graph; performing a relational classification operation based on the relational matching graph to determine the corresponding business rule relationship; Construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition values according to the extracted condition variables, determine the corresponding condition combinations according to the condition variables and the condition values, construct a rule cross-decision table according to the condition combinations, and render the obtained rule cross-decision table to the front-end interactive page.
2. The front-end form generation method according to claim 1, characterized in that: The performing entity semantic disambiguation operation on the entity features according to the inter-entity relationship features to determine corresponding pre-processing business rules includes: Determine a synonym entity feature corresponding to the entity feature according to the inter-entity relationship feature, and perform a disambiguation operation on the synonym entity feature to determine a corresponding updated entity feature, wherein the disambiguation operation includes at least one of replacement and merging; The business rules are updated according to the updated entity characteristics, and corresponding pre-processing business rules are determined.
3. The front-end form generation method according to claim 1, characterized in that: The constructing a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship includes: Building a basic expression according to the business rule intent and the business rule entity; A business rule logic expression is constructed according to the basic expression, the business rule relationship and the preset nested logic rule.
4. The front-end form generation method according to claim 1, characterized in that: The determining of a condition combination according to the condition variable and the condition value, and constructing a rule cross decision table according to the condition combination, comprises: Determine a condition combination according to the condition variable and the condition value, and determine a corresponding decision result according to the condition combination and the logical expression; The decision result is mapped to the condition combination to construct a corresponding rule intersection decision table.
5. A front-end form generating device, characterized in that: The device comprises: A business rule preprocessing module is used to receive business rules input by a user, extract entity features in the business rules, perform entity relationship recognition operations on the entity features according to a preset knowledge graph, determine corresponding inter-entity relationship features, perform entity semantic disambiguation operations on the entity features according to the inter-entity relationship features, and determine corresponding preprocessing business rules; A business rule identification module is used to input the text features extracted from the pre-processed business rules into a preset intent recognition long short-term memory network to determine the corresponding prediction results, perform data enhancement operations based on the prediction results and a preset synonym dictionary to determine the corresponding business rule intent, wherein the data enhancement operation includes at least one of synonym expansion, synonym replacement and sentence reorganization; input the text features extracted from the pre-processed business rules into a preset entity extraction conditional random field model, perform feature capture operations on the text features according to the feature function layer of the preset entity extraction conditional random field model to determine the corresponding capture features; input the capture features into the potential energy function layer of the preset entity extraction conditional random field model to determine the corresponding normalized potential energy; input the normalized potential energy into the output layer of the preset entity extraction conditional random field model to determine the corresponding business rule entity; perform dependency syntactic analysis operations on the pre-processed business rules to determine the corresponding sentence structure; perform relational pattern matching operations based on preset logical connectives and the sentence structure to determine the corresponding relational matching graph; perform relational classification operations based on the relational matching graph to determine the corresponding business rule relationship; The business rule logic construction module is used to construct a corresponding business rule logic expression according to the business rule intent, the business rule entity and the business rule relationship; extract the condition variables in the business rule logic expression, and determine the corresponding condition value according to the extracted condition variable, determine the corresponding condition combination according to the condition variable and the condition value, construct a rule cross-decision table according to the condition combination, and render the obtained rule cross-decision table to the front-end interactive page.
6. 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 front-end form generation method described in any one of claims 1 to 4 are implemented.
7. 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 front-end form generation method described in any one of claims 1 to 4 are implemented.
