Scoring rule formula generation method, system and device and storage medium

By automatically processing user-inputted scoring rules using AI tools, accurate and standardized computer-analyzable formulas are generated, solving the problems of low efficiency and numerous errors in traditional manual writing and achieving efficient and accurate scoring rule generation.

CN121766440APending Publication Date: 2026-03-31INSPUR QILU SOFTWARE IND
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional manual coding of scoring rules and formulas is inefficient and prone to errors, especially in complex or multi-indicator scenarios where it is difficult to accurately convert them into computer-analyzable formulas.

Method used

AI tools are used for natural language processing. Through natural language processing algorithms and models, key information is automatically extracted from the natural language scoring rules input by the user, generating computer-parseable scoring rule formulas. Syntax checks and optimizations are performed to ensure the accuracy and uniformity of the formulas.

Benefits of technology

It improves the efficiency and accuracy of generating scoring rule formulas, reduces human error, standardizes the formula format, facilitates backend system parsing and calculation, and is applicable to various business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121766440A_ABST
    Figure CN121766440A_ABST
Patent Text Reader

Abstract

The invention discloses a scoring rule formula generation method, system and device and a storage medium. The scoring rule formula generation method comprises the steps that S1, index scoring rule content in a natural language form input by a user is received; s2, analyzing and processing the content of the index scoring rule by adopting a natural language processing algorithm and a model, and extracting key information; s3, according to the key information and a preset rule, generating a scoring rule formula which can be analyzed by a computer; s4, performing grammar check and optimization on the scoring rule formula; and S5, outputting the optimized scoring rule formula to a back-end system, and applying the scoring rule formula to a scoring calculation process. By adopting the method, automatic, efficient and accurate generation of the scoring rule formula is realized, manual errors are reduced, the formula format is unified and standardized, and the method is suitable for making the multi-scene scoring rule.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a method, system, apparatus, and storage medium for generating scoring rule formulas. Background Technology

[0002] In various business scenarios in modern society, the formulation of scoring rules is a common and crucial step. Taking corporate performance evaluation as an example, departments need to be scored based on indicators such as the number of projects, annual profit, completion rate, and collection rate, along with the corresponding weightings, to assess the overall performance of the department this year. Traditionally, manually writing scoring rule formulas is not only inefficient but also prone to errors, especially when the scoring rules are complex and involve numerous indicators, significantly increasing the difficulty of writing them. With the development of natural language processing technology, it has become possible to use AI tools to process natural language and transform user-described scoring rules into computer-processable formulas. However, currently, there are still technological gaps in accurately and efficiently converting user-inputted scoring rules into formulas suitable for backend parsing and calculation. Summary of the Invention

[0003] The technical objective of this invention is to address the above-mentioned shortcomings by providing a method and system for generating scoring rule formulas. Through AI tools, it achieves automatic conversion from natural language scoring rule content to computer-parseable formulas, realizing automatic, efficient, and accurate generation of scoring rule formulas, reducing human error, standardizing formula formats, and being applicable to the formulation of scoring rules in multiple scenarios. It has broad application prospects and practical value.

[0004] In a first aspect, the present invention provides a method for generating scoring rule formulas, comprising the following steps: S1: Receives the user's input in natural language form of the indicator scoring rules; S2: Using natural language processing algorithms and models, the content of the indicator scoring rules is analyzed and processed, and key information is extracted; S3: Based on the key information and preset rules, generate a computer-parseable scoring rule formula; S4: Perform syntax checking and optimization on the scoring rule formula; S5: Output the optimized scoring rule formula to the backend system and apply the scoring rule formula to the scoring calculation process.

[0005] One optional approach is to set up a user input interface in S1 to receive the indicator scoring rules in natural language form input by the user, including: receiving the indicator scoring rules input by keyboard and voice, and performing a preliminary format check on the indicator scoring rules. If the check passes, proceed to S2; otherwise, return an error message.

[0006] One optional approach is that, in step S2, the analysis and processing of the content of the indicator scoring rules and the extraction of key information include: performing word segmentation, part-of-speech tagging, entity recognition, and semantic parsing on the content of the indicator scoring rules, and then extracting key information.

[0007] One optional approach is that the technical architecture of the natural language processing algorithm and model adopts Python 3.11 as the core language, and implements service deployment and elastic scaling based on Docker and Kubernetes. The core algorithm is equipped with the DeepSeek-R1 large model and uses LoRA technology. Word segmentation is combined with the BERT-base-chinese model and a professional dictionary. Word segmentation is performed dynamically using the WordPiece algorithm, and semantic associations are captured using an attention mechanism. Part-of-speech tagging and entity recognition adopt the BiLSTM-CRF model. Domain corpora are labeled using the Label Studio tool. Transfer learning is used to initialize parameters. Semantic parsing introduces knowledge graph and entity linking technology to convert natural language rules into logical expressions. Training optimization is performed on an 8-card NVIDIA A100 cluster to complete mixed-precision training, and the inference latency is optimized to within 80ms.

[0008] One optional approach is to generate a computer-parseable scoring rule formula in step S3 based on the key information and preset rules, including: using a rule base to store various formulas to generate the preset rules and templates; using a rule engine written in Python to construct the formula structure based on an abstract syntax tree; integrating the PyUnit library to implement unit standardization conversion; using AST node traversal technology to nest conditional expressions to generate a priority sorting algorithm for multi-interval rules; generating the scoring rule formula based on the numerical interval; and verifying the syntactic validity of the scoring rule formula through JSON Schema.

[0009] One optional approach is to perform grammatical checks and optimizations on the scoring rule formula in step S4, including: introducing a genetic algorithm to optimize the formula structure, using "parsing efficiency" and "readability" as fitness functions, iteratively optimizing the order of condition judgments to bring high-frequency triggering conditions forward to reduce backend computation time, and using the ANTLR parser for lexical analysis to fix redundant parentheses and operator precedence errors. The optimized formula is then imported into the Apache Calcite computing engine for execution.

[0010] One optional approach is to output the optimized scoring rule formula to the backend system in step S5 and apply the scoring rule formula to the scoring calculation process, including: transmitting the scoring rule formula to the backend system via the gRPC interface, serializing the data of the scoring rule formula using Protocol Buffers, and the backend system loading the scoring rule formula by building a real-time computing engine based on Apache Flink.

[0011] Secondly, the present invention provides a scoring rule formula generation system, comprising: User input module: Used to receive the index scoring rules in natural language form from the user; Natural Language Processing Module: Used to analyze and process the content of the indicator scoring rules using natural language processing algorithms and models, and extract key information; Formula generation module: used to generate computer-parseable scoring rule formulas based on the key information and preset rules; Formula optimization module: used to perform syntax checking and optimization on the scoring rule formula; Formula output module: Used to output the optimized scoring rule formula to the backend system and apply the scoring rule formula to the scoring calculation process.

[0012] In another invention, the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described scoring rule formula generation method.

[0013] In another invention, the present invention provides a computer-readable storage medium comprising a computer program that, when executed by a processor, implements the steps of the above-described scoring rule formula generation method.

[0014] The scoring rule formula generation method and system of the present invention have the following advantages: (1) Improved efficiency: It greatly reduces the time and workload of manually writing scoring rule formulas. Users only need to describe the rules in natural language, and the system can quickly generate formulas. It is especially suitable for complex scenarios with a large number of rules. (2) Improved accuracy: It avoids logical and grammatical errors that may occur when writing manually. Through the precise processing of natural language processing technology and preset rules, the accuracy of the generated formulas is guaranteed. (3) Unified standardization: The generated formulas have a unified format and structure, which facilitates efficient parsing and calculation by the backend system, reduces the difficulty of system development and maintenance, and improves the system's compatibility and scalability. (4) Wide applicability: It is applicable to the formulation of scoring rules in various business scenarios such as company assessment and agricultural production. It can meet different needs by simply adjusting the relevant parameters and rules of natural language processing and formula generation according to the specific scenario. It has broad application prospects and high practical value. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] The invention will be further described below with reference to the accompanying drawings.

[0017] Figure 1 This is a flowchart of the scoring rule formula generation method according to Embodiment 1 of the present invention; Figure 2 This is a flowchart illustrating the working process of the scoring rule formula generation method according to Embodiment 1 of the present invention; Figure 3 This is a logical structure diagram of a system for generating scoring rule formulas based on AI tools according to Embodiment 2 of the present invention. Detailed Implementation

[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0019] It should be understood that in the description of the embodiments of the present invention, terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance, nor as indicating or implying order. In the embodiments of the present invention, "multiple" refers to two or more.

[0020] In this embodiment of the invention, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, B existing alone, or both A and B existing simultaneously. Furthermore, in this document, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Example

[0021] like Figure 1 and Figure 2 As shown, the scoring rule formula generation method provided in this embodiment includes the following steps: S1: Receives the index scoring rules in natural language form input by the user.

[0022] The system features a user-friendly interface that receives user-inputted scoring rules and supports multiple input methods, such as keyboard and voice input. Voice input is converted to text, and the system performs initial format validation and provides error messages. If the validation passes, the system proceeds to step S2; otherwise, an error message is returned. Taking the scoring rules for a company's performance evaluation as an example, the user input is as follows: The user enters "Department's annual net profit greater than 10 million is assigned 100 points, greater than 6 million but less than 10 million is assigned 80 points, and less than 6 million is assigned 60 points" through the touchscreen text box on the user input interface. The system also supports voice input, using the integrated iFlytek speech recognition engine to convert voice commands into structured text in real time, with a conversion latency controlled within 500ms and an accuracy rate exceeding 98.7%.

[0023] S2: Use natural language processing algorithms to analyze and process the content of the indicator scoring rules and extract key information.

[0024] AI natural language processing (NLP) algorithms and models are employed to analyze and process the input content, extracting key information. These NLP algorithms and models can be developed based on open-source NLP frameworks (such as NLTK, spaCy, and AllenNLP), and combined with custom model training and optimization to improve the accuracy of information extraction. The analysis and processing of the indicator scoring rules includes word segmentation, part-of-speech tagging, entity recognition, and semantic parsing, followed by the extraction of key information.

[0025] In this embodiment, the technical architecture of the natural language processing algorithm and model adopts Python 3.11 as the core language, and implements service deployment and elastic scaling based on Docker and Kubernetes. The core algorithm is equipped with the DeepSeek-R1 large model and uses LoRA technology. Word segmentation is combined with the BERT-base-chinese model and a professional dictionary. Word segmentation is performed dynamically using the WordPiece algorithm, and semantic associations are captured using an attention mechanism. Part-of-speech tagging and entity recognition adopt the BiLSTM-CRF model. Domain corpora are labeled using the Label Studio tool, and parameters are initialized through transfer learning. The entity recognition F1 score reaches 96.3%. Semantic parsing introduces knowledge graph and entity linking technology to convert natural language rules into logical expressions. Training optimization is performed on an 8-card NVIDIA A100 cluster to complete mixed precision training, and the inference latency is optimized to within 80ms.

[0026] The technical architecture of the natural language processing (NLP) algorithms and models can use Python 3.11 as the core development language, deploy the NLP service based on Docker containers, and achieve elastic scaling of the service through Kubernetes. The core algorithm layer is equipped with the DeepSeek-R1 large model, which is fine-tuned for the assessment features. LoRA (Low-Rank Adaptation) technology is used to reduce the fine-tuning cost. The training process adopts mixed precision computing (FP16+BF16) and is completed on an 8-GPU NVIDIA A100 cluster. The model inference latency is optimized to within 80ms. For word segmentation, a pre-trained BERT-base-chinese model is loaded based on the Hugging FaceTransformers library. Combined with a professional dictionary, dynamic word segmentation is achieved. For "department's annual net profit is greater than 10 million", the WordPiece word segmentation algorithm is used to break it down into sub-word units such as "department", "annual net profit", "greater than", and "10 million". Attention mechanism is used to capture the semantic relationship between "department" and "annual net profit", solving the problem of traditional word segmentation's fragmentation of professional terms. Part-of-speech tagging and entity recognition: A sequence labeling model is constructed using a Bidirectional Long Short-Term Memory (BiLSTM) network combined with a Conditional Random Field (CRF). The BiLSTM layer employs a two-layer stacked structure (512 hidden layer dimensions), and the CRF layer optimizes the labeled sequences using the Viterbi algorithm. For domain-specific characteristics, Label Studio is used to label the indicator corpus (containing entity labels such as "department," "year," and "net profit"). Transfer learning is used to initialize the model parameters, achieving an F1 score of 96.3% for entity recognition. For example, it accurately identifies "project annual net profit" as an indicator entity, "10 million" as a numerical entity, and "100 points" as a score entity. Semantic parsing: A knowledge graph is introduced to enhance semantic understanding. An indicator knowledge graph is constructed, and entity linking technology is used to associate the numerical range of "greater than 6 million and less than 10 million" with the "grading standards" in the graph. Meanwhile, based on the logical reasoning capabilities of the DeepSeek-R1 model, the logical AND relationship represented by "AND" is parsed, and the natural language rules are converted into first-order logical expressions: (Annual net profit of the project > 6 million) ∧ (Annual net profit of the project < 10 million).

[0027] S3: Based on the key information and preset rules, generate a computer-parseable scoring rule formula.

[0028] Based on the extracted key information and preset rules, scoring rule formulas are generated. A rule library is used to store various formula generation rules and templates, which can be flexibly called and combined according to different business scenarios and rule types. In this embodiment, a rule engine written in Python is used to construct the formula structure based on an abstract syntax tree. The PyUnit library is integrated to implement unit standardization conversion. An AST node traversal technique is used to nest conditional expressions to generate a priority sorting algorithm for multi-interval rules. The scoring rule formula is generated according to the numerical interval, and the syntactic validity of the scoring rule formula is verified by JSON Schema.

[0029] The rule engine, written in Python, constructs its formula structure based on an Abstract Syntax Tree (AST). To address the diversity of numerical units, it integrates the PyUnit library for unit standardization, automatically converting "10 million" to "10,000,000" for storage. During formula generation, it uses AST node traversal techniques to nest conditional expressions, automatically generating a priority sorting algorithm (e.g., sorting by numerical range from high to low) for multi-range rules. The final formula is "[Project Net Profit][Year]>10,000,000?100:[Project Net Profit][Year]>6,000,000&&[Project Net Profit][Year]<10,000,000?80:60", and its syntax is validated using JSON Schema. If the syntax validation passes, it proceeds to S4; otherwise, it returns for modification.

[0030] S4: Perform syntax checks and optimizations on the scoring rule formula.

[0031] The generated formulas are checked and optimized to ensure their correctness and compliance. A syntax checker and optimization algorithm are used to automatically detect and fix problems in the formulas. A genetic algorithm is introduced to optimize the formula structure, using "parsing efficiency" and "readability" as fitness functions to iteratively optimize the order of condition judgments, placing frequently triggered conditions first and reducing backend computation time. Simultaneously, the ANTLR parser is used to perform lexical analysis on the formulas, automatically correcting redundant parentheses, operator precedence errors, and other issues. The generated optimized formulas can be directly imported into the Apache Calcite computing engine for execution. S5: Output the optimized scoring rule formula to the backend system and apply the scoring rule formula to the scoring calculation process.

[0032] The optimized formula is output to the backend system to enable data interaction and connection with the backend system, ensuring that the formula can be smoothly applied to the scoring calculation process.

[0033] The scoring rule formula is transmitted to the backend system via the gRPC interface. Protocol Buffers are used to serialize the data of the scoring rule formula. The backend system, built on an Apache Flink real-time computing engine, loads the scoring rule formula. By interfacing with the backend production evaluation system via the gRPC interface and using Protocol Buffers to serialize the formula data, transmission efficiency is improved by 40%. The backend system, built on an Apache Flink real-time computing engine, loads the generated formula as a UDF (User-Defined Function), enabling real-time scoring of data from all departments within the company, with computation latency controlled within 50ms.

[0034] The method for generating scoring rule formulas based on AI tools provided in this embodiment can automatically extract and edit the scoring rule content input by the user, generate the corresponding scoring rule formula, improve the efficiency and accuracy of scoring rule formula generation, and facilitate the backend system to parse and calculate the formula. Example

[0035] Figure 3 A logical structure block diagram of the scoring rule formula generation system according to Embodiment 2 of the present invention.

[0036] like Figure 3 As shown, the scoring rule formula generation system provided in this embodiment is a system corresponding to the scoring rule formula generation method in Embodiment 1, including a user input module, a natural language processing module, a formula generation module, a formula optimization module, and a formula output module.

[0037] User input module; used to receive user input in natural language format of the indicator scoring rules.

[0038] Natural Language Processing Module: Used to analyze and process the content of the indicator scoring rules using natural language processing algorithms and models, and extract key information.

[0039] Formula generation module: used to generate computer-parseable scoring rule formulas based on the key information and preset rules.

[0040] Formula optimization module: Used to perform syntax checks and optimizations on the scoring rule formulas.

[0041] Formula output module: Used to output the optimized scoring rule formula to the backend system and apply the scoring rule formula to the scoring calculation process.

[0042] In this embodiment, the index scoring rules in natural language form are received through the user input module. Key information is extracted by the natural language processing module that integrates technologies such as DeepSeek large model, BERT, and BiLSTM-CRF. Then, the formula generation module converts it into a computer-parseable scoring rule formula according to preset rules. The formula optimization module performs syntax checking and optimization. Finally, the formula output module provides it to the backend system for calculation. Example

[0043] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the scoring rule formula generation method of Embodiment 1. Example

[0044] A computer-readable storage medium includes a computer program that, when executed by a processor, implements the steps of the scoring rule formula generation method in Embodiment 1.

[0045] The scoring rule formula generation method, system, apparatus, and storage medium according to the present invention have been described above by way of example with reference to the accompanying drawings. However, those skilled in the art should understand that various modifications can be made to the scoring rule formula generation method, system, apparatus, and storage medium proposed in the present invention without departing from the scope of the invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method of generating a scoring rule formula, characterized by, Comprise the following steps: S1: receiving the user input natural language form index scoring rule content; S2: using natural language processing algorithm and model, analyzing and processing the index scoring rule content, and extracting key information; S3: generating a computer-resolvable scoring rule formula according to the key information and the preset rule; S4: syntax checking and optimization of the scoring rule formula; S5: output the optimized scoring rule formula to the backend system, and apply the scoring rule formula to the scoring calculation process.

2. The scorecard formula generation method of claim 1, wherein, In the S1, a user input interface is set to receive the user input natural language form index scoring rule content, including: receiving keyboard input, voice input index scoring rule content, and performing preliminary format checking on the index scoring rule content, if the checking result is passed, then S2 is performed, if the checking result is not, then an error prompt is returned.

3. The scorecard rule formulation method of claim 1, wherein, In the S2, the index scoring rule content is analyzed and processed, and the key information is extracted, including: performing word segmentation processing, part-of-speech tagging, entity recognition, and semantic analysis on the index scoring rule content, and then extracting key information.

4. The scorecard rule formulation method of claim 3, wherein, The technical architecture of the natural language processing algorithm and model uses Python 3.11 as the core language, realizes service deployment and elastic expansion and contraction based on Docker and Kubernetes, the core algorithm carries DeepSeek-R1 large model and uses LoRA technology, word segmentation processing combines BERT-base-chinese model and professional dictionary, dynamic word segmentation is realized through WordPiece algorithm, semantic correlation is captured by using attention mechanism, BiLSTM-CRF model is used for part-of-speech tagging and entity recognition, domain corpus is labeled by using Label Studio tool, parameters are initialized by transfer learning, knowledge graph and entity linking technology are introduced for semantic analysis, natural language rules are converted into logical expressions, mixed precision training is completed on an 8-card NVIDIA A100 cluster, and reasoning delay optimization is less than 80ms.

5. The scorecard rule formulation method of claim 1, wherein, In the S3, a computer-resolvable scoring rule formula is generated according to the key information and the preset rule, including: using a rule library to store various formula generation preset rules and templates; using a rule engine written in Python to construct a formula structure based on an abstract syntax tree; integrating a PyUnit library to realize unit standardization conversion; using AST node traversal technology to nest condition expressions; generating a priority sorting algorithm for multi-interval rules; generating the scoring rule formula according to the numerical interval; and verifying the syntax legality of the scoring rule formula by JSON Schema.

6. The scorecard rule formulation method of claim 1, wherein, In the S4, the scoring rule formula is syntax checked and optimized, including: introducing a genetic algorithm to optimize the formula structure, taking "parsing efficiency" and "readability" as fitness functions, and through iterative optimization of the condition judgment order, the high-frequency trigger condition is preposed to reduce the back-end calculation time, and the ANTLR syntax analyzer is used for lexical analysis, redundant parentheses and operator priority errors are repaired, and the optimized formula is imported into the Apache Calcite computing engine for execution.

7. The scorecard rule formulation method of claim 1, wherein, In the S5, the optimized scoring rule formula is output to the back-end system, and the scoring rule formula is applied to the scoring calculation process, including: transmitting the scoring rule formula to the back-end system through a gRPC interface, serializing the data of the scoring rule formula using Protocol Buffers, and the back-end system loads the scoring rule formula based on the Apache Flink real-time computing engine.

8. The scorecard rule formulation system of claim 1, wherein, Including: A user input module for receiving user input in the form of natural language indicators scoring rule content; A natural language processing module for analyzing and processing the indicator scoring rule content using natural language processing algorithms and models, and extracting key information; A formula generation module for generating computer-analyzable scoring rule formulas based on the key information and preset rules; A formula optimization module for syntax checking and optimizing the scoring rule formula; A formula output module for outputting the optimized scoring rule formula to the back-end system and applying the scoring rule formula to the scoring calculation process.

9. An electronic device, comprising: Memory, processor and computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the scoring rule formula generation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and when the processor executes the computer program, the steps of the scoring rule formula generation method according to any one of claims 1 to 7 are implemented.