Business rule generation method and system, electronic equipment, medium and program product

By automating the processing of natural language descriptions and constructing structured intents, and combining multi-source data and deep retrieval models, high-accuracy and high-coverage business rules are generated, solving the problem of inconsistent rule generation in existing technologies and realizing automated and consistent rule generation.

CN121880423AActive Publication Date: 2026-04-17HUA DATA TECH (SHANGHAI) CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUA DATA TECH (SHANGHAI) CO LTD
Filing Date
2026-03-18
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies struggle to automatically integrate multi-source text, structured fields, and model capabilities, resulting in low rule generation accuracy, low coverage, and inconsistent expression. Rule construction relies on manual reading, leading to informal terminology, industry slang, scattered document information, difficulty in covering key clauses, and a lack of a unified atomic rule expression system.

Method used

By acquiring natural language descriptions from user input, converting them into structured business intents, obtaining document-type, tabular, and structured data sources, performing semantic retrieval and contextual information extraction, constructing field candidate sets and value range mappings, generating initial rule drafts using retrieval enhancement generation models, supplementing rule content through deep retrieval planning models, and finally preprocessing to generate business rules.

Benefits of technology

It improves the accuracy and coverage of rule generation, avoids inconsistencies in rule expression, achieves automated and consistent rule generation, and reduces the cost of manual rule writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880423A_ABST
    Figure CN121880423A_ABST
Patent Text Reader

Abstract

The invention provides a business rule generation method and system, electronic equipment, a medium and a program product. The business rule generation method comprises the steps of converting natural language description information input by a user into a structured business intention; performing semantic retrieval according to the structured business intention, and extracting context information from the document type data and the table type data; constructing a field candidate set and value domain mapping based on the structured data source; inputting the structured business intention, the context information, the field candidate set and the value domain mapping into a retrieval enhancement generation model to generate a rule first draft; in response to the situation that the rule first draft and the context information are input into the deep retrieval planning model, retrieval content needs to be supplemented is judged, and retrieval phrases are output; inputting the retrieval abstract, the rule first draft and the context information into a deep retrieval planning model to generate a deep rule set; and preprocessing the rule first draft and the depth rule set to obtain a business rule. The rule generation accuracy and the rule coverage are improved, and the situation that rule expression modes are inconsistent is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of business rules technology, and in particular to a method, system, electronic device, medium, and program product for generating business rules. Background Technology

[0002] Currently, for many rule-centric business areas, such as risk control verification, process compliance checks, business audits, contract review, and data quality testing, existing technologies struggle to provide a complete rule production chain that can automatically integrate multi-source text, structured fields, and model capabilities. Furthermore, traditional rule building methods rely on manual reading, which has the following problems: 1. Non-standard natural language expression and a large amount of industry jargon; user input often contains informal terms, abbreviations, or phrases with inconsistent meanings across different departments, making it difficult to unify the rule building entry point. 2. Scattered document information and key clauses appearing in multiple places; a single search cannot cover all business constraints, and manual intervention can easily overlook boundary conditions, mutually exclusive conditions, and implicit rules. 3. Numerous and complex structured data fields; lack of field whitelists or field constraints, leading to problems such as fictitious fields, undefined fields, and mismatched codes and names, making rule implementation difficult. 4. Inconsistent rule expression, difficulty in reuse and review; rules written by different personnel have inconsistent readability and execution methods, lacking a unified atomic rule expression system. Summary of the Invention

[0003] The technical problem to be solved by this disclosure is to overcome the shortcomings of existing technologies that rely on manual rule construction, such as low rule generation accuracy, low rule coverage, and inconsistent rule expression methods, and to provide a method, system, electronic device, medium, and program product for generating business rules.

[0004] This disclosure solves the above-mentioned technical problems through the following technical solution:

[0005] The first aspect of this disclosure provides a method for generating business rules, the method comprising:

[0006] Obtain natural language description information input by the user;

[0007] The natural language description information is converted into structured business intent;

[0008] Document-type data, tabular data, and structured data sources are obtained based on the natural language description information;

[0009] Semantic retrieval is performed based on the structured business intent to extract contextual information from the document-type data and the tabular-type data;

[0010] Based on the structured data source, construct a field candidate set and value range mapping;

[0011] The structured business intent, the context information, the field candidate set, and the value range mapping are all input into the retrieval enhancement generation model to generate a draft rule.

[0012] In response to inputting the initial rule draft and the context information into the deep retrieval planning model to determine the need for supplementary retrieval content, the retrieval phrase is output.

[0013] A search summary is obtained by performing a search based on the search phrase;

[0014] The search summary, the initial rule draft, and the context information are input into the deep search planning model to generate a deep rule set.

[0015] The initial draft of the rules and the set of deep rules are preprocessed to obtain the business rules.

[0016] Preferably, the step of converting the natural language description information into structured business intent includes:

[0017] The natural language description information is segmented, denoised, cleaned, and normalized to obtain the processed natural language description information.

[0018] The processed natural language description information is standardized based on the terminology mapping relationship.

[0019] The natural language description information after terminology standardization is input into the semantic classification and recognition model to identify the business scenario category to which the natural language description information after terminology standardization belongs, extract field prompt information related to business rule generation, and output structured business intent.

[0020] Preferably, the step of constructing a field candidate set and a value range mapping based on the structured data source includes:

[0021] Available fields are obtained from the structured data source to form a field candidate set;

[0022] Extract the field information of the available fields to form a value range mapping.

[0023] Preferably, the step of obtaining available fields from the structured data source to form a field candidate set includes:

[0024] Obtain the list of fields from the structured data source;

[0025] The available fields are matched with the field hint information, and the availability range of the available fields is determined from the field list;

[0026] The candidate set of fields is determined based on the available range of the available fields.

[0027] Preferably, the step of extracting the field information of the available fields to form a value range mapping includes:

[0028] Read the code table corresponding to the available fields from the structured data source;

[0029] Obtain the correspondence between the field names and encoded values ​​of the available fields from the code table;

[0030] A range mapping is formed based on the aforementioned correspondence.

[0031] Preferably, the step of preprocessing the initial rule draft and the deep rule set to obtain business rules includes:

[0032] The initial draft of the rules and the deep rule set are merged, deduplicated, atomically split, semantically clarified, and evidence source bound to obtain the business rules.

[0033] And / or,

[0034] The generation method further includes:

[0035] Convert the business rules into an executable expression;

[0036] And / or,

[0037] The generation method further includes:

[0038] The initial draft of the rules is subjected to format verification, field validity verification, and value range encoding verification in order to filter out non-compliant business rules.

[0039] A second aspect of this disclosure provides a system for generating business rules, the system comprising:

[0040] The first acquisition module is used to acquire natural language description information input by the user;

[0041] The first conversion module is used to convert the natural language description information into structured business intent;

[0042] The second acquisition module is used to acquire document-type data, tabular data, and structured data sources based on the natural language description information;

[0043] The semantic retrieval module is used to perform semantic retrieval based on the structured business intent in order to extract contextual information from the document-type data and the tabular-type data;

[0044] The construction module is used to construct a field candidate set and a value range mapping based on the structured data source;

[0045] The first generation module is used to input the structured business intent, the context information, the field candidate set, and the value range mapping into the retrieval enhancement generation model to generate a draft rule.

[0046] The output module is used to respond to the input of the initial rule draft and the context information into the deep retrieval planning model to determine the search content that needs to be supplemented, and output the search phrase.

[0047] The third acquisition module is used to retrieve a search summary based on the search phrase;

[0048] The second generation module is used to input the search summary, the initial rule draft, and the context information into the deep search planning model to generate a deep rule set.

[0049] The preprocessing module is used to preprocess the initial rule draft and the deep rule set to obtain business rules.

[0050] Preferably, the first conversion module includes:

[0051] The first processing unit is used to perform word segmentation, noise reduction, cleaning and normalization on the natural language description information to obtain the processed natural language description information.

[0052] The second processing unit is used to perform term standardization processing on the processed natural language description information based on the term mapping relationship.

[0053] The first extraction unit is used to input the natural language description information after terminology standardization into the semantic classification and recognition model, identify the business scenario category to which the natural language description information after terminology standardization belongs, extract field prompt information related to business rule generation, and output structured business intent.

[0054] Preferably, the building module includes:

[0055] The first acquisition unit is used to acquire available fields from the structured data source to form a field candidate set;

[0056] The second extraction unit is used to extract field information of the available fields to form a value range mapping.

[0057] Preferably, the first acquisition unit includes:

[0058] The first acquisition subunit is used to acquire a list of fields from the structured data source;

[0059] The matching subunit is used to match the available fields with the field prompt information and determine the available range of the available fields from the field list;

[0060] A sub-unit is determined for determining a candidate set of fields based on the available range of the available fields.

[0061] Preferably, the second extraction unit includes:

[0062] The read sub-unit is used to read the code table corresponding to the available fields from the structured data source;

[0063] The second acquisition subunit is used to obtain the correspondence between the field names and encoded values ​​of available fields from the code table;

[0064] Sub-units are formed to form a range mapping based on the correspondence.

[0065] Preferably, the preprocessing module is used to merge, deduplicatize, atomically split, semantically clarify, and bind evidence sources to the initial rule draft and the deep rule set to obtain business rules;

[0066] And / or,

[0067] The generation system also includes:

[0068] The second conversion module is used to convert the business rules into an executable expression;

[0069] And / or,

[0070] The generation system also includes:

[0071] The verification module is used to perform format verification, field validity verification, and value range encoding verification on the initial draft of the rules in order to filter out non-compliant business rules.

[0072] A third aspect of this disclosure provides an electronic device including a memory, a processor, and a computer program stored in the memory and for running on the processor, wherein the processor executes the computer program to implement the method for generating business rules as described in the first aspect.

[0073] The fourth aspect of this disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating business rules as described in the first aspect.

[0074] The fifth aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the method for generating business rules as described in the first aspect.

[0075] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.

[0076] The positive and progressive effects of this disclosure are as follows:

[0077] This disclosure improves the rule system by automatically identifying users' structured business intent, automatically constructing field candidate sets and value range mappings, generating initial rule drafts based on a retrieval enhancement generation model, supplementing the content not covered by the initial rule drafts based on a deep retrieval planning model, and thus obtaining business rules. This improves the accuracy and coverage of rule generation and avoids inconsistencies in rule expression. Attached Figure Description

[0078] Figure 1 A flowchart of a method for generating business rules provided in Embodiment 1 of this disclosure.

[0079] Figure 2 A schematic diagram of the modules of the business rule generation system provided in Embodiment 2 of this disclosure.

[0080] Figure 3 This is a schematic diagram of the structure of an electronic device that implements the business rule generation method of Embodiment 3 of this disclosure. Detailed Implementation

[0081] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.

[0082] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not be construed as an unnecessary limitation. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.

[0083] In this embodiment of the disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good morals.

[0084] Example 1

[0085] Figure 1 A flowchart of a method for generating business rules provided in Embodiment 1 of this disclosure is shown below. Figure 1 As shown, the generation method includes:

[0086] S1. Obtain natural language description information input by the user;

[0087] In this embodiment, user natural language input and optional task parameters are received.

[0088] S2. Convert natural language description information into structured business intent;

[0089] In this implementation, structured business intent includes, but is not limited to, standardized descriptions, scenario attributes, and field hints, which are used to guide subsequent knowledge retrieval and rule generation.

[0090] For example, structured business intent includes, but is not limited to, original input text, standardized terminology descriptions, business scenario categories (such as threshold determination, consistency verification, value range verification, compliance verification, etc.), field hints (which can be a collection of field names, synonyms, business concepts, entity names, etc.), optional target table / target data domain / target system identifiers, optional limiting conditions (such as time range, region, product line, etc.), logical expressions (which can be abstract syntax trees (ASTs) or equivalent structures), optional severity levels, evidence citations (corresponding to document fragment IDs, table field IDs, etc.), optional explanations, optional executable fragments or template entry points, etc.

[0091] S3. Obtain document-type data, tabular data, and structured data sources based on natural language description information;

[0092] In this implementation, the processing of document-type data is as follows: A business purpose description is generated for each document to clarify its position within the business system; retrieval (including but not limited to semantic retrieval, keyword retrieval, or hybrid retrieval) is performed based on structured business intent, selecting document fragments with high task relevance; document descriptions and document fragments are organized into a structured form as the basis for rule extraction; specifically, document segmentation: the system can segment documents based on heading level, paragraph, clause number, table / attachment boundaries, etc.; index construction: vector indexes, inverted indexes, or hybrid indexes can be built for fragments; semantic retrieval: recall is performed based on structured business intent, and re-ranking models or rules can be used for sorting to improve the accuracy of relevant fragments; fragment structuring: meta-information such as source, location, score, and topic tags is added to each fragment for easy citation as evidence later.

[0093] The processing of tabular data is as follows: A purpose description is generated for the structured table; field metadata such as field names, field types, and field comments are extracted; sample data rows are selected to improve the understanding of field meaning during the rule generation stage. Specifically, table-level description generation: A purpose description is generated based on the table name, field composition, comments, and data samples; field extraction: Meta-information such as field names, types, comments, and primary / foreign keys (if available) is extracted; sample data extraction: Several rows of sample data are extracted (which can be anonymized / de-identified) to help the model understand field semantics and value patterns.

[0094] S4. Perform semantic retrieval based on structured business intent to extract contextual information from document-type and tabular data;

[0095] In this implementation, the context information includes at least two types of outputs, such as a global chunks set across documents: used for one-time knowledge injection for the Retrieval Augmentation (RAG) model (i.e., for retrieval augmentation during the RAG stage); and a grouped context set split by source: grouped by file / table / knowledge source for targeted completion and evidence backtracking in the DeepSearch model.

[0096] It should be noted that the above two types of context information can simultaneously retain fragment reference information to support the reviewability of the final rule.

[0097] This implementation performs document description generation, fragment retrieval, and fragment structuring on document-type data; and performs usage description generation, field extraction, and sample data extraction on tabular data. Ultimately, it forms contextual information grouped by document and a global fragment set across documents, respectively.

[0098] S5. Construct a field candidate set and value range mapping based on a structured data source;

[0099] In this embodiment, by constructing a field candidate set and value range mapping in the rule generation process, the executableness and consistency of the generated rules are ensured.

[0100] S6. Input the structured business intent, context information, field candidate set, and value range mapping into the retrieval enhancement generation model to generate the initial draft of the rules;

[0101] In this implementation, the rule generation input is constructed as follows: the structured business intent, context information, field candidate set, and value range mapping are all input into the retrieval enhancement generation model, and generation constraints are set; generation constraints are constructed: the constraint rules can only use fields from the field candidate set; conditions involving value range use the encoded values ​​in the value range mapping system; the rules focus on anomaly detection or cases where conditions are not met; the rule output is in a structured format (such as JSON, YAML, or other equivalent structured representations); each rule is expressed atomically; and a draft rule is generated: a draft rule including threshold judgment, field consistency judgment, non-empty constraint, and range constraint is generated.

[0102] S7. In response to inputting the initial rule draft and context information into the deep search planning model, determine the search content that needs to be supplemented, and output the search phrase;

[0103] In this implementation, based on the initial rule draft and contextual information, the deep search planning model determines whether further search content needs to be added; if so, it outputs keyword phrases / query fragments that can be directly used for retrieval (which may include clause numbers, synonyms, boundary condition keywords, etc.).

[0104] S8. Use search phrases to obtain search summaries;

[0105] In this embodiment, a search is performed for each search phrase, supplementary fragments are extracted from the context set split by source, and a structured search summary is generated.

[0106] It should be noted that the search summary includes, but is not limited to, key constraints, exception conditions, threshold ranges, and mutually exclusive conditions.

[0107] S9. Input the search summary, draft rules, and contextual information into the deep search planning model to generate a deep rule set;

[0108] In this implementation, the search summary, the initial rule draft, and the context information are input into the deep search planning model to generate a deep rule set that covers scattered clauses, implicit conditions, and boundary logic. Specifically, it is used to supplement scattered clauses, implicit conditions, and boundary logic. To control search overhead, stopping conditions can be set, such as: reaching a preset number of rounds, no new valid fragments in two consecutive rounds, rule addition rate being lower than a threshold, or rule coverage evaluation meeting requirements.

[0109] S10. Preprocess the initial draft rules and the deep rule set to obtain business rules.

[0110] In one optional implementation, the initial rule draft and the deep rule set are merged, deduplicated, atomically split, semantically clarified, and evidence source bound to obtain the business rules.

[0111] In this implementation, rule merging and deduplication are performed: the initial rule draft and the deep rule set are merged, and duplicates are removed based on rule structure similarity, logical expression equivalence, or description similarity. Versions with more sufficient evidence or more stringent constraints are retained, and the source fragments are recorded for review.

[0112] Atomic splitting: rules containing multiple logical judgments are split into atomic rules that can be applied independently; for example, when a rule contains multiple logical clauses or multi-field compound judgments, the system splits it into atomic rules that can be applied independently, and ensures that each rule can be evaluated, executed and audited independently after splitting.

[0113] Semantic clarification and evidence source binding: Generate explanatory descriptions for each rule, including at least the rule's purpose, field dependencies and value range mapping usage, evidence source (document fragments / table fields), and scope of application, to support business communication and manual review;

[0114] Final business rule output: The output includes, but is not limited to, rule content, field list, coded value references, logical expressions, and evidence reference information, so that it can be directly used by business systems or rule engines.

[0115] In this implementation, a draft rule is generated based on RAG (Retrieval Enhancement Generative Model); the DeepSearch (Deep Search Planning Model) mechanism performs multiple rounds of retrieval planning and supplementary retrieval to generate a deep rule set. Then, the draft rule and the deep rule set are merged, deduplicated, atomically split, semantically clarified, and evidence source bound, and business rules are output. Based on the draft rule, the three stages of DeepSearch are executed: retrieval planning, targeted retrieval, and deep rule summarization. Finally, a deep rule set is formed and merged with the draft rule, deduplicated, atomically split, semantically clarified, and evidence source bound to obtain the business rules.

[0116] This implementation method automatically identifies the user's structured business intent and automatically constructs a field candidate set and value range mapping. It generates a draft rule based on a retrieval enhancement generation model, supplements the content not covered by the draft rule based on a deep retrieval planning model, improves the rule system, and thus obtains business rules. This improves the accuracy and coverage of rule generation and avoids inconsistencies in rule expression.

[0117] In an optional implementation, S2 includes:

[0118] The natural language description information is segmented, denoised, cleaned, and normalized to obtain the processed natural language description information.

[0119] In this embodiment, the natural language description information is processed by word segmentation, noise filtering, symbol cleaning, and format normalization to reduce the impact of colloquialisms, abbreviations, and mixed symbols on subsequent recognition.

[0120] The processed natural language description information is standardized based on the terminology mapping relationship.

[0121] In this implementation, the system maintains terminology mapping relationships, converting informal terms into standardized business terms. Specifically, the system maintains an expandable terminology mapping table or terminology library, converting informal terms, departmental aliases, and industry slang used by users into standardized terms. For example, "receipt date / account posting date / transfer date" are mapped to the same standard field concept. The terminology mapping can be maintained manually or automatically updated incrementally based on historical rules and document statistics.

[0122] The natural language description information after terminology standardization is input into the semantic classification and recognition model to identify the business scenario category to which the natural language description information after terminology standardization belongs, extract field prompt information related to business rule generation, and output structured business intent.

[0123] In this embodiment, the input statement is classified based on a semantic classification and recognition model to determine its business scenario category. Field prompts related to rule generation are extracted from the input, and a structured business intent containing at least a standardized description, scenario type, and field prompts is output to drive subsequent multi-source knowledge retrieval and rule generation.

[0124] It should be noted that field hints can be obtained through entity recognition, keyword extraction, phrase matching, or semantic similarity calculation, and are used to guide subsequent retrieval and field constraint construction.

[0125] In addition, field information includes at least one of the following: field name, field code, field description, field display value, and evidence of field source.

[0126] In an optional implementation, S5 includes:

[0127] S51. Obtain available fields from the structured data source to form a field candidate set;

[0128] In this implementation, each field in the field candidate set includes, but is not limited to, field name, field type, field comment, table to which it belongs, alias / synonym, and scope of availability description, which are used to prevent non-existent fields from being referenced when generating constraint rules.

[0129] S52. Extract field information from available fields to form a value range mapping.

[0130] In this implementation, the value domain mapping includes, but is not limited to, field business names, internal encoded values, displayed values, descriptive information, source evidence, etc., making the rule expression readable and executable.

[0131] In an optional implementation, S51 includes:

[0132] Retrieve a list of fields from a structured data source;

[0133] In this implementation, field summarization involves importing a list of fields from a data dictionary, table structure metadata, or data asset catalog.

[0134] Match the available fields with the field hints and determine the range of available fields from the field list;

[0135] In this implementation, field alignment involves matching the field hints obtained from intent parsing with candidate fields (e.g., exact matching, synonym matching, semantic similarity matching, etc.); scope determination involves limiting the set of available fields in multi-field list scenarios based on the target scope (e.g., target table, subject domain) or field lineage / association constraints.

[0136] The candidate set of fields is determined based on the available range of available fields.

[0137] In this implementation, the field candidate set is used as a hard constraint for rule generation to prevent the model from referencing fictitious or invalid fields.

[0138] In the specific implementation process, all available fields are sorted out from the structured data source to form a field candidate set, and the available range of fields is further determined through field matching and semantic analysis to constrain the model from referencing non-existent fields.

[0139] In an optional implementation, S52 includes:

[0140] Read the code table corresponding to the available fields from the structured data source;

[0141] Obtain the correspondence between the field names and encoded values ​​of the available fields from the code table;

[0142] A range mapping is formed based on the correspondence.

[0143] In this implementation, the correspondence between field names and internal codes is extracted from documents or structured data sources, making the rules readable at the expression level and usable at the execution level. Value domain mapping includes the field's business name, internal code, and related description; specifically, extraction is performed from a code table (dimension table / enumeration table): the code table corresponding to the field is read to form a "display value - code value" mapping; extraction is also performed from policy documents / process documents: descriptions such as "status=xx" and "type=yy" in the clauses are identified and aligned with the code table; conflict resolution: when the same display value has multiple codes or different documents have inconsistent definitions, conflicts can be marked and candidate rules with evidence can be output during the rule generation stage for manual review; mapping output: the value domain mapping is used as a value constraint during the rule generation stage, ensuring the model uses the correct code value when generating conditions.

[0144] In an optional implementation, the generation method further includes:

[0145] Convert business rules into executable expressions;

[0146] In this implementation, structured rules are converted into executable expressions, such as SQL WHERE conditions, rule engine DSL statements, or script expressions. During the conversion process, field names and coded values ​​can be replaced and validated based on the field candidate set and value range mapping to ensure execution consistency.

[0147] In an optional implementation, the generation method further includes:

[0148] The initial draft of the rules undergoes format validation, field validity validation, and value range encoding validation to filter out non-compliant business rules.

[0149] In this embodiment, after the deep retrieval planning model outputs the initial draft of the rules, it can perform format verification, field validity verification, value range encoding verification, etc., filter out non-compliant rules, and require the deep retrieval planning model to be regenerated or corrected.

[0150] In this implementation, a historical rule base, domain knowledge graph, or long-term memory storage can be introduced to establish a field relationship network and combination pattern to enhance rule completion capabilities.

[0151] The business rule generation method of this implementation can be applied to any complex business scenario that relies on document systems, terminology systems, and structured data for rule definition.

[0152] In one specific implementation, for example, the end-to-end implementation process of this disclosure is illustrated using a scenario of "data quality inspection".

[0153] (1) Example of user input:

[0154] The user inputs in natural language: "When the order status is completed, the completion time cannot be empty; if it is cancelled, the cancellation reason must be filled in."

[0155] (2) Intent parsing output:

[0156] The system standardizes user input and classifies it as a "field not empty / consistency check" scenario, extracts field prompts including "order status, completion time, cancellation reason", etc., and generates structured business intent.

[0157] (3) Multi-source knowledge construction:

[0158] The system retrieves fragments such as "order status definition, completion / cancellation conditions, and field filling requirements" from policy documents and process documents, forming a global fragment set across documents; and forms a context set according to document source for DeepSearch (deep search planning) to complete. The system extracts field metadata and several sample data rows from the order details table.

[0159] (4) Field candidate set and value range mapping:

[0160] The system constructs a candidate set of fields from the order details table, and determines that the available fields include "order_status", "finish_time", "cancel_reason", etc. (field names are just examples); and extracts the correspondence between the displayed value of "order status" and the internal code from the code table or document to form a value range mapping.

[0161] (5) Generation of the first draft of the rules:

[0162] The system generates a draft rule based on the field candidate set and value range mapping constraints, for example:

[0163] Rule A: When the order status = "Completed" (using mapping encoding), the completion time is not empty;

[0164] Rule B: When the order status = "Cancelled" (using mapping code), the cancellation reason is not empty.

[0165] (6) DeepSearch completion:

[0166] The system identifies potential exceptions (such as "auto-complete" or "system cancel") or boundary conditions (such as "completion time is allowed to be a certain default value"), generates search phrases for targeted retrieval, and supplements the terms to form a deep rule set, such as adding:

[0167] Rule C (Example): When the order status is "completed" and the completion method is not "automatic completion", the completion time is not empty.

[0168] (7) Output and Executability:

[0169] The system performs deduplication and atomic splitting on the initial rule draft and deep rule set, and outputs evidence citations and explanations for each rule; optional SQL templates can be generated for data scanning and execution.

[0170] This implementation method automatically identifies user requests and standardizes terminology; automatically constructs multi-source contexts for document-type and structured data; automatically establishes a field candidate set and value range mapping system; generates initial rule drafts based on retrieval enhancement; and expands rule coverage through multiple rounds of deep retrieval planning. Specifically, through steps such as intent parsing, multi-source knowledge construction, field candidate set and value range mapping construction, initial rule drafts generated based on retrieval enhancement, and deep rule sets generated based on deep retrieval planning, it automatically derives atomic-level business rules oriented towards the target task and supports the structured expression and executable transformation of business rules. The intent parsing stage standardizes terminology and classifies intents from user natural language input. Based on a semantic classification and recognition model, it determines the business scenario category to which the user's intent belongs and extracts field prompts that may be relevant to rule generation, forming a structured business intent. The multi-source knowledge construction stage processes document-type data and tabular data separately, forming contextual information that can be used for rule generation. The field and value constraint stage constructs a field candidate set and value range mapping system, ensuring that constraint rules only reference real fields and use the correct value range encoding. Based on the initial rule draft, a deep retrieval planning mechanism is introduced. Through multiple rounds of retrieval planning, targeted retrieval, and in-depth summarization, scattered clauses, implicit conditions, and boundary logic are supplemented, ultimately outputting consistent, interpretable, and reviewable business rules. This effectively reduces the cost of manual rule writing, improves rule consistency, interpretability, and reviewability, thereby increasing rule production efficiency. The system can automatically generate high-quality business rules in complex document systems, making it suitable for rule-driven business scenarios such as risk control verification, process compliance checks, business audits, contract review, and data quality detection.

[0171] Example 2

[0172] Corresponding to the aforementioned embodiment of a business rule generation method, this disclosure also provides an embodiment of a business rule generation system.

[0173] Figure 2 This is a schematic diagram of a business rule generation system provided in Embodiment 2 of this disclosure, as shown below. Figure 2 As shown, the generation system includes:

[0174] The first acquisition module 21 is used to acquire natural language description information input by the user;

[0175] In this embodiment, user natural language input and optional task parameters are received.

[0176] The first conversion module 22 is used to convert natural language description information into structured business intent;

[0177] In this implementation, structured business intent includes, but is not limited to, standardized descriptions, scenario attributes, and field hints, which are used to guide subsequent knowledge retrieval and rule generation.

[0178] For example, structured business intent includes, but is not limited to, original input text, standardized terminology descriptions, business scenario categories (such as threshold determination, consistency verification, value range verification, compliance verification, etc.), field hints (which can be a collection of field names, synonyms, business concepts, entity names, etc.), optional target table / target data domain / target system identifiers, optional limiting conditions (such as time range, region, product line, etc.), logical expressions (which can be abstract syntax trees (ASTs) or equivalent structures), optional severity levels, evidence citations (corresponding to document fragment IDs, table field IDs, etc.), optional explanations, optional executable fragments or template entry points, etc.

[0179] The second acquisition module 23 is used to acquire document-type data, tabular data, and structured data sources based on natural language description information;

[0180] In this implementation, the processing of document-type data is as follows: A business purpose description is generated for each document to clarify its position within the business system; retrieval (including but not limited to semantic retrieval, keyword retrieval, or hybrid retrieval) is performed based on structured business intent, selecting document fragments with high task relevance; document descriptions and document fragments are organized into a structured form as the basis for rule extraction; specifically, document segmentation: the system can segment documents based on heading level, paragraph, clause number, table / attachment boundaries, etc.; index construction: vector indexes, inverted indexes, or hybrid indexes can be built for fragments; semantic retrieval: recall is performed based on structured business intent, and re-ranking models or rules can be used for sorting to improve the accuracy of relevant fragments; fragment structuring: meta-information such as source, location, score, and topic tags is added to each fragment for easy citation as evidence later.

[0181] The processing of tabular data is as follows: A purpose description is generated for the structured table; field metadata such as field names, field types, and field comments are extracted; sample data rows are selected to improve the understanding of field meaning during the rule generation stage. Specifically, table-level description generation: A purpose description is generated based on the table name, field composition, comments, and data samples; field extraction: Meta-information such as field names, types, comments, and primary / foreign keys (if available) is extracted; sample data extraction: Several rows of sample data are extracted (which can be anonymized / de-identified) to help the model understand field semantics and value patterns.

[0182] The semantic retrieval module 24 is used to perform semantic retrieval based on structured business intent in order to extract contextual information from document-type data and tabular-type data;

[0183] In this implementation, the context information includes at least two types of outputs, such as a global chunks set across documents: used for one-time knowledge injection for the Retrieval Augmentation (RAG) model (i.e., for retrieval augmentation during the RAG stage); and a grouped context set split by source: grouped by file / table / knowledge source for targeted completion and evidence backtracking in the DeepSearch model.

[0184] It should be noted that the above two types of context information can simultaneously retain fragment reference information to support the reviewability of the final rule.

[0185] This implementation performs document description generation, fragment retrieval, and fragment structuring on document-type data; and performs usage description generation, field extraction, and sample data extraction on tabular data. Ultimately, it forms contextual information grouped by document and a global fragment set across documents, respectively.

[0186] Module 25 is used to build field candidate sets and value range mappings based on structured data sources;

[0187] In this embodiment, by constructing a field candidate set and value range mapping in the rule generation process, the executableness and consistency of the generated rules are ensured.

[0188] The first generation module 26 is used to input the structured business intent, context information, field candidate set and value range mapping into the retrieval enhancement generation model to generate the initial draft of the rules;

[0189] In this implementation, the rule generation input is constructed as follows: the structured business intent, context information, field candidate set, and value range mapping are all input into the retrieval enhancement generation model, and generation constraints are set; generation constraints are constructed: the constraint rules can only use fields from the field candidate set; conditions involving value range use the encoded values ​​in the value range mapping system; the rules focus on anomaly detection or cases where conditions are not met; the rule output is in a structured format (such as JSON, YAML, or other equivalent structured representations); each rule is expressed atomically; and a draft rule is generated: a draft rule including threshold judgment, field consistency judgment, non-empty constraint, and range constraint is generated.

[0190] Output module 27 is used to respond to the input of the initial rule draft and context information into the deep retrieval planning model to determine the search content that needs to be supplemented, and output the search phrase;

[0191] In this implementation, based on the initial rule draft and contextual information, the deep search planning model determines whether further search content needs to be added; if so, it outputs keyword phrases / query fragments that can be directly used for retrieval (which may include clause numbers, synonyms, boundary condition keywords, etc.).

[0192] The third acquisition module 28 is used to perform a search based on the search phrase to obtain a search summary;

[0193] In this embodiment, a search is performed for each search phrase, supplementary fragments are extracted from the context set split by source, and a structured search summary is generated.

[0194] It should be noted that the search summary includes, but is not limited to, key constraints, exception conditions, threshold ranges, and mutually exclusive conditions.

[0195] The second generation module 29 is used to input the search summary, the initial rule draft and the context information into the deep search planning model to generate a deep rule set.

[0196] In this implementation, the search summary, the initial rule draft, and the context information are input into the deep search planning model to generate a deep rule set that covers scattered clauses, implicit conditions, and boundary logic. Specifically, it is used to supplement scattered clauses, implicit conditions, and boundary logic. To control search overhead, stopping conditions can be set, such as: reaching a preset number of rounds, no new valid fragments in two consecutive rounds, rule addition rate being lower than a threshold, or rule coverage evaluation meeting requirements.

[0197] The preprocessing module 30 is used to preprocess the initial rule draft and the deep rule set to obtain business rules.

[0198] In one optional implementation, the initial rule draft and the deep rule set are merged, deduplicated, atomically split, semantically clarified, and evidence source bound to obtain the business rules.

[0199] In this implementation, rule merging and deduplication are performed: the initial rule draft and the deep rule set are merged, and duplicates are removed based on rule structure similarity, logical expression equivalence, or description similarity. Versions with more sufficient evidence or more stringent constraints are retained, and the source fragments are recorded for review.

[0200] Atomic splitting: rules containing multiple logical judgments are split into atomic rules that can be applied independently; for example, when a rule contains multiple logical clauses or multi-field compound judgments, the system splits it into atomic rules that can be applied independently, and ensures that each rule can be evaluated, executed and audited independently after splitting.

[0201] Semantic clarification and evidence source binding: Generate explanatory descriptions for each rule, including at least the rule's purpose, field dependencies and value range mapping usage, evidence source (document fragments / table fields), and scope of application, to support business communication and manual review;

[0202] Final business rule output: The output includes, but is not limited to, rule content, field list, coded value references, logical expressions, and evidence reference information, so that it can be directly used by business systems or rule engines.

[0203] In this implementation, a draft rule is generated based on RAG (Retrieval Enhancement Generative Model); the DeepSearch (Deep Search Planning Model) mechanism performs multiple rounds of retrieval planning and supplementary retrieval to generate a deep rule set. Then, the draft rule and the deep rule set are merged, deduplicated, atomically split, semantically clarified, and evidence source bound, and business rules are output. Based on the draft rule, the three stages of DeepSearch are executed: retrieval planning, targeted retrieval, and deep rule summarization. Finally, a deep rule set is formed and merged with the draft rule, deduplicated, atomically split, semantically clarified, and evidence source bound to obtain the business rules.

[0204] This implementation method automatically identifies the user's structured business intent and automatically constructs a field candidate set and value range mapping. It generates a draft rule based on a retrieval enhancement generation model, supplements the content not covered by the draft rule based on a deep retrieval planning model, improves the rule system, and thus obtains business rules. This improves the accuracy and coverage of rule generation and avoids inconsistencies in rule expression.

[0205] In an optional implementation, the first conversion module includes:

[0206] The first processing unit is used to perform word segmentation, noise reduction, cleaning and normalization on the natural language description information to obtain the processed natural language description information.

[0207] In this embodiment, the natural language description information is processed by word segmentation, noise filtering, symbol cleaning, and format normalization to reduce the impact of colloquialisms, abbreviations, and mixed symbols on subsequent recognition.

[0208] The second processing unit is used to perform term standardization processing on the processed natural language description information based on the term mapping relationship.

[0209] In this implementation, the system maintains terminology mapping relationships, converting informal terms into standardized business terms. Specifically, the system maintains an expandable terminology mapping table or terminology library, converting informal terms, departmental aliases, and industry slang used by users into standardized terms. For example, "receipt date / account posting date / transfer date" are mapped to the same standard field concept. The terminology mapping can be maintained manually or automatically updated incrementally based on historical rules and document statistics.

[0210] The first extraction unit is used to input the natural language description information after terminology standardization into the semantic classification and recognition model, identify the business scenario category to which the natural language description information after terminology standardization belongs, extract field prompt information related to business rule generation, and output structured business intent.

[0211] In this embodiment, the input statement is classified based on a semantic classification and recognition model to determine its business scenario category. Field prompts related to rule generation are extracted from the input, and a structured business intent containing at least a standardized description, scenario type, and field prompts is output to drive subsequent multi-source knowledge retrieval and rule generation.

[0212] It should be noted that field hints can be obtained through entity recognition, keyword extraction, phrase matching, or semantic similarity calculation, and are used to guide subsequent retrieval and field constraint construction.

[0213] In addition, field information includes at least one of the following: field name, field code, field description, field display value, and evidence of field source.

[0214] In one alternative implementation, the building module includes:

[0215] The first acquisition unit is used to acquire available fields from the structured data source to form a field candidate set;

[0216] In this implementation, each field in the field candidate set includes, but is not limited to, field name, field type, field comment, table to which it belongs, alias / synonym, and scope of availability description, which are used to prevent non-existent fields from being referenced when generating constraint rules.

[0217] The second extraction unit is used to extract field information from available fields to form a value range mapping.

[0218] In this implementation, the value domain mapping includes, but is not limited to, field business names, internal encoded values, displayed values, descriptive information, source evidence, etc., making the rule expression readable and executable.

[0219] In an optional implementation, the first acquisition unit includes:

[0220] The first sub-unit is used to retrieve a list of fields from a structured data source;

[0221] In this implementation, field summarization involves importing a list of fields from a data dictionary, table structure metadata, or data asset catalog.

[0222] The matching sub-unit is used to match the available fields with the field hint information and determine the available range of the available fields from the field list;

[0223] In this implementation, field alignment involves matching the field hints obtained from intent parsing with candidate fields (e.g., exact matching, synonym matching, semantic similarity matching, etc.); scope determination involves limiting the set of available fields in multi-field list scenarios based on the target scope (e.g., target table, subject domain) or field lineage / association constraints.

[0224] Determine sub-units to determine the candidate set of fields based on the available range of available fields.

[0225] In this implementation, the field candidate set is used as a hard constraint for rule generation to prevent the model from referencing fictitious or invalid fields.

[0226] In the specific implementation process, all available fields are sorted out from the structured data source to form a field candidate set, and the available range of fields is further determined through field matching and semantic analysis to constrain the model from referencing non-existent fields.

[0227] In an optional implementation, the second extraction unit includes:

[0228] The read sub-unit is used to read the code table corresponding to the available fields from the structured data source;

[0229] The second acquisition subunit is used to obtain the correspondence between the field names and encoded values ​​of the available fields from the code table;

[0230] Sub-units are formed to create a range mapping based on the correspondence.

[0231] In this implementation, the correspondence between field names and internal codes is extracted from documents or structured data sources, making the rules readable at the expression level and usable at the execution level. Value domain mapping includes the field's business name, internal code, and related description; specifically, extraction is performed from a code table (dimension table / enumeration table): the code table corresponding to the field is read to form a "display value - code value" mapping; extraction is also performed from policy documents / process documents: descriptions such as "status=xx" and "type=yy" in the clauses are identified and aligned with the code table; conflict resolution: when the same display value has multiple codes or different documents have inconsistent definitions, conflicts can be marked and candidate rules with evidence can be output during the rule generation stage for manual review; mapping output: the value domain mapping is used as a value constraint during the rule generation stage, ensuring the model uses the correct code value when generating conditions.

[0232] In an optional implementation, the generation system further includes:

[0233] The second conversion module is used to convert business rules into executable expressions;

[0234] In this implementation, structured rules are converted into executable expressions, such as SQL WHERE conditions, rule engine DSL statements, or script expressions. During the conversion process, field names and coded values ​​can be replaced and validated based on the field candidate set and value range mapping to ensure execution consistency.

[0235] In an optional implementation, the generation system further includes:

[0236] The validation module is used to perform format validation, field validity validation, and value range encoding validation on the initial draft of the rules in order to filter out non-compliant business rules.

[0237] In this embodiment, after the deep retrieval planning model outputs the initial draft of the rules, it can perform format verification, field validity verification, value range encoding verification, etc., filter out non-compliant rules, and require the deep retrieval planning model to be regenerated or corrected.

[0238] In this implementation, a historical rule base, domain knowledge graph, or long-term memory storage can be introduced to establish a field relationship network and combination pattern to enhance rule completion capabilities.

[0239] The business rule generation method of this implementation can be applied to any complex business scenario that relies on document systems, terminology systems, and structured data for rule definition.

[0240] In one specific implementation, for example, the end-to-end implementation process of this disclosure is illustrated using a scenario of "data quality inspection".

[0241] (1) Example of user input:

[0242] The user inputs in natural language: "When the order status is completed, the completion time cannot be empty; if it is cancelled, the cancellation reason must be filled in."

[0243] (2) Intent parsing output:

[0244] The system standardizes user input and classifies it as a "field not empty / consistency check" scenario, extracts field prompts including "order status, completion time, cancellation reason", etc., and generates structured business intent.

[0245] (3) Multi-source knowledge construction:

[0246] The system retrieves fragments such as "order status definition, completion / cancellation conditions, and field filling requirements" from policy documents and process documents, forming a global fragment set across documents; and forms a context set according to document source for DeepSearch (deep search planning) to complete. The system extracts field metadata and several sample data rows from the order details table.

[0247] (4) Field candidate set and value range mapping:

[0248] The system constructs a candidate set of fields from the order details table, and determines that the available fields include "order_status", "finish_time", "cancel_reason", etc. (field names are just examples); and extracts the correspondence between the displayed value of "order status" and the internal code from the code table or document to form a value range mapping.

[0249] (5) Generation of the first draft of the rules:

[0250] The system generates a draft rule based on the field candidate set and value range mapping constraints, for example:

[0251] Rule A: When the order status = "Completed" (using mapping encoding), the completion time is not empty;

[0252] Rule B: When the order status = "Cancelled" (using mapping code), the cancellation reason is not empty.

[0253] (6) DeepSearch completion:

[0254] The system identifies potential exceptions (such as "auto-complete" or "system cancel") or boundary conditions (such as "completion time is allowed to be a certain default value"), generates search phrases for targeted retrieval, and supplements the terms to form a deep rule set, such as adding:

[0255] Rule C (Example): When the order status is "completed" and the completion method is not "automatic completion", the completion time is not empty.

[0256] (7) Output and Executability:

[0257] The system performs deduplication and atomic splitting on the initial rule draft and deep rule set, and outputs evidence citations and explanations for each rule; optional SQL templates can be generated for data scanning and execution.

[0258] This implementation method automatically identifies user requests and standardizes terminology; automatically constructs multi-source contexts for document-type and structured data; automatically establishes a field candidate set and value range mapping system; generates initial rule drafts based on retrieval enhancement; and expands rule coverage through multiple rounds of deep retrieval planning. Specifically, through steps such as intent parsing, multi-source knowledge construction, field candidate set and value range mapping construction, initial rule drafts generated based on retrieval enhancement, and deep rule sets generated based on deep retrieval planning, it automatically derives atomic-level business rules oriented towards the target task and supports the structured expression and executable transformation of business rules. The intent parsing stage standardizes terminology and classifies intents from user natural language input. Based on a semantic classification and recognition model, it determines the business scenario category to which the user's intent belongs and extracts field prompts that may be relevant to rule generation, forming a structured business intent. The multi-source knowledge construction stage processes document-type data and tabular data separately, forming contextual information that can be used for rule generation. The field and value constraint stage constructs a field candidate set and value range mapping system, ensuring that constraint rules only reference real fields and use the correct value range encoding. Based on the initial rule draft, a deep retrieval planning mechanism is introduced. Through multiple rounds of retrieval planning, targeted retrieval, and in-depth summarization, scattered clauses, implicit conditions, and boundary logic are supplemented, ultimately outputting consistent, interpretable, and reviewable business rules. This effectively reduces the cost of manual rule writing, improves rule consistency, interpretability, and reviewability, thereby increasing rule production efficiency. The system can automatically generate high-quality business rules in complex document systems, making it suitable for rule-driven business scenarios such as risk control verification, process compliance checks, business audits, contract review, and data quality detection.

[0259] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.

[0260] Example 3

[0261] Figure 3 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of this disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the business rule generation method described in any of the above embodiments. Figure 3 The electronic device 90 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0262] like Figure 3 As shown, the electronic device 90 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including memory 92 and processor 91).

[0263] Bus 93 includes a data bus, an address bus, and a control bus.

[0264] The memory 92 may include volatile memory, such as random access memory (RAM) 921 and / or cache memory 922, and may further include read-only memory (ROM) 923.

[0265] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) program module 924, such program module 924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0266] The processor 91 executes various functional applications and data processing by running computer programs stored in the memory 92, such as the business rule generation method provided in any of the above embodiments.

[0267] Electronic device 90 can also communicate with one or more external devices 94 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 95. Furthermore, electronic device 90 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 96. Figure 3 As shown, network adapter 96 communicates with other modules of electronic device 90 via bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0268] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0269] Example 4

[0270] Embodiment 4 of this disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for generating business rules provided in any of the above embodiments.

[0271] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0272] Example 5

[0273] Embodiment 5 of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the method for generating business rules as described in any of the preceding embodiments.

[0274] The program code for executing the computer program product of this disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0275] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.

Claims

1. A method of generating a business rule, characterized by, The generation method includes: Obtain natural language description information input by the user; The natural language description information is converted into structured business intent; Document-type data, tabular data, and structured data sources are obtained based on the natural language description information; Semantic retrieval is performed based on the structured business intent to extract contextual information from the document-type data and the tabular-type data; Based on the structured data source, construct a field candidate set and value range mapping; The structured business intent, the context information, the field candidate set, and the value range mapping are all input into the retrieval enhancement generation model to generate a draft rule. In response to inputting the initial rule draft and the context information into the deep retrieval planning model to determine the need for supplementary retrieval content, the retrieval phrase is output. A search summary is obtained by performing a search based on the search phrase; The search summary, the initial rule draft, and the context information are input into the deep search planning model to generate a deep rule set. The initial draft of the rules and the set of deep rules are preprocessed to obtain the business rules.

2. The method for generating business rules as described in claim 1, characterized in that, The step of converting the natural language description information into structured business intent includes: The natural language description information is segmented, denoised, cleaned, and normalized to obtain the processed natural language description information. The processed natural language description information is standardized based on the terminology mapping relationship. The natural language description information after terminology standardization is input into the semantic classification and recognition model to identify the business scenario category to which the natural language description information after terminology standardization belongs, extract field prompt information related to business rule generation, and output structured business intent.

3. The method for generating business rules as described in claim 2, characterized in that, The steps of constructing the field candidate set and value range mapping based on the structured data source include: Available fields are obtained from the structured data source to form a field candidate set; Extract the field information of the available fields to form a value range mapping.

4. The method for generating business rules as described in claim 3, characterized in that, The step of obtaining available fields from the structured data source to form a field candidate set includes: Obtain the list of fields from the structured data source; The available fields are matched with the field hint information, and the availability range of the available fields is determined from the field list; The candidate set of fields is determined based on the available range of the available fields.

5. The method for generating business rules as described in claim 3, characterized in that, The step of extracting field information from the available fields to form a value range mapping includes: Read the code table corresponding to the available fields from the structured data source; Obtain the correspondence between the field names and encoded values ​​of the available fields from the code table; A range mapping is formed based on the aforementioned correspondence.

6. The method for generating business rules as described in claim 1, characterized in that, The step of preprocessing the initial rule draft and the deep rule set to obtain business rules includes: The initial draft of the rules and the deep rule set are merged, deduplicated, atomically split, semantically clarified, and evidence source bound to obtain the business rules. And / or, The generation method further includes: Convert the business rules into an executable expression; And / or, The generation method further includes: The initial draft of the rules is subjected to format verification, field validity verification, and value range encoding verification in order to filter out non-compliant business rules.

7. A business rule generation system, characterized in that, The generation system includes: The first acquisition module is used to acquire natural language description information input by the user; The first conversion module is used to convert the natural language description information into structured business intent; The second acquisition module is used to acquire document-type data, tabular data, and structured data sources based on the natural language description information; The semantic retrieval module is used to perform semantic retrieval based on the structured business intent in order to extract contextual information from the document-type data and the tabular-type data; The construction module is used to construct a field candidate set and a value range mapping based on the structured data source; The first generation module is used to input the structured business intent, the context information, the field candidate set, and the value range mapping into the retrieval enhancement generation model to generate a draft rule. The output module is used to respond to the input of the initial rule draft and the context information into the deep retrieval planning model to determine the search content that needs to be supplemented, and output the search phrase. The third acquisition module is used to retrieve a search summary based on the search phrase; The second generation module is used to input the search summary, the initial rule draft, and the context information into the deep search planning model to generate a deep rule set. The preprocessing module is used to preprocess the initial rule draft and the deep rule set to obtain business rules.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the method for generating business rules according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for generating business rules according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for generating business rules as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Service rule generation method and system based on natural language processing

    CN110196719A

  • Text generation method and device based on large language model, equipment and medium

    CN119691110A

  • SQL query generation method and system for complex language question based on LLM

    CN119917522A

  • Multi-source knowledge enhanced large language model question and answer method, device and equipment and medium

    CN120611023A

  • Business rule automatic processing method and system based on natural language understanding

    CN120951940A