An operator rule engine construction method and device
By extracting keywords and logical connectors from text using natural language processing technology, an operator rule engine is generated, which solves the problem of tedious and error-prone manual calculation logic writing and achieves efficient and accurate data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YOUKUN TECH CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the verification, processing, and anomaly identification of general structured and semi-structured data require manual customization of computational logic, which results in a cumbersome, error-prone, and inefficient process.
Natural language processing technology is used to extract keywords from the text to be processed, match target operators in a pre-configured operator library, generate conditional operator groups, and determine the logical relationships between operators based on logical connectives to build an operator rule engine that replaces manual writing of computational logic.
It achieves a dual improvement in data processing efficiency and accuracy, automatically builds a rule engine, adapts to various data verification, processing or anomaly identification needs, and ensures that the generated operator rule engine is highly compatible with business logic.
Smart Images

Figure CN122309700A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for constructing an operator rule engine. Background Technology
[0002] In the technical fields of big data governance and data application, the verification and processing of general structured and semi-structured data are core steps in ensuring data quality and effectively identifying and handling data anomalies, and are widely used in various data-driven business scenarios. To complete data verification, processing, and anomaly identification, it is necessary to rely on specific computational logic to achieve rule-based processing of the data.
[0003] In current technologies, the verification, processing, and anomaly detection of general structured and semi-structured data typically involve manually designing and writing computational logic to achieve these functions. Specifically, for different data structures and processing requirements (processing needs, verification needs, etc.), customized technical logic must be designed and written manually to achieve the corresponding data processing.
[0004] Therefore, it can be seen that in current technology, the method of manually customizing and writing computational logic for different data structures and various processing and verification requirements is cumbersome in design and writing, has low accuracy in computational logic, and is prone to errors, resulting in low data processing efficiency. Summary of the Invention
[0005] To address the aforementioned issues, this application provides a method and apparatus for constructing an operator rule engine. Responding to the driving force of natural language text, it automatically extracts logic, matches operators, and constructs a rule engine, replacing the traditional method of manually customizing and writing computational logic. This effectively solves the problems of cumbersome processes and high error rates, achieving a dual improvement in data processing efficiency and accuracy.
[0006] The embodiments of this application disclose the following technical solutions: In a first aspect, embodiments of this application provide a method for constructing an operator rule engine, including: Obtain the text to be processed; wherein, the text to be processed is natural language text containing operator-related logic; Multiple keywords are extracted from the text to be processed using natural language processing techniques. Based on a pre-configured operator library, a corresponding target operator is matched for each keyword, and a corresponding conditional operator group is generated based on the multiple keywords and the corresponding target operators; the pre-configured operator library includes multiple basic operators, which include general operators and custom operators; the conditional operator group includes multiple conditional operators, which are target operators with configured operator parameters; Extract logical connectives from the text to be processed, and determine the logical relationships between each of the conditional operators based on the logical connectives; Based on the condition operator group and the logical relationship between each condition operator, a corresponding operator rule engine is generated.
[0007] In one possible implementation, the extraction of multiple keywords from the text to be processed using natural language analysis techniques includes: Natural language processing (NLP) technology is used to preprocess the text to be processed, resulting in preprocessed text. The preprocessing includes text cleaning, word segmentation, and key information annotation. Text cleaning involves removing stop words from the text and standardizing punctuation marks. Word segmentation involves dividing the cleaned text into multiple independent word segments. Key information annotation involves identifying each word segment and labeling each word segment with keywords related to the operators. Based on the keyword tags, word segmentation units corresponding to the keyword tags are extracted from the preprocessed text to be processed, resulting in multiple keywords.
[0008] In one possible implementation, matching a corresponding target operator for each keyword based on a pre-configured operator library includes: Using semantic matching technology, the semantic similarity between each keyword and each basic operator in the pre-configured operator library is calculated. For each keyword, the basic operators whose semantic similarity is higher than a preset similarity threshold are used as candidate operators corresponding to the keyword to obtain a list of candidate operators corresponding to each keyword; Based on the candidate operator list corresponding to each keyword, match the target operator corresponding to each keyword.
[0009] In one possible implementation, matching the target operator corresponding to each keyword based on the candidate operator list corresponding to each keyword includes: The basic operator with the highest semantic similarity in the candidate operator list corresponding to each keyword is determined as the target operator corresponding to each keyword.
[0010] In one possible implementation, the custom operator can be obtained as follows: It directly receives user-written custom logic code blocks and constructs corresponding custom operators in the pre-configured code library based on the custom logic code blocks.
[0011] In one possible implementation, the custom operator can be obtained as follows: The system receives a code package obtained after the user compiles and packages the logic code locally, along with the signature identifier of the code package. Based on the code package and the signature identifier of the code package, the system constructs a corresponding custom operator in the pre-configured operator library.
[0012] In one possible implementation, after extracting logical connectives from the text to be processed and determining the logical relationships between the various conditional operators based on the logical connectives, the method further includes: Extract the processing field identifier from the operator parameters of the condition operators included in the condition operator group; Based on the pre-configured field library, determine whether the processed field identifier has a matching preset field identifier; When the processing field identifier has a matching preset field identifier, the matching preset field identifier is used as the processing field identifier of the condition operator; When there is no matching preset field identifier for the processing field identifier, the field identifier of the first field of the data to be processed is the processing field identifier of the conditional operator by default.
[0013] In one possible implementation, the types of the basic operators include: a verification type and a processing type; the method further includes: When the type of the target operator corresponding to the conditional operator is a verification type, the corresponding preset error type is matched according to the processing field identifier of the conditional operator; The step of generating a corresponding operator rule engine based on the condition operator group and the logical relationship between each condition operator includes: Based on the condition operator group, the logical relationship between each condition operator, and the preset error type corresponding to the condition operator, a corresponding operator rule engine is generated. The operator rule engine is used to verify the data to be processed and output the verification result.
[0014] In one possible implementation, generating the corresponding operator rule engine based on the logical relationship between the condition operator group and each condition operator includes: Based on the conditional operators and the logical relationships between them, a rule tree is constructed; wherein, the rule tree includes: a conditional judgment layer, a first execution layer and a second execution layer, the conditional judgment layer is a conditional expression formed by combining the conditional operators according to the logical relationships between them, the first execution layer is the processing logic executed when the data to be processed meets the conditional expression, and the second execution layer is the processing logic executed when the data to be processed does not meet the conditional expression; Based on the rule tree, an executable configuration for the corresponding operator rule engine is generated, and the executable configuration is encapsulated into a callable operator rule engine.
[0015] Secondly, embodiments of this application provide an operator rule engine construction apparatus, comprising: The text acquisition module is used to acquire the text to be processed; wherein, the text to be processed is natural language text containing operator-related logic; The text extraction module is used to extract multiple keywords from the text to be processed using natural language analysis technology; The operator matching module is used to match a corresponding target operator for each keyword based on a pre-configured operator library, and to generate a corresponding conditional operator group based on the multiple keywords and the corresponding target operators; the pre-configured operator library includes multiple basic operators, which include general operators and custom operators; the conditional operator group includes multiple conditional operators, which are target operators with configured operator parameters; The logic determination module is used to extract logical connectives from the text to be processed and, based on the logical connectives, determine the logical relationships between each of the conditional operators; The engine generation module is used to generate a corresponding operator rule engine based on the condition operator group and the logical relationship between each condition operator.
[0016] Compared with existing technologies, this application has the following advantages: The embodiments of this application use natural language text containing operator-related logic as input, rely on natural language analysis technology to extract keywords, match target operators to generate conditional operator groups, extract logical connectives to determine the logical relationships between operators, and finally generate an operator rule engine. This achieves automated construction from natural language business requirements to the operator rule engine, replacing the traditional method of manually writing data processing calculation logic. This completely avoids the problems of tedious, error-prone, and inefficient manual writing, significantly improving the construction efficiency of the rule engine. Simultaneously, the pre-configured operator library integrates general operators and custom operators, adapting to various business needs for data verification, processing, or anomaly identification. Combined with logical connectives, it accurately determines the logical relationships between operators, ensuring a high degree of fit between the generated operator rule engine and the actual business logic. This enables efficient processing of anomaly identification and processing of general structured and semi-structured data. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating an operator rule engine construction method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the process for preprocessing text to be processed, provided in an embodiment of this application. Figure 3 This application provides a flowchart illustrating the target operator for keyword matching in an embodiment of the present application. Figure 4 A flowchart illustrating another operator rule engine construction method provided in this application embodiment; Figure 5 This is a schematic diagram of the structure of an operator rule engine construction device provided in an embodiment of this application. Detailed Implementation
[0019] As described earlier, in the technical fields of big data governance and data application, general structured and semi-structured data are the main data processing objects in various business scenarios. Verifying, processing, and identifying anomalies in this type of data are core steps in ensuring data quality and achieving effective data utilization. Furthermore, they form the foundation for the smooth progress of subsequent data mining, business analysis, and decision support. To achieve standardized processing of general structured and semi-structured data, it is necessary to rely on corresponding computational logic to perform rule-based verification and processing of the data, thereby accurately identifying data anomalies and completing corresponding processing. Therefore, the design and implementation of computational logic becomes a crucial aspect of this type of data processing.
[0020] Currently, there is no standardized logical framework or automated implementation scheme for the verification, processing, and anomaly detection of general structured and semi-structured data. The process relies entirely on manual design and writing of computational logic to achieve the corresponding data processing goals. Specifically, technicians need to break down the specific processing, verification, or anomaly detection requirements, then gradually analyze the structural characteristics of the data to be processed and the different processing needs. Subsequently, technicians independently design a dedicated computational logic framework, and then implement the computational logic by writing programming code. After completion, it still needs to undergo multiple rounds of debugging, modification, and verification until the computational logic can adapt to the corresponding data structure and achieve the preset processing requirements.
[0021] Therefore, it can be seen that the current technology of manually customizing and writing computational logic for different data structures and various processing and verification requirements not only requires technical personnel to complete a series of tedious steps such as requirement decomposition, data structure analysis, logic design, code writing, debugging and verification, which consumes a lot of manpower and time costs, but is also prone to low accuracy of computational logic due to human negligence, inadequate logical consideration, and coding errors, resulting in various logical errors. Moreover, error investigation and correction will further increase the workload, ultimately leading to a significant reduction in the processing efficiency of general structured and semi-structured data.
[0022] This application provides a method for constructing an operator rule engine, including: acquiring text to be processed; extracting multiple keywords from the text using natural language processing techniques; matching corresponding target operators for each keyword based on a pre-configured operator library, and generating corresponding conditional operator groups based on multiple keywords and corresponding target operators; extracting logical connectives from the text and determining the logical relationships between each conditional operator based on the logical connectives; and generating a corresponding operator rule engine based on the conditional operator groups and the logical relationships between each conditional operator. This application responds to the driving force of natural language text, automatically extracting logic, matching operators, and constructing a rule engine, replacing the traditional method of manually customizing and writing computational logic. This effectively solves the problems of tedious and error-prone processes, achieving a dual improvement in data processing efficiency and accuracy.
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0024] Example 1: The following is combined with Figures 1-3 This application provides a detailed description of an operator rule engine construction method based on its embodiments.
[0025] like Figure 1 As shown in the embodiments of this application, a method for constructing an operator rule engine includes the following steps: S101. Obtain the text to be processed.
[0026] The text to be processed is natural language text containing operator-related logic. In other words, the text to be processed is the natural language text carrier that serves as the input for the operator rule engine to build its requirements. Natural language text is text written in the form of natural language used in daily communication, which is different from professional programming code, logical formulas, etc. It does not require the writer to have professional programming skills or operator rule design capabilities, and can be directly generated by business personnel based on actual data processing needs.
[0027] For example, the text to be processed could be "to verify user data records where the registration time is between 2024-01-01 and 2024-12-31 and the user is older than 18 years old".
[0028] In one possible implementation, the user can manually input the operator-related logic in a pre-defined input box, and then obtain the text to be processed in response to the user's input.
[0029] In another possible implementation, in response to a file import operation, the contents of the imported file are parsed and the text to be processed is extracted to obtain the text to be processed.
[0030] It should be noted that, in addition to manual input and file import, the text to be processed can also be obtained through other methods in the embodiments of this application. This application does not make any specific limitations.
[0031] In this embodiment, natural language text is used as the carrier of input requirements. Users do not need to have professional operator rule design and programming development capabilities. Business personnel can directly write and input the text to be processed according to actual data processing needs, which greatly reduces the usage threshold of operator rule engine construction and realizes direct connection between business needs and technical implementation.
[0032] S102. Extract multiple keywords from the text to be processed using natural language processing techniques.
[0033] Natural Language Analysis (NLA) refers to the use of computer science, linguistics, and statistics to decompose, annotate, reason about, and semantically map natural language (such as Chinese and English), thereby enabling computers to understand the grammatical structure, logical relationships, sentiment, and entity information in natural language.
[0034] Specifically, natural language analysis technology is the part that focuses on analysis in natural language processing technology (NLP). Natural language processing technology is a technical means in artificial intelligence (AI), focusing on enabling computers to understand, generate, process, and interact with natural language, such as analysis, generation, application, etc.
[0035] Among them, keywords refer to the words or phrases extracted from the text to be processed that carry the core information related to the operator's logic, and are the core elements expressing data processing requirements in the text to be processed. For example: verification / processing field keywords (such as registration time, age, order amount, etc.), operator type keywords (such as statistics, splicing, non-empty verification, etc.), operator parameter keywords, etc.
[0036] In a possible implementation, through natural language analysis technology, the text to be processed is preprocessed to obtain the preprocessed text to be processed; based on the keyword tags, the token units corresponding to the keyword tags are extracted from the preprocessed text to be processed, obtaining multiple keywords.
[0037] For ease of understanding, the following will Figure 2 introduce in detail how to preprocess the text to be processed.
[0038] As Figure 2 shown, the preprocessing includes: text cleaning, tokenization, and key information annotation. Specifically, through natural language analysis technology, the text to be processed is sequentially subjected to text cleaning, tokenization, and key information annotation to obtain the preprocessed text to be processed.
[0039] Among them, text cleaning is to remove the stop words in the text to be processed and standardize the punctuation marks in the text to be processed. Stop words refer to the modal particles, conjunctions, auxiliary words, etc. that have no actual operator logic meaning (such as "in", "of", "and", "also", etc.).
[0040] Specifically, the standardization of punctuation marks is as follows: traverse all the punctuation marks in the text to be processed, uniformly convert the English punctuation into the corresponding Chinese punctuation,剔除 the meaningless continuous redundant punctuation, delete the extra interval punctuation between fields and parameters, etc., to ensure the standardization and consistency of the punctuation mark form. Stop word removal is to traverse and remove the stop words in the text to be processed. Stop words include the words with no operator logic meaning, ensuring that any content related to the operator's logic is not removed. After text cleaning, only the core sentences expressing data processing requirements (operator-related logic) in the text to be processed are retained.
[0041] The text cleaning operation standardizes the format of the text to be processed from the source, effectively avoiding subsequent word segmentation errors and keyword extraction deviations caused by chaotic punctuation and redundant stop words, and greatly improving the accuracy of extracting core information related to the operator logic.
[0042] The word segmentation process involves dividing the cleaned text into multiple independent word segments. A word segmentation unit refers to an independent language unit obtained after the cleaned text has been segmented, which can be a single word, a compound phrase, a numerical combination, etc.
[0043] Specifically, word segmentation can be based on semantic understanding natural language analysis algorithms, which split the cleaned text into multiple independent word segmentation units according to the semantic boundaries of the operator-related logic.
[0044] The key information annotation involves identifying each word segmentation unit and labeling it with keyword tags related to the operator. Keyword tags refer to the annotation tags matched to word segmentation units related to the operator, including: verification / processing field tags, operator type tags, operator parameter tags, etc.
[0045] Specifically, all word segmentation units are traversed, and a semantic matching algorithm is used to identify whether the word segmentation unit contains operator-related information. If it is identified as a word segmentation unit related to an operator, the corresponding keyword tag is matched and labeled for the word segmentation unit. If it is identified as a word segmentation unit not related to an operator, it is directly removed without keyword tag labeling.
[0046] The key information annotation step achieves accurate screening of operator-related effective word segmentation units (i.e., word segmentation units related to the operator) and invalid word segmentation units (word segmentation units unrelated to the operator) through semantic recognition. Only effective units are labeled with keyword tags and retained, while all redundant content without operator logical meaning is eliminated. This further simplifies the data source for subsequent processing and improves the effectiveness and relevance of keyword extraction.
[0047] For example, the text to be processed is: "Verify the user data, and count the number of records whose registration time is between 2024-01-01 and 2024-12-31 and whose age is greater than 18 years old. The text to be processed is cleaned to obtain the cleaned text "Verify user data registration time 2024-01-01 to 2024-12-31 age greater than 18 count the number of people who meet the conditions"; the cleaned text is then segmented into multiple word units [registration time, 2024-01-01 to 2024-12-31, age, greater than 18, statistics, number of people]; each word unit is identified and labeled with keywords related to the operators, the keyword label for "registration time" is [verification field label], the keyword label for "2024-01-01 to 2024-12-31" is [operator parameter label], the keyword label for "age" is [verification field label], the keyword label for "greater than 18" is [operator parameter label], the keyword label for "statistics" is [operator type label], and the keyword label for "number of people" is [operator parameter label].
[0048] In this embodiment, the preprocessing of the text to be processed is completed by text cleaning, word segmentation, and key information annotation. This effectively removes redundant and invalid information from the text and accurately identifies and extracts keywords related to the operators, ensuring the accuracy, relevance, and standardization of keyword extraction. At the same time, no manual intervention is required throughout the process, replacing the traditional method of manually breaking down requirements and extracting core information. This completely avoids problems such as misunderstanding of requirements and errors in information extraction caused by manual analysis, significantly reducing labor costs and improving the processing efficiency of the pre-processing stage of operator rule engine construction.
[0049] The above combination Figure 2 This application provides a detailed description of how the text to be processed is preprocessed in the embodiments of this application. The following section will continue to discuss this further. Figure 1 This application provides a detailed description of an operator rule engine construction method based on its embodiments.
[0050] S103. Based on the pre-configured operator library, match the corresponding target operator for each keyword, and generate the corresponding condition operator group based on multiple keywords and corresponding target operators.
[0051] The pre-configured operator library includes multiple basic operators, which include general operators and custom operators.
[0052] Specifically, the pre-configured operator library refers to a pre-configured operator resource library, which includes general operators and custom operators, covering operator requirements for scenarios such as data verification and data processing.
[0053] In one possible implementation, the types of basic operators include: verification type and processing type.
[0054] The basic operators of the validation type refer to the basic operators that are used to realize the core functions of data validity validation and anomaly recognition. They are used to perform rule-based validation on the field values, formats, ranges, and correlations of data to determine whether the data conforms to the preset business rules.
[0055] The basic operators of the processing type refer to the basic operators whose core functions are to realize data format conversion, content aggregation, group statistics and other processing. They are used to perform structured processing, numerical calculation, field concatenation and other operations on data, and output new data or statistical results after processing.
[0056] Among them, general operators include: data dictionary validation operators, string comparison operators, NOT NULL operators, regular expression operators, string range operators, number range operators, number size comparison operators, enumeration operators, statistical operators, statistical field grouping operators, and conversion operators.
[0057] Data dictionary validation operators are operators that rely on data dictionary tables in a database to perform logical data validation. They read from and import a dedicated data dictionary table, match the data to be validated against the data in the table, and complete the data validation. For example, importing a gender data dictionary (including "male" and "female") into the database generates a data dictionary table, and the validation checks if the gender field in the data to be validated matches the data in this table.
[0058] String comparison operators are used to perform logical comparisons between two strings. They match and validate strings according to specified logical operators, with the operators and reference values having a fixed input format. For example, inputting ">, a" in the format "operator, reference string" will perform a lexicographical greater-than logical comparison between the string to be validated and the reference string "a".
[0059] The non-null operator is an operator that implements non-null checks on data. It does not require the configuration of complex validation rules and can trigger non-null checks on the field to be validated simply by using a fixed identifier.
[0060] Regular expression operators are used to precisely validate data format and content using regular expressions. By configuring custom regular expressions, they match whether the data to be validated conforms to preset format requirements. For example, configuring the regular expression "^\d{11}$" as a validation rule will validate the mobile phone number field. 11-digit pure numeric mobile phone numbers, such as "12345678910", will pass the validation, while non-11-digit numbers or content containing non-numeric characters will fail the validation.
[0061] The string range operator is an operator that performs string range verification according to dictionary sorting rules. By configuring the minimum and maximum reference strings, it determines whether the string to be verified is within the range.
[0062] The number range operator is an operator that performs range verification on numerical data. By configuring the minimum and maximum values, it determines whether the value to be verified is within the specified range.
[0063] Numeric comparison operators are used to perform logical comparisons of numerical data. They compare the value to be checked with a reference value according to a specified numerical logical operator. The operator and reference value have a fixed input format. For example, inputting ">, 999" in the format "operator, reference value" will perform a greater than logical comparison on the value to be checked.
[0064] Enumeration operators are operators that perform data verification by using a preset set of enumeration values. They determine whether the data to be verified belongs to the pre-configured range of Jumei. The enumeration values are configured with a fixed split format.
[0065] The statistical operator is an operator that performs statistics and counting on data according to custom conditions. By configuring conditional logic, it aggregates and statistically analyzes target data that meets the conditions and outputs the statistical results. For example, the logic of the statistical operator is "if(toInt(V("age"))>30){count++;}", which performs statistics on the age field of the data to be validated, converts the age field to an integer, counts records with values greater than 30, and outputs the total number of records that meet the condition.
[0066] The statistical field grouping operator is an operator that enables data to be grouped by a specified field before statistical analysis. By configuring one or more grouping fields, the data is grouped by field dimension, and then the data of each group is aggregated and analyzed.
[0067] Transformation operators are data processing operators that perform data format conversion, field content concatenation, and other data processing tasks. By configuring processing logic, they can transform or process target field data and output the processed data.
[0068] Custom operators are personalized operators designed by users based on their specific business logic and stored in a pre-configured operator library. This means the pre-configured operator library supports flexible expansion and updates.
[0069] In one possible implementation, custom operators can be obtained by directly receiving user-written custom logic code blocks and constructing corresponding custom operators in a pre-configured code library based on the custom logic code blocks.
[0070] Specifically, among the above possible implementation methods, the following are suitable for lightweight and simple personalized data processing logic requirements. They do not require users to perform local code compilation and packaging operations. They provide users with a pre-defined entry point for writing custom operator logic code blocks, directly receive user-written custom logic code blocks, parse the custom logic code blocks, and build the corresponding custom operators in the pre-configured code library.
[0071] In this embodiment, user-written custom logic code blocks are received, eliminating the need for users to possess local compilation and packaging development skills. The operation threshold is low, the configuration process is simple, and lightweight custom operators can be quickly constructed, significantly improving the configuration efficiency of personalized operators.
[0072] In another possible implementation, the code package obtained after the user compiles and packages the logic code locally, along with the signature identifier of the code package, is received. Based on the code package and the signature identifier of the code package, the corresponding custom operator is constructed in the pre-configured operator library.
[0073] Specifically, among the above possible implementation methods, the one applicable to complex, multi-field association / multi-logic nesting exclusive business processing requirements is to allow users to complete the writing, compilation and packaging of logic code in their local development environment, and directly receive the code package and its signature identifier uploaded by the user, thereby completing the construction of the corresponding custom operator in the pre-configured code library.
[0074] For example, a user writes the corresponding logic code in a local development environment, compiles and packages the completed local logic code to obtain a code package, and defines a unique signature identifier for the code package; through a dedicated code package upload entry, the user uploads the locally compiled and packaged code package and the code package's signature identifier; the uploaded code package is parsed, and a dedicated calling method is configured for the custom operator based on the signature identifier set by the user, and the corresponding custom operator is built in the pre-configured code library.
[0075] In this embodiment of the application, the local compilation and packaging method supports users in developing complex and exclusive business logic, breaks through the functional boundaries of general operators, and allows the operator rule engine to adapt to complex big data processing scenarios with multiple nested logics specific to enterprises.
[0076] The above has detailed the concept of a pre-configured operator library. The following section will continue to discuss this concept in conjunction with... Figure 1 This application introduces a method for constructing an operator rule engine based on an embodiment of the present application.
[0077] Among them, the target operator refers to the basic operator that matches each keyword from the pre-configured operator library, and is the basic unit that constitutes the conditional operator.
[0078] The conditional operator group includes multiple conditional operators. A conditional operator is a target operator with configured operator parameters. That is, a conditional operator refers to a target operator after the verification / processing field and original acid parameter configuration have been completed. The conditional operator group refers to a structured set of operators formed by integrating multiple target operators with completed parameter configuration based on the semantic relationship of multiple keywords.
[0079] To make it easier to understand, the following will be combined with... Figure 3 This paper details how to match the target operator for the keyword in the embodiments of this application.
[0080] S301. Using semantic matching technology, calculate the semantic similarity between each keyword and each basic operator in the pre-configured operator library.
[0081] Semantic matching technology refers to the techniques used in natural language processing to analyze the degree of semantic association between keywords and basic operators. For example, algorithms for semantic matching include cosine similarity algorithm and semantic vector matching algorithm.
[0082] Semantic similarity refers to the numerical value obtained through semantic matching, which is used to quantify the degree of semantic association between keywords and basic operators. The value range is usually 0-1. The higher the value, the stronger the semantic fit and functional compatibility between the two, and vice versa.
[0083] Specifically, for each keyword, the semantic similarity between the keyword and each basic operator in the pre-configured operator library is calculated.
[0084] S302. For each keyword, the basic operators with semantic similarity higher than the preset similarity threshold are used as candidate operators corresponding to the keyword to obtain a list of candidate operators corresponding to each keyword.
[0085] Among them, candidate operators refer to basic operators in the pre-configured operator library that have a semantic similarity to the keyword higher than a preset similarity threshold, and are potential matching objects for the keyword.
[0086] The candidate operator list refers to the list of all candidate operators selected from the keyword filtering. Specifically, each keyword corresponds to one candidate operator list. For example, three keywords will have three candidate operator lists: keyword a corresponds to candidate operator list A, keyword b corresponds to candidate operator list B, and keyword c corresponds to candidate operator list C.
[0087] In this embodiment of the application, candidate operators are filtered by setting a preset similarity threshold, which effectively eliminates basic operators with low semantic relevance to keywords and avoids interference from basic operators with low relevance to the matching results.
[0088] S303. Based on the candidate operator list corresponding to each keyword, match the target operator corresponding to each keyword.
[0089] The target operator refers to the candidate operator that best meets the requirements from the candidate list corresponding to the keyword. Specifically, each keyword corresponds to one target operator.
[0090] In one possible implementation, the basic operator with the highest semantic similarity in the candidate operator list corresponding to each keyword is determined as the target operator corresponding to each keyword.
[0091] Specifically, for each keyword, the candidate operator with the highest semantic similarity in the candidate operator list is selected as the target operator corresponding to that keyword.
[0092] In this embodiment, the candidate operator with the highest semantic similarity in the candidate list is selected as the target operator, which ensures the highest adaptability between the target operator and the business requirements expressed by the keywords, and effectively avoids subsequent rule engine execution errors caused by the mismatch between the operator function and the business requirements.
[0093] The above combination Figure 3 This application describes in detail how to match the target operator for the keyword in the embodiments. The following section will continue to discuss this further. Figure 1 This application provides a detailed description of an operator rule engine method based on its embodiments.
[0094] S104. Extract logical connectives from the text to be processed, and determine the logical relationships between various conditional operators based on the logical keywords.
[0095] Among them, logical connectives refer to natural language words or phrases in the text to be processed that are used to express the logical relationships between multiple data processing conditions. They are the core language elements that connect the related logic of different operators, have no actual data processing function, and are only used to represent the combinational logic between conditions.
[0096] Among them, logical relations refer to the standardized relations that the operator rule engine can recognize and execute to define the execution logic of multiple conditional operators. They are derived from logical connectives in natural language and mainly include AND and OR.
[0097] Specifically, logical connectives are extracted from the text to be processed and converted into logical relations; based on the semantic expression data of the conditional operators in the text to be processed and the position of the logical connectives in the text to be processed, the logical relations between the various conditional operators are determined.
[0098] S105. Based on the condition operator group and the logical relationship between each condition operator, generate the corresponding operator rule engine.
[0099] Among them, the operator rule engine is the core execution carrier that can independently and automatically execute data verification, processing or anomaly identification logic. It is built on the basis of conditional operator groups carrying logical relationships, and can automatically acquire data, execute operator logic in sequence, determine data processing results and output verification results, data processing or anomaly identification results.
[0100] In one possible implementation, a rule tree is constructed based on the conditional operators and the logical relationships between them; the executable settings of the corresponding operator rule engine are generated based on the rule tree, and the executable configuration is encapsulated into a callable operator rule engine.
[0101] The rule tree includes: a condition judgment layer, a first execution layer, and a second execution layer.
[0102] Specifically, a rule tree is a three-layer branching logic execution structure that is a visual and engineered representation of the logical relationships between conditional operator groups and conditional operators. The rule tree is based on the framework of "conditional judgment layer - first execution layer - second execution layer".
[0103] Among them, the condition judgment layer is a condition expression formed by combining the condition operators according to the logical relationship between the various condition operators. It is the basis for the operator rule engine to perform data processing. It is only used to determine whether the data to be processed meets the preset operator verification / processing conditions, and has no actual data processing action.
[0104] The first execution layer is the processing logic executed when the data to be processed meets the conditional expression. Specifically, it's the specific data processing logic executed by the operator rule engine when the data to be processed meets the conditional expression of the conditional judgment layer. For validation-type conditional operator groups, the first execution layer is the processing logic executed after validation passes; for processing-type conditional operator groups, the first execution layer is the preset processing action.
[0105] The second execution layer contains the processing logic executed when the data to be processed does not meet the conditional expression. Specifically, it's the specific data processing logic executed by the operator rule engine when the data to be processed does not meet the conditional expression used for conditional judgment. For validation-type conditional operator groups, the second execution layer is the processing logic executed after validation fails; for processing-type conditional operator groups, the second execution layer is the prompting action after processing fails.
[0106] It should be noted that a conditional operator group of the verification type refers to a conditional operator group in which all conditional operators are of the verification type, while a conditional operator group of the processing type refers to a conditional operator group in which all conditional operators are of the processing type.
[0107] For example, taking the processing logic executed when the data to be processed meets the condition expression as the first processing logic and the processing logic executed when the data to be processed does not meet the condition expression as the second processing logic, the rule tree is IF (condition expression) THEN (first processing logic) ELSE (second processing logic).
[0108] Specifically, an executable configuration for the corresponding operator rule engine is generated based on the rule tree. The executable configuration can be represented by an executable configuration file, which includes all the information of the operator rule engine. The executable configuration (executable configuration file) is then encapsulated in an engineering manner to generate an operator rule engine that can be run and called independently, so that users can directly click to execute it on the preset interface, or set the execution time / frequency to achieve automated processing.
[0109] In one possible implementation, the operator rule engine is pre-matched with the project. During the generation phase, the operator rule engine is associated and bound to the already created initialization project, binding it to the unique project ID of the corresponding project. The operator rule engine is then mounted to the project directory at the project's underlying level, establishing a one-to-one correspondence between the operator rule engine and the project. This matching relationship is solidified as a fundamental attribute of the operator rule engine after its generation. The pre-matching of the operator rule engine with the project is based on the business data bound to the project, ensuring that the operator rule engine can only process business data bound to its respective project. It also inherits the corresponding project's permission control rules. Only users with the permissions assigned to that project by the super administrator can view the operator rule engine in template configuration and operator rule engine invocation stages, and have the permissions to call, edit, and execute it. Users without the project permissions cannot view or operate the operator rule engine.
[0110] Furthermore, the reusable nature of the project is simultaneously assigned to the pre-matched operator rule engine. Multiple operator rule engines generated under the same project can be repeatedly called and combined within the project to adapt to the verification and processing needs of various business data within the project. Super administrators can flexibly modify the matching relationship between the operator rule engine and the project according to the adjustment of business data and the change of permission allocation, so as to achieve unified management and control of permissions and business data of the project and operator rule engine.
[0111] This application provides a method for constructing an operator rule engine, including: acquiring text to be processed; extracting multiple keywords from the text to be processed using natural language analysis technology; matching a corresponding target operator for each keyword based on a pre-configured operator library, and generating a corresponding condition operator group based on multiple keywords and corresponding target operators; extracting logical connectives from the text to be processed, and determining the logical relationship between each condition operator based on the logical connectives; and generating a corresponding operator rule engine based on the condition operator group and the logical relationship between each condition operator. This application embodiment takes natural language text containing operator-related logic as input, extracts keywords using natural language analysis technology, matches target operators to generate conditional operator groups, extracts logical connectives to determine the logical relationships between operators, and finally generates an operator rule engine. This achieves automated construction from natural language business requirements to the operator rule engine, replacing the traditional method of manually writing data processing calculation logic. It completely avoids the problems of tedious, error-prone, and inefficient manual writing, and significantly improves the construction efficiency of the rule engine. At the same time, the pre-configured operator library integrates general operators and custom operators, which can adapt to various business needs of data verification, processing, or anomaly identification. Combined with logical connectives, it accurately determines the logical relationships between operators, ensuring that the generated operator rule engine is highly consistent with the actual business logic, and can efficiently handle the anomaly identification and processing of general structured and semi-structured data.
[0112] Furthermore, text cleaning was completed by removing stop words and standardizing punctuation, eliminating redundant and invalid information. Independent word segmentation units were obtained through word segmentation, and keyword tags were added to operator-related units, achieving accurate extraction of core keywords related to operators. This effectively avoided keyword extraction deviations caused by fuzzy parsing rules. The entire keyword extraction process was automated using natural language analysis technology, requiring no human intervention. This avoided comprehension biases and information omissions that can occur with manual extraction, ensuring the objectivity, accuracy, and standardization of keyword extraction. This provided accurate and effective semantic basis for subsequent operator matching.
[0113] Furthermore, semantic matching technology is used to quantitatively calculate the semantic similarity between each keyword and the basic operators in the pre-configured operator library. Then, a list of candidate operators is generated by filtering out effective candidate operators through a preset similarity threshold. Finally, the target operator is matched based on the list, transforming subjective operator matching into objective quantitative similarity calculation. This completely avoids the misunderstanding bias and misjudgment problems caused by manual subjective matching of operators, and improves the objectivity and accuracy of operator matching.
[0114] Example 2: The following is combined with Figure 4 This paper details another method for constructing an operator rule engine provided in the embodiments of this application.
[0115] like Figure 4As shown in the embodiments of this application, another method for constructing an operator rule engine includes the following steps: S401, retrieve the text to be processed.
[0116] S402. Extract multiple keywords from the text to be processed using natural language processing techniques.
[0117] S403. Based on the pre-configured operator library, match the corresponding target operator for each keyword, and generate the corresponding condition operator group based on multiple keywords and corresponding target operators.
[0118] S404. Extract logical connectives from the text to be processed, and determine the logical relationships between each conditional operator based on the logical connectives.
[0119] It should be noted that S401-S404 above are the same as S101-S104 in Embodiment 1. For details on the specific implementation of S401-S404, please refer to the specific implementation of S101-S104 in Embodiment 1, which will not be repeated here.
[0120] S405. Extract the processing field identifier from the operator parameters of the condition operators included in the condition operator group.
[0121] Among them, the processing field identifier refers to the specific object identifier for the data verification or processing operation performed by the conditional operator, which can be directly extracted from the operator parameters of the conditional operator.
[0122] Specifically, the operator parameters of each condition operator in the condition operator group are traversed, and the semantic recognition capability of natural language analysis technology is used to accurately extract the field identifiers that represent the data processing objects from the operator parameters, namely the processing field identifiers.
[0123] S406. Based on the pre-configured field library, determine whether the processing field identifier has a matching preset field identifier.
[0124] The pre-configured field library is a pre-configured structured database that includes all field information for the data to be processed that can be validated / processed. The pre-configured field library stores various preset field identifiers and their corresponding field attributes (field type, field length, data format, etc.).
[0125] Among them, the preset field identifier refers to the standardized processing field identifier that has been registered in the pre-configured field library. The preset field identifier can be directly used as the execution object identifier of the condition operator to avoid processing errors caused by inconsistent field identifiers.
[0126] Specifically, the processing field identifier is matched against all preset field identifiers in the pre-configured field library (supporting fuzzy and exact matching of field names and field codes) to determine whether the processing field identifier has a corresponding preset field identifier in the pre-configured field library.
[0127] If a matching preset field identifier exists for the processed field identifier, proceed to S407.
[0128] If no matching preset field identifier is found for the processed field identifier, proceed to step S408.
[0129] S407. Use the matched preset field identifier as the processing field identifier of the condition operator.
[0130] When the extracted processing field identifier has a matching preset field identifier in the pre-configured field library, the standardized preset field identifier is directly used as the final processing field identifier of the conditional operator, ensuring that the processing object of the operator is consistent with the field pre-configured by the system.
[0131] In this embodiment, the processing field identifier is accurately extracted from the operator parameters of the conditional operator, and standardized matching is completed by combining it with the pre-configured field library. A unique processing field identifier is determined for each conditional operator, which completely solves the problems of inconsistent field identifiers and ambiguous processing objects in natural language parsing.
[0132] S408. By default, the field identifier of the first field of the data to be processed is the processing field identifier of the condition operator.
[0133] When the extracted processing field identifier does not match the preset field identifier in the pre-configured field library, the field identifier of the first field of the data to be processed is automatically used as the processing field identifier of the conditional operator, ensuring that the operator has a clear processing object and avoiding the construction of the subsequent operator rule engine process.
[0134] Furthermore, when the extracted processing field identifier does not have a matching preset field identifier in the pre-configured field library, the processing field identifier is uniformly recorded, and a field identifier update prompt is generated to prompt the user to continuously improve the pre-configured field library according to business needs and the recorded unmatched processing field identifiers.
[0135] S409. Based on the condition operator group and the logical relationship between each condition operator, generate the corresponding operator rule engine.
[0136] In one possible implementation, when the target operator corresponding to a conditional operator is of type validation, the corresponding preset error type is matched based on the processing field identifier of the conditional operator. Based on the conditional operator group, the logical relationships between the conditional operators, and the preset error types corresponding to the conditional operators, a corresponding operator rule engine is generated. This operator rule engine is used to validate the data to be processed and output the validation results.
[0137] Among them, the preset error type is a standardized data anomaly type that has been pre-configured and split at the field level. It is a feedback identifier when the validation type condition operator fails. It contains core information such as error type ID, error type name, error description, and project to which it belongs. It corresponds one-to-one with the data processing field identifier, such as registration time field anomaly or age field anomaly.
[0138] In this embodiment, preset error types are matched with validation type condition operators at the field level, achieving precise association between operators, fields, and error types. This allows the validation operator rule engine to directly return the corresponding error type ID when validation fails, enabling precise field-level location of data anomalies and completely solving the problem of difficulty in tracing the cause of anomalies after data validation.
[0139] This application provides a method for constructing an operator rule engine, comprising: acquiring text to be processed; extracting multiple keywords from the text to be processed using natural language analysis technology; matching a corresponding target operator for each keyword based on a pre-configured operator library, and generating a corresponding condition operator group based on multiple keywords and corresponding target operators; extracting logical connectives from the text to be processed, and determining the logical relationship between each condition operator based on the logical connectives; extracting processing field identifiers from the operator parameters of the condition operators included in the condition operator group; determining whether a matching preset field identifier exists for the processing field identifier based on the pre-configured field library; when a matching preset field identifier exists for the processing field identifier, using the matching preset field identifier as the processing field identifier of the condition operator; when no matching preset field identifier exists for the processing field identifier, defaulting to the field identifier of the first field of the data to be processed as the processing field identifier of the condition operator. A corresponding operator rule engine is generated based on the condition operator group and the logical relationship between each condition operator. This application embodiment realizes the automated construction from natural language business requirements to operator rule engine, completely replacing the tedious operation of manually writing data processing and calculation logic, greatly improving engine construction efficiency and lowering the technical threshold; at the same time, relying on a standardized pre-configuration library to complete the accurate matching of operators and fields, combined with the accurate parsing of logical conjunctions, it ensures that the generated operator rule engine is highly consistent with the actual business logic, improving the accuracy and standardization of engine construction; and the matching of field identifiers and the default fallback mechanism effectively avoid the interruption of the engine construction process due to unconfigured fields.
[0140] Example 3: The following is combined with Figure 5 This application provides a detailed description of an operator rule engine construction device based on its embodiments.
[0141] like Figure 5 As shown in the embodiment of this application, an operator rule engine construction device includes the following modules: The text acquisition module 501 is used to acquire the text to be processed; wherein, the text to be processed is natural language text containing operator-related logic; The text extraction module 502 is used to extract multiple keywords from the text to be processed using natural language analysis technology; The operator matching module 503 is used to match the corresponding target operator for each keyword based on a pre-configured operator library, and generate a corresponding condition operator group based on multiple keywords and corresponding target operators. The pre-configured operator library includes multiple basic operators, which include general operators and custom operators. The condition operator group includes multiple condition operators, which are target operators with configured operator parameters. The logic determination module 504 is used to extract logical connectives from the text to be processed and, based on the logical connectives, determine the logical relationships between various conditional operators. Engine generation module 505 is used to generate corresponding operator rule engines based on the condition operator group and the logical relationship between each condition operator.
[0142] In one possible implementation, the text extraction module 502 is specifically used for: Natural language processing (NLP) technology is used to preprocess the text to be processed, resulting in preprocessed text. The preprocessing includes text cleaning, word segmentation, and key information annotation. Text cleaning involves removing stop words from the text and standardizing punctuation marks. Word segmentation involves dividing the cleaned text into multiple independent word segments. Key information annotation involves identifying each word segment and labeling each word segment with keywords related to the operators. Based on keyword tags, word segmentation units corresponding to the keyword tags are extracted from the preprocessed text to be processed, resulting in multiple keywords.
[0143] In one possible implementation, the operator matching module 503 is specifically used to calculate the semantic similarity between each keyword and each basic operator in the pre-configured operator library through semantic matching technology; for each keyword, basic operators with semantic similarity higher than a preset similarity threshold are used as candidate operators corresponding to the keyword to obtain a list of candidate operators corresponding to each keyword; based on the list of candidate operators corresponding to each keyword, the target operator corresponding to each keyword is matched.
[0144] In one possible implementation, the operator matching module 503 is specifically used to determine the basic operator with the highest semantic similarity in the candidate operator list corresponding to each keyword as the target operator corresponding to each keyword.
[0145] In one possible implementation, the device further includes a field matching module for: Extract the processing field identifier from the operator parameters of the condition operators included in the condition operator group; Based on the pre-configured field library, determine whether the processing field identifier has a matching preset field identifier; When a matching preset field identifier exists for the processed field identifier, the matching preset field identifier is used as the processed field identifier for the conditional operator. When there is no matching preset field identifier for the processing field identifier, the field identifier of the first field of the data to be processed is used as the processing field identifier of the condition operator by default.
[0146] In one possible implementation, the types of the basic operators include: a verification type and a processing type. The device also includes: an error matching module, which is used to match the corresponding preset error type according to the processing field identifier of the condition operator when the type of the target operator corresponding to the condition operator is a verification type. The engine generation module 505 is specifically used to generate a corresponding operator rule engine based on the condition operator group, the logical relationship between each condition operator, and the preset error type corresponding to the condition operator. The operator rule engine is used to verify the data to be processed and output the verification results.
[0147] In one possible implementation, the engine generation module 505 is specifically used for: Based on the conditional operators and the logical relationships between them, a rule tree is constructed. The rule tree includes a conditional judgment layer, a first execution layer, and a second execution layer. The conditional judgment layer is a conditional expression formed by combining the conditional operators according to the logical relationships between them. The first execution layer is the processing logic executed when the data to be processed meets the conditional expression. The second execution layer is the processing logic executed when the data to be processed does not meet the conditional expression. Based on the rule tree, generate the corresponding executable configuration of the operator rule engine, and encapsulate the executable configuration into a callable operator rule engine.
[0148] This application provides an operator rule engine construction device, comprising: a text acquisition module 501 for acquiring text to be processed; a text extraction module 502 for extracting multiple keywords from the text to be processed using natural language analysis technology; an operator matching module 503 for matching corresponding target operators for each keyword based on a pre-configured operator library, and generating corresponding condition operator groups based on multiple keywords and corresponding target operators; a logic determination module 504 for extracting logical connectives from the text to be processed, and determining the logical relationships between each condition operator based on the logical connectives; and an engine generation module 505 for generating a corresponding operator rule engine based on the condition operator groups and the logical relationships between each condition operator. This application embodiment takes natural language text containing operator-related logic as input, extracts keywords using natural language analysis technology, matches target operators to generate conditional operator groups, extracts logical connectives to determine the logical relationships between operators, and finally generates an operator rule engine. This achieves automated construction from natural language business requirements to the operator rule engine, replacing the traditional method of manually writing data processing calculation logic. It completely avoids the problems of tedious, error-prone, and inefficient manual writing, and significantly improves the construction efficiency of the rule engine. At the same time, the pre-configured operator library integrates general operators and custom operators, which can adapt to various business needs of data verification, processing, or anomaly identification. Combined with logical connectives, it accurately determines the logical relationships between operators, ensuring that the generated operator rule engine is highly consistent with the actual business logic, and can efficiently handle the anomaly identification and processing of general structured and semi-structured data.
[0149] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. The components indicated 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 embodiment solution according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0150] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for constructing an operator rule engine, characterized in that, include: Obtain the text to be processed; wherein, the text to be processed is natural language text containing operator-related logic; Multiple keywords are extracted from the text to be processed using natural language processing techniques. Based on a pre-configured operator library, a corresponding target operator is matched for each keyword, and a corresponding conditional operator group is generated based on the multiple keywords and the corresponding target operators; the pre-configured operator library includes multiple basic operators, which include general operators and custom operators; the conditional operator group includes multiple conditional operators, which are target operators with configured operator parameters; Extract logical connectives from the text to be processed, and determine the logical relationships between each of the conditional operators based on the logical connectives; Based on the condition operator group and the logical relationship between each condition operator, a corresponding operator rule engine is generated.
2. The method according to claim 1, characterized in that, The process involves extracting multiple keywords from the text to be processed using natural language processing techniques, including: Natural language processing (NLP) technology is used to preprocess the text to be processed, resulting in preprocessed text. The preprocessing includes text cleaning, word segmentation, and key information annotation. Text cleaning involves removing stop words from the text and standardizing punctuation marks. Word segmentation involves dividing the cleaned text into multiple independent word segments. Key information annotation involves identifying each word segment and labeling each word segment with keywords related to the operators. Based on the keyword tags, word segmentation units corresponding to the keyword tags are extracted from the preprocessed text to be processed, resulting in multiple keywords.
3. The method according to claim 1, characterized in that, The step of matching a corresponding target operator for each keyword based on a pre-configured operator library includes: Using semantic matching technology, the semantic similarity between each keyword and each basic operator in the pre-configured operator library is calculated. For each keyword, the basic operators whose semantic similarity is higher than a preset similarity threshold are used as candidate operators corresponding to the keyword to obtain a list of candidate operators corresponding to each keyword; Based on the candidate operator list corresponding to each keyword, match the target operator corresponding to each keyword.
4. The method according to claim 3, characterized in that, The matching of the target operator corresponding to each keyword based on the candidate operator list corresponding to each keyword includes: The basic operator with the highest semantic similarity in the candidate operator list corresponding to each keyword is determined as the target operator corresponding to each keyword.
5. The method according to claim 1, characterized in that, The custom operator can be obtained in the following way: It directly receives user-written custom logic code blocks and constructs corresponding custom operators in the pre-configured code library based on the custom logic code blocks.
6. The method according to claim 1, characterized in that, The custom operator can be obtained in the following way: The system receives a code package obtained after the user compiles and packages the logic code locally, along with the signature identifier of the code package. Based on the code package and the signature identifier of the code package, the system constructs a corresponding custom operator in the pre-configured operator library.
7. The method according to claim 1, characterized in that, After extracting logical connectives from the text to be processed and determining the logical relationships between the various conditional operators based on the logical connectives, the method further includes: Extract the processing field identifier from the operator parameters of the condition operators included in the condition operator group; Based on the pre-configured field library, determine whether the processed field identifier has a matching preset field identifier; When the processing field identifier has a matching preset field identifier, the matching preset field identifier is used as the processing field identifier of the condition operator; When there is no matching preset field identifier for the processing field identifier, the field identifier of the first field of the data to be processed is the processing field identifier of the conditional operator by default.
8. The method according to claim 7, characterized in that, The types of the basic operators include: verification type and processing type; the method further includes: When the type of the target operator corresponding to the conditional operator is a verification type, the corresponding preset error type is matched according to the processing field identifier of the conditional operator; The step of generating a corresponding operator rule engine based on the condition operator group and the logical relationship between each condition operator includes: Based on the condition operator group, the logical relationship between each condition operator, and the preset error type corresponding to the condition operator, a corresponding operator rule engine is generated. The operator rule engine is used to verify the data to be processed and output the verification result.
9. The method according to claim 1, characterized in that, The step of generating a corresponding operator rule engine based on the condition operator group and the logical relationship between each condition operator includes: Based on the conditional operators and the logical relationships between them, a rule tree is constructed; wherein, the rule tree includes: a conditional judgment layer, a first execution layer and a second execution layer, the conditional judgment layer is a conditional expression formed by combining the conditional operators according to the logical relationships between them, the first execution layer is the processing logic executed when the data to be processed meets the conditional expression, and the second execution layer is the processing logic executed when the data to be processed does not meet the conditional expression; Based on the rule tree, an executable configuration for the corresponding operator rule engine is generated, and the executable configuration is encapsulated into a callable operator rule engine.
10. An operator rule engine construction apparatus, characterized in that, include: The text acquisition module is used to acquire the text to be processed; wherein, the text to be processed is natural language text containing operator-related logic; The text extraction module is used to extract multiple keywords from the text to be processed using natural language analysis technology; The operator matching module is used to match a corresponding target operator for each keyword based on a pre-configured operator library, and to generate a corresponding conditional operator group based on the multiple keywords and the corresponding target operators; the pre-configured operator library includes multiple basic operators, which include general operators and custom operators; the conditional operator group includes multiple conditional operators, which are target operators with configured operator parameters; The logic determination module is used to extract logical connectives from the text to be processed and, based on the logical connectives, determine the logical relationships between each of the conditional operators; The engine generation module is used to generate a corresponding operator rule engine based on the condition operator group and the logical relationship between each condition operator.