A Chinese Requirements Standardization Approach Based on Large Language Model and EARS Paradigm

By transforming the English EARS paradigm into the Chinese EARS paradigm and combining it with the phased processing of the large language model, the accuracy and efficiency issues of Chinese requirement standardization were resolved, achieving high-quality Chinese requirement standardization.

CN120704646BActive Publication Date: 2025-11-14SHANGHAI YIWEI MEIYUE AVIATION EQUIP TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511179531.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-22
Publication Date
2025-11-14
Estimated Expiration
2045-08-22

AI Technical Summary

Technical Problem

The traditional EARS paradigm is mainly designed for English requirements and cannot adapt to Chinese word order and expression habits. Existing automated methods have low accuracy when processing Chinese requirements and lack the semantic understanding capabilities of large language models, resulting in low efficiency and unstable quality in requirement standardization.

Method used

The English EARS paradigm is transformed into a Chinese EARS paradigm template. Combined with a large language model, a phased processing strategy is adopted, and preset prompts and evaluation indicators are used to standardize Chinese requirements.

Benefits of technology

It improved the accuracy of standardizing Chinese requirements, reduced manual intervention, saved project costs, and improved processing efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704646B_ABST
    Figure CN120704646B_ABST
Patent Text Reader

Abstract

This application provides a method for standardizing Chinese requirements based on a large language model and the EARS paradigm. The method includes: converting an English EARS paradigm pattern into a Chinese EARS paradigm template according to Chinese grammatical structure; inputting the original requirement text and preset first-stage prompts into a preset large language model to determine the first-stage output text; inputting the first-stage output text and preset second-stage prompts into the preset large language model, performing a structured transformation according to the Chinese EARS paradigm template to determine the second-stage output text; and evaluating the quality of the second-stage output text according to preset evaluation indicators to determine the standardized requirement text that conforms to the Chinese EARS paradigm. This application, by employing a Chinese EARS paradigm template tailored to Chinese requirements and combining it with a preset large language model, improves the accuracy of Chinese requirement processing, achieves end-to-end automated processing, reduces manual intervention, and improves the quality of Chinese requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language technology, and more specifically, to a method for Chinese requirement standardization based on a large language model and the EARS paradigm. Background Technology

[0002] Requirements engineering is a critical stage in the software development lifecycle, which includes processes such as requirements elicitation, requirements analysis, requirements specification, and requirements verification. Standardized requirements description is an important foundation for ensuring the quality of software systems.

[0003] Traditional requirements standardization relies primarily on manual work by requirements engineers, which suffers from low efficiency, inconsistent quality, and strong subjectivity. However, the development of natural language processing technology, particularly the rise of Large Language Models (LLMs), has provided a new technological path for automating requirements engineering.

[0004] EARS (Easy Approach to Requirements Syntax) is a requirements standardization method proposed by Rolls-Royce, which uses predefined syntax templates to standardize requirement expressions. Traditional EARS mainly includes five modes: Ubiquitous, Event-driven, State-driven, Optional, and Complex.

[0005] However, existing technologies have the following shortcomings:

[0006] 1. The traditional EARS paradigm is primarily based on English grammar, and its grammatical structure "The <system>shall <response>"Not used to Chinese word order and expression habits;"

[0007] 2. Existing methods for standardizing automated requirements are mainly designed for English requirements, and lack specific methods for handling the characteristics of Chinese grammar and semantic expression;

[0008] 3. Traditional methods have low accuracy in handling uniqueness identification, ambiguity resolution, and pronoun substitution in Chinese language requirements;

[0009] 4. Existing technologies lack effective solutions to improve the quality of requirement standardization by combining the powerful Chinese understanding capabilities of large language models.

[0010] For example, Chinese patent application CN114692588B discloses an extension method based on semi-structured natural language EARS requirement templates. However, this method is mainly based on rule templates and does not combine the semantic understanding capabilities of large language models, so its effectiveness is limited when dealing with complex Chinese expressions. Summary of the Invention

[0011] In view of the shortcomings of the prior art, the purpose of this application is to provide a Chinese requirement standardization method based on the large language model and EARS paradigm.

[0012] The first aspect of this application provides a method for standardizing Chinese requirements based on a large language model and the EARS paradigm, including:

[0013] Based on the Chinese grammatical structure, the English EARS paradigm pattern is converted into a Chinese EARS paradigm template;

[0014] Input the original requirement text and the preset first-stage prompt words into the preset large language model to determine the first-stage output text. The preset first-stage prompt word template includes task description, processing goal, uniqueness judgment criteria, and text standardization rules.

[0015] The first-stage output text and the preset second-stage prompt words are input into the preset large language model. The structure is transformed according to the Chinese EARS paradigm template to determine the second-stage output text. The preset second-stage prompt word template includes task description, Chinese EARS paradigm template, transformation rules, and vocabulary replacement table.

[0016] Based on the preset evaluation indicators, the quality of the output text in the second stage is evaluated to determine the standardized text that meets the Chinese EARS paradigm.

[0017] Optionally, the English EARS paradigm includes Ubiquitous, Event-driven, State-driven, Optional, and Complex.

[0018] The Chinese EARS paradigm template includes: under the condition of <preconditions>, the <executor> should <execute an action> to achieve the <target effect>; the <preconditions> and the <target effect> represent optional elements, while the <executor> and the <execute action> represent required elements.

[0019] Optionally, the method further includes:

[0020] Based on the first-stage requirement text processing task and the preset first-stage prompt word template, a preset first-stage prompt word is constructed. The preset first-stage prompt word is used to perform action uniqueness decomposition, symbol standardization, and pronoun disambiguation on the original requirement text.

[0021] Based on the second-stage text processing task and the preset second-stage prompt word template, a preset second-stage prompt word is constructed. The preset second-stage prompt word is used to perform grammatical structure transformation, semantic specification, and terminology standardization on the first-stage output text.

[0022] A few-shot learning strategy is adopted to embed a preset number of standardized examples into the preset first-stage prompt words and the preset second-stage prompt words, respectively.

[0023] Optionally, the step of inputting the original demand text and preset first-stage prompt words into a preset large language model to determine the first-stage output text includes:

[0024] Based on the preset first-stage prompt words, the original requirement text is decomposed into action uniqueness to determine the atomic requirements of a single action;

[0025] The atomic requirements of the single action are symbolically standardized to determine the symbolically standardized atomic requirements.

[0026] The atomic requirements, after symbolic standardization, undergo pronoun disambiguation processing to determine the first-stage output text. Optionally, the step of performing action-uniqueness decomposition processing on the original requirement text based on the preset first-stage prompt words to determine the atomic requirements for a single action includes:

[0027] A preset verb recognition algorithm is used to detect action verbs in the original requirement text to determine the action verbs in the original requirement text;

[0028] Perform parallel logical connector detection on the original requirement text to identify parallel logical connectors in the original requirement text;

[0029] Based on the action verbs and the parallel logical connectors, the original requirement text is split into action segments to determine the atomic requirements of the single action.

[0030] Optionally, the symbolic normalization of the atomic requirements for the single action to determine the symbolically normalized atomic requirements includes:

[0031] Remove the parentheses from the atomic requirements of the single action;

[0032] Replace the symbol " / " in the atomic requirement of the single action with the Chinese expression "or", and determine the atomic requirement after symbol normalization.

[0033] Optionally, the step of performing pronoun disambiguation on the symbolically standardized atomic requirements to determine the first-stage output text includes:

[0034] Replace the pronouns in the atomic requirements that have undergone symbolic standardization with specific entity names to determine the output text of the first stage.

[0035] Optionally, the step of inputting the first-stage output text and the preset second-stage prompt words into the preset large language model, performing structured transformation according to the Chinese EARS paradigm template, and determining the second-stage output text includes:

[0036] Convert the output text of the first stage into the text corresponding to the Chinese ERAS paradigm template;

[0037] Convert the passive voice in the text corresponding to the Chinese ERAS paradigm template into the active voice;

[0038] Convert the vague expressions in the text corresponding to the Chinese ERAS paradigm template into specific expressions;

[0039] Convert unverifiable statements in the text corresponding to the Chinese ERAS paradigm template into testable statements;

[0040] Remove non-essential <target effect> text from the text corresponding to the Chinese ERAS paradigm template to determine the output text for the second stage.

[0041] Optionally, the preset evaluation metrics include EARS paradigm consistency metrics, syntactic correctness metrics, and semantic integrity metrics.

[0042] Optionally, the step of evaluating the quality of the output text in the second stage according to preset evaluation indicators and determining the standardized text that conforms to the Chinese EARS paradigm includes:

[0043] The EARS paradigm consistency index is used to perform EARS paradigm consistency detection on the output text of the second stage to determine the required text after EARS paradigm consistency detection.

[0044] The grammatical correctness index is used to perform grammatical correctness detection on the requirement text that has passed the EARS paradigm consistency test, and the requirement text that has passed the grammatical correctness detection is determined.

[0045] The semantic integrity index is used to perform semantic integrity detection on the requirement text that has undergone grammatical correctness detection, thereby determining the standardized requirement text that conforms to the Chinese EARS paradigm.

[0046] A second aspect of this application provides a Chinese requirements standardization system based on a large language model and the EARS paradigm, including:

[0047] The Chinese EARS paradigm template building module is used to convert English EARS paradigm patterns into Chinese EARS paradigm templates based on Chinese grammatical structure.

[0048] The first-stage requirement text processing module is used to input the original requirement text and the preset first-stage prompt words into the preset large language model to determine the first-stage output text. The preset first-stage prompt word template includes task description, processing goal, uniqueness judgment criteria, and text standardization rules.

[0049] The second-stage requirement text processing module is used to input the first-stage output text and the preset second-stage prompt words into the preset large language model, perform structured transformation according to the Chinese EARS paradigm template, and determine the second-stage output text. The preset second-stage prompt word template includes task description, Chinese EARS paradigm template, transformation rules, and vocabulary replacement table.

[0050] The quality evaluation module is used to evaluate the quality of the output text in the second stage according to preset evaluation indicators, and to determine the standardized text that conforms to the Chinese EARS paradigm.

[0051] A third aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of any of the methods provided in the first aspect of this application.

[0052] A fourth aspect of this application provides an electronic device comprising:

[0053] A memory on which computer programs are stored;

[0054] A processor for executing the computer program in the memory to implement the steps of any of the methods provided in the first aspect of this application.

[0055] This application presents a Chinese requirement standardization method based on a large language model and the EARS paradigm. It adopts a Chinese EARS paradigm template tailored to Chinese requirements to improve the accuracy of processing Chinese requirements. Combined with a pre-set large language model, it leverages the powerful semantic understanding capabilities and phased processing strategies of the large language model to achieve end-to-end automated processing, reduce manual intervention, effectively improve the processing quality and efficiency of Chinese requirements, and save project costs.

[0056] Other technical effects resulting from the additional features will be further illustrated in the corresponding embodiments. Attached Figure Description

[0057] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0058] Figure 1 This is a flowchart illustrating a Chinese requirement standardization method based on a large language model and the EARS paradigm, according to an exemplary embodiment.

[0059] Figure 2 This is a schematic diagram illustrating the structure of a Chinese requirements standardization system based on a large language model and the EARS paradigm, according to an exemplary embodiment. Detailed Implementation

[0060] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.

[0061] The terms "comprising" and "having," and any variations thereof, in the embodiments of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or devices.

[0062] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0063] Traditional requirement standardization relies primarily on manual work by requirement engineers, resulting in low efficiency, inconsistent quality, and high subjectivity. Furthermore, the traditional EARS paradigm is mainly designed for English requirements and is ill-suited to Chinese word order and expression habits, leading to lower accuracy when processing Chinese requirements. To address these issues, this application provides a Chinese requirement standardization method based on a large language model and the EARS paradigm.

[0064] Figure 1 This is a flowchart illustrating a Chinese requirement standardization method based on a large language model and the EARS paradigm, according to an exemplary embodiment.

[0065] Reference Figure 1 As shown in the figure, one embodiment of this application provides a Chinese requirement standardization method based on a large language model and the EARS paradigm, including steps S11 to S14.

[0066] S11, based on the Chinese grammatical structure, converts the English EARS paradigm pattern into a Chinese EARS paradigm template.

[0067] S12, input the original requirement text and the preset first-stage prompt words into the preset large language model to determine the first-stage output text.

[0068] Specifically, the preset first-stage prompt template includes task description, processing goal, uniqueness judgment criteria, and text standardization rules.

[0069] S13: Input the first-stage output text and the preset second-stage prompt words into the preset large language model, perform structure transformation according to the Chinese EARS paradigm template, and determine the second-stage output text.

[0070] Specifically, the preset second-stage prompt word template includes a task description, a Chinese EARS paradigm template, conversion rules, and a vocabulary replacement table.

[0071] S14. Based on the preset evaluation indicators, evaluate the quality of the output text in the second stage and determine the standardized text that meets the Chinese EARS paradigm.

[0072] The embodiments described above in this application employ a Chinese EARS paradigm template tailored to Chinese requirements, thereby improving the accuracy of processing Chinese requirements. Combined with a pre-set large language model, the powerful semantic understanding capabilities and phased processing strategies of the large language model enable end-to-end automated processing, reducing manual intervention, effectively improving the processing quality and efficiency of Chinese requirements, and saving project costs.

[0073] In some specific implementations of this application, the English EARS paradigm includes Ubiquitous, Event-driven, State-driven, Optional, and Complex.

[0074] Specifically, Ubiquitous represents universal type, Event-driven represents event-driven type, State-driven represents state-driven type, Optional represents optional type, and Complex represents complex type.

[0075] The Chinese EARS paradigm template includes: Under the <preconditions>, the <executor> should <perform an action> to achieve the <target effect>.

[0076] Specifically, <preconditions> and <target effect> represent optional elements, while <executive subject> and <execution action> represent required elements.

[0077] To obtain the Chinese EARS paradigm, for S11, based on the Chinese grammatical structure, the English EARS paradigm pattern can be converted into a Chinese EARS paradigm template. This can be done by:

[0078] Based on the Chinese grammatical structure, the five English EARS paradigms, namely Ubiquitous, Event-driven, State-driven, Optional, and Complex, are transformed into Chinese EARS paradigm templates. That is, under the <preconditions>, the <executing subject> should <perform an action> to achieve the <target effect>.

[0079] Specifically, Chinese grammatical structures include subject, predicate, object, attributive, adverbial, complement, and their corresponding word order.

[0080] In the Chinese EARS paradigm template, <precondition> represents the condition or state that triggers the Chinese requirement, corresponding to the when, if, and while conditions in the English EARS paradigm.

[0081] <Executing Entity> refers to the system, module, or role that performs the action;

[0082] <Execution Action> indicates the specific function or behavior that needs to be performed;

[0083] <Target effect> indicates the purpose or effect achieved by performing an action, and is used to improve comprehensibility.

[0084] To obtain the Chinese EARS paradigm, some specific embodiments of this application construct a Chinese EARS element identification rule knowledge base, including: a Chinese trigger word library and subject identification rules.

[0085] Specifically, the Chinese trigger word library includes conditional trigger word library, action trigger word library, and effect trigger word library.

[0086] Conditional trigger terms may include, but are not limited to: when..., if..., under... circumstances, if...;

[0087] Action-triggered words may include, but are not limited to: should, must, need, should, able;

[0088] The effect trigger word library may include, but is not limited to: so that, in order to, thereby, and ensure.

[0089] The subject identification rule is used to identify the entity performing the action in the Chinese requirement standardization, ensuring the correct extraction of the <Execution Subject> element in the EARS paradigm template.

[0090] Specifically, the subject identification rules include:

[0091] 1. Lexical level recognition: Establish a main vocabulary library, including predefined words such as system-related (system, platform, module, device), personnel-related (user, administrator, operator), and business entity-related (department, account, order).

[0092] 2. Grammatical position recognition: Based on the characteristics of Chinese word order, it identifies the grammatical patterns of sentence-initial subject ("<subject>+should+<action>") and passive voice conversion ("<action>+by+<subject>+execute").

[0093] 3. Pronoun disambiguation: Replace pronouns such as "the system", "it", and "related personnel" with specific entity names to avoid ambiguous references.

[0094] 4. Composite Entity Splitting: Split parallel entities such as "users and administrators" into independent single entity requirements.

[0095] 5. Contextual Inference: When the subject is missing, the implicit subject is inferred based on the business domain and the preceding context, and a default subject priority is established (system > user > administrator).

[0096] For example, entity recognition rules are used to identify entities performing actions and convert them into the Chinese EARS paradigm:

[0097] Original text: "When a user logs in, their personal homepage should be displayed."

[0098] Identification result: Latent subject "system";

[0099] Standardization: "When a user is logged in, the system should display their personal homepage."

[0100] For example, entity recognition rules are used to identify entities performing actions and convert them into the Chinese EARS paradigm:

[0101] Original text: "Data verification and backup are handled by the security module."

[0102] Recognition result: The subject "security module" in the passive voice;

[0103] Standardization: "The security module should complete data verification and backup."

[0104] The embodiments described above in this application transform the English EARS paradigm into a Chinese EARS paradigm template that is standardized for Chinese requirements, and construct a Chinese EARS element identification rule knowledge base. When processing Chinese requirements, it can accurately identify the subject performing the action and understand the semantics of the Chinese requirements, thereby improving the accuracy of standardizing Chinese requirements and reducing quality problems in Chinese requirements.

[0105] To achieve standardized processing of Chinese requirements, in some specific embodiments of this application, a method for standardizing Chinese requirements based on a large language model and the EARS paradigm may further include S15 to S17.

[0106] S15. Based on the first-stage text processing task and the preset first-stage prompt word template, construct the preset first-stage prompt words.

[0107] Specifically, the first phase of the text processing task includes action uniqueness decomposition and text standardization.

[0108] The preset first-stage prompts are used to perform action uniqueness decomposition, symbol standardization, and pronoun disambiguation on the original requirement text.

[0109] For example, the preset first-stage prompt word template:

[0110] #Task Description:

[0111] You are a professional requirements engineer. Please preprocess the following Chinese requirements text.

[0112] #Processing Target:

[0113] Uniqueness decomposition: breaking down a requirement that includes multiple actions into multiple independent requirements;

[0114] Text standardization: standardizing symbols and textual expressions.

[0115] #Uniqueness judgment criteria:

[0116] Each individual requirement contains an action verb;

[0117] Identify parallel logical connectors;

[0118] Multiple independent requirements are semantically complete.

[0119] #Text standardization rules:

[0120] Remove parentheses: Remove the parentheses symbols and their contents;

[0121] Symbol replacement: Replace " / " with "or";

[0122] Pronoun disambiguation: Replace "the system" and "it" with specific entity names.

[0123] #Text to be processed

[0124] {input_text}

[0125] Please follow the above requirements:

[0126] S16. Based on the second-stage text processing task and the preset second-stage prompt word template, construct the preset second-stage prompt words.

[0127] Specifically, the second phase of the requirements text processing task includes converting the requirements text into the standard Chinese EARS paradigm format.

[0128] The preset second-stage prompts are used to perform grammatical structure transformation, semantic specification, and terminology standardization on the output text of the first stage.

[0129] For example, a preset second-stage prompt word template:

[0130] #Task Description:

[0131] Please convert the following requirement text into the standard Chinese EARS format.

[0132] #Chinese EARS Paradigm Template:

[0133] "Under the premise of the <preconditions>, the <implementing entity> shall <perform the action> to achieve the <target effect>."

[0134] Note: <Prerequisites> and <Target Effect> are optional elements.

[0135] #Conversion rules:

[0136] Voice conversion: changing passive voice to active voice;

[0137] Semantic precision: converting vaguely descriptive words into concretely descriptive words;

[0138] Testability: Transforming subjective evaluations into objective evaluations;

[0139] Simplicity: Remove non-essential <target effects>.

[0140] #Vocabulary replacement table:

[0141] Replace "suitable" with "meets performance requirements";

[0142] Replace "sufficient" with "not less than the preset first threshold";

[0143] Replace "efficiently" with "within the specified time";

[0144] Replace "stablely" with "when the failure rate is less than the preset second threshold".

[0145] The preset second threshold can be 0.1%.

[0146] # Text to be processed

[0147] {input_text}

[0148] Please convert using the Chinese EARS paradigm template.

[0149] S17 employs a few-shot learning strategy, embedding a preset number of standardized examples into the preset first-stage prompt words and the preset second-stage prompt words, respectively.

[0150] Specifically, the few-shot learning strategy.

[0151] Three to five standardized examples can be embedded in the preset first-stage prompts and the preset second-stage prompts, respectively.

[0152] For example, an tagged example is embedded in the preset first-stage prompt words:

[0153] Input: The system should perform data verification and (automatic) backup, and generate log files simultaneously;

[0154] Output:

[0155] 1. The system should perform data verification;

[0156] 2. The system should perform automatic backups;

[0157] 3. The system should generate log files.

[0158] For example, a standardized example is embedded in the preset second-stage prompt:

[0159] Input: The system should perform data validation;

[0160] Output: The system should validate the format and integrity of the input data.

[0161] The embodiments described above in this application effectively address the issues of uniqueness, consistency, and clarity in Chinese requirements by constructing preset first-stage prompts and preset second-stage prompts, thereby reducing requirement quality problems.

[0162] To achieve standardized processing of Chinese requirements by combining a large language model, the API interface of a preset large language model is accessed and the preset large language model is called. In some specific embodiments of this application, the preset large language model can be a pre-trained model based on the Transformer architecture, with a parameter scale of no less than 7 billion, and supports Chinese semantic understanding.

[0163] For example, the preset large language model can be GPT-3.5, GPT-4, ChatGLM, or ERNIE.

[0164] To achieve standardized processing of Chinese requirements, in some specific embodiments of this application, for S12, the original requirement text and the preset first-stage prompt words are input into a preset large language model to determine the first-stage output text, which can be done using S121 to S122.

[0165] S121, based on the preset first-stage prompt words, perform action uniqueness decomposition on the original requirement text to determine the atomic requirements of a single action.

[0166] Specifically, based on the preset first-stage prompt words, the original requirement text is decomposed into action uniqueness using uniqueness evaluation rules.

[0167] The uniqueness evaluation rules include: action quantity detection, analysis of parallel logical connectors, and semantic integrity judgment.

[0168] In some specific embodiments of this application, S121 may be S1211 to S1213.

[0169] S1211, a preset verb recognition algorithm is used to detect action verbs in the original requirement text and determine the action verbs in the original requirement text.

[0170] S1212, Perform parallel logical connector detection on the original requirement text to identify parallel logical connectors in the original requirement text.

[0171] Specifically, parallel logical connectors include, but are not limited to, "and", "and", and "at the same time".

[0172] S1213, Based on action verbs and parallel logical connectors, the original requirement text is split into action segments to determine the atomic requirements of a single action.

[0173] Specifically, the atomic requirements of a single action are all semantically complete and independent.

[0174] In the above embodiments of this application, the original requirement text is decomposed into atomic requirements with single actions through the uniqueness evaluation rule, improving the accuracy of Chinese requirements.

[0175] S122. Perform symbol standardization processing on the atomic requirements of single actions to determine the atomic requirements after symbol standardization processing.

[0176] Specifically, S122 may include:

[0177] Replace the symbol " / " in the atomic requirements of single actions with the Chinese expression "or" to determine the atomic requirements after symbol standardization processing.

[0178] S123. Perform pronoun disambiguation processing on the atomic requirements after symbol standardization processing to determine the first-stage output text.

[0179] Specifically, S123 may include:

[0180] Replace the pronouns in the atomic requirements after symbol standardization processing with specific entity names to determine the first-stage output text.

[0181] Among them, the pronouns may include but are not limited to "the system" and "it".

[0182] The first-stage output text is the set of texts output after the first-stage processing.

[0183] In the above embodiments of this application, the first-stage prompt words are used in combination with a preset large language model, applying the powerful semantic understanding ability of the preset large language model, effectively solving the uniqueness problem of Chinese requirements and the text standardization problem, achieving end-to-end automated processing, reducing manual intervention, and saving labor costs.

[0184] To achieve the standardized processing of Chinese requirements, in some specific embodiments of this application, for S13, the first-stage output text and a preset second-stage prompt word are input into a preset large language model, and structural conversion is performed according to the Chinese EARS paradigm template to determine the second-stage output text. S131 to S135 can be adopted.

[0185] S131. Convert the first-stage output text into the text corresponding to the Chinese ERAS paradigm template.

[0186] Specifically, convert the first-stage output text into a text in the form of "In the case of <precondition>, <execution subject> should <execution action> to <target effect>".

[0187] S132. Convert the passive voice in the text corresponding to the Chinese ERAS paradigm template into the active voice.

[0188] For example, the passive voice of "being executed" and "being processed" can be converted into the active voice, that is, converted into "the executing subject should perform the action".

[0189] S133 converts the vague expressions in the text corresponding to the Chinese ERAS paradigm template into specific expressions.

[0190] For example, replace vague terms such as "appropriate", "sufficient", and "as much as possible" with specific quantitative indicators or explicit descriptions.

[0191] For example, replace "suitable" with specific specifications or standards:

[0192] Performance requirements:

[0193] Original requirement: "The system should provide an appropriate response time";

[0194] After conversion: "The system should respond to the user's request within 3 seconds."

[0195] Quantitative standards: time threshold, percentile requirements.

[0196] Capacity requirement category:

[0197] Original requirement: "The database should have adequate storage space";

[0198] After conversion: "The database should provide at least 1TB of available storage space".

[0199] Quantitative standards: specific capacity values ​​and growth reserves.

[0200] For example, replace "sufficient" with a minimum threshold requirement.

[0201] Resource allocation:

[0202] Original requirement: "The server should have sufficient memory";

[0203] After conversion: "The server should be configured with no less than 16GB of RAM".

[0204] Quantitative standards: minimum configuration requirements, peak load standards.

[0205] Safety strength category:

[0206] Original requirement: "Passwords should have sufficient complexity";

[0207] After conversion: "Passwords should contain at least 8 characters, including uppercase and lowercase letters, numbers, and special symbols."

[0208] Quantification standards: length, character type, and combination requirements.

[0209] For example, replace "as much as possible" with optimizing the target boundary:

[0210] Performance optimization:

[0211] Original requirement: "The system should process requests as quickly as possible."

[0212] After conversion: "The system should process 95% of requests within 2 seconds under normal load."

[0213] Quantitative standards: percentile performance, load conditions.

[0214] Resource utilization category:

[0215] Original requirement: "Memory usage should be minimized as much as possible";

[0216] After conversion: "Application memory usage should be kept below 512MB".

[0217] Quantitative standards: resource limits, monitoring thresholds.

[0218] S134, convert unverifiable statements in the text corresponding to the Chinese ERAS paradigm template into testable statements.

[0219] For example, subjective evaluations such as "efficiently" and "stablely" can be transformed into quantifiable performance indicators.

[0220] For example, replace "efficiently" with efficiency performance metrics:

[0221] Processing efficiency category:

[0222] Original requirement: "The system should efficiently process batch data";

[0223] After conversion: "The system should process batch data at a rate of no less than 1,000 records per second".

[0224] Quantitative standards: throughput, processing rate.

[0225] Algorithm efficiency:

[0226] Original requirement: "The search function should return results efficiently";

[0227] After conversion: "The search function should return results within 500 milliseconds and support the retrieval of 100,000 data entries."

[0228] Quantitative standards: response time, data scale.

[0229] For example, replace "stable" with a reliability metric:

[0230] System availability class:

[0231] Original requirement: "The system should provide stable service."

[0232] After conversion: "The system should maintain 99.9% monthly availability, with unplanned downtime not exceeding 8 hours per month."

[0233] Quantitative standards: Availability percentage, downtime limits.

[0234] Error rate control class:

[0235] Original requirement: "Data transmission should proceed stably."

[0236] After conversion: "The data transmission error rate should be less than 0.01%, and an automatic retransmission mechanism should be supported."

[0237] Quantitative standards: error rate threshold, recovery mechanism.

[0238] S135, remove non-essential <target effect> from the text corresponding to the Chinese ERAS paradigm template, and determine the output text for the second stage.

[0239] Specifically, non-primary target effects refer to target effects other than the core target effects in the text corresponding to the Chinese ERAS paradigm template, and represent redundant target effects.

[0240] The embodiments described above in this application employ second-stage prompt words and combine them with a preset large language model. By utilizing the powerful semantic understanding capabilities of the preset large language model, structural transformation is performed based on the Chinese EARS template. Furthermore, the quality of the executed language is improved by converting passive voice to active voice, vague expressions to specific annotations, and unverifiable expressions to testable expressions. By removing non-essential <target effects>, the conciseness of the text is enhanced.

[0241] Based on the above steps S12 to S13, this application adopts preset first-stage prompt words and preset second-stage prompt words, combined with a preset large language model, and effectively solves the problems of uniqueness, consistency and clarity of Chinese requirements through a phased processing strategy. The quality problems of Chinese requirements can be reduced by more than 60%, and manual intervention can be reduced by more than 80%.

[0242] In some specific methods of this application, the preset evaluation indicators include EARS paradigm consistency indicator, syntactic correctness indicator, and semantic integrity indicator.

[0243] To ensure the quality of the standardized requirement text, in some specific embodiments of this application, for S14, the quality of the output text of the second stage is evaluated according to the preset evaluation index to determine the standardized requirement text that conforms to the Chinese EARS paradigm. This can be done using S141 to S143.

[0244] S141, the EARS paradigm consistency index is used to perform EARS paradigm consistency detection on the output text of the second stage to determine the requirement text after EARS paradigm consistency detection.

[0245] Specifically, the EARS paradigm consistency index can be:

[0246] Format matching: "Under the <preconditions>, the <executor> shall <perform an action> to achieve the <target effect>".

[0247] Required elements: <Executing entity> + Should + <Execution action>;

[0248] Optional elements: <Prerequisites>, <Target effect>.

[0249] For example, a requirement text conforming to the EARS paradigm would be:

[0250] "The system should verify the user's identity."

[0251] "When a user is logged in, the system should display the main interface."

[0252] "Users should enter a valid email address."

[0253] For example, a requirement text that does not conform to the EARS paradigm is:

[0254] "Verify user identity" (lacking subject and should).

[0255] "The system verifies the user's identity" (missing "should").

[0256] "The system should verify the user's identity" (using "should" instead of "shall").

[0257] S142, use the syntax correctness index to perform syntax correctness detection on the requirement text that has passed the EARS paradigm consistency check, and determine the requirement text that has passed the syntax correctness detection.

[0258] Specifically, grammatical correctness indicators can be adopted as follows:

[0259] The subject-verb-object structure is complete; verbs are used accurately; punctuation is correct; and word order conforms to Chinese usage.

[0260] For example, a grammatically correct requirement text:

[0261] "The system should save user data." (Subject, verb, and object complete).

[0262] "In the event of a network outage, the system should switch to offline mode." (Sentence order is correct.)

[0263] For example, the text requiring a grammatical error:

[0264] "The system should save user data" (missing a period).

[0265] "The system should save user data." (Incorrect sentence order).

[0266] "The system should save." (Object missing).

[0267] S143. The semantic integrity index is used to perform semantic integrity detection on the requirement text that has been processed for grammatical correctness, and to determine the standardized requirement text that conforms to the Chinese EARS paradigm.

[0268] Specifically, semantic integrity metrics can be adopted as follows:

[0269] The action description is clear and specific; the target of execution is clear; the logical relationship is complete; and it is highly understandable.

[0270] For example, a semantically complete requirement text:

[0271] "The system should encrypt the password entered by the user using MD5." (The action, object, and method are all clearly defined.)

[0272] "If a user enters the wrong password three times consecutively, the system should lock the user's account for 30 minutes." (The conditions, actions, and duration are all specified.)

[0273] For example, a semantically incomplete requirement text:

[0274] "The system should process the data." (The processing method is unclear).

[0275] "The system should perform verification." (The verification target is unclear.)

[0276] "User should perform the following action." (Action details are missing).

[0277] In the embodiments described above, the quality of the second-stage output text is evaluated by using the EARS paradigm consistency index, grammatical correctness index, and semantic integrity index to ensure that the output text conforms to the Chinese EARS paradigm and to guarantee the quality of the output text.

[0278] The preferred features in the above embodiments can be used individually in any embodiment, or in any combination thereof, provided they do not conflict with each other. Furthermore, parts not described in detail in the embodiments can be implemented using existing technologies.

[0279] The following examples and comparative examples will be used to further illustrate this application in order to better understand the above-mentioned technical solutions. It should be understood that the following are only some examples and are not intended to limit this application.

[0280] In some specific embodiments of this application, based on steps S15 to S16 and steps S12 to S13 of this application, the OpenAI ChatGPT model is called to process the original requirement text in stages to obtain the output text, i.e., the second-stage output text. The code implemented using Python software is as follows:

[0281] Python

[0282] import openai

[0283] class LLMProcessor:

[0284] def __init__(self, model_name="gpt-3.5-turbo", api_key ="your_key"):

[0285] self.model = model_name

[0286] self.client = openai.OpenAI(api_key =api_key)

[0287] def process_stage1(self, requirements_text):

[0288] prompt = self.build_stage1_prompt(requirements_text)

[0289] response = self.client.chat.completions.create(

[0290] model = self.model,

[0291] messages= [{"role": "user", "content": prompt}],

[0292] temperature=0.1, # Reduce randomness and ensure consistency

[0293] max_tokens=2000 )

[0295] return self.parse_stage1_output(response.choices[0].message.content)

[0296] def process_stage2(self, preprocessed_requirements):

[0297] results = [ ]

[0298] for req in preprocessed_requirements:

[0299] prompt = self.build_stage2_prompt(req)

[0300] response = self.client.chat.completions.create(

[0301] model = self.model,

[0302] messages= [{"role": "user", "content": prompt}],

[0303] temperature=0.1,

[0304] max_tokens= 1000 )

[0306] results.append(response.choices[0].message.content.strip())

[0307] return results

[0308] Specifically, the code is analyzed as follows:

[0309] 1. Class initialization (__init__ method)

[0310] It accepts two parameters: model_name (model name, defaults to gpt-3.5-turbo) and api_key (OpenAI's API key).

[0311] Initialize the model name and create an OpenAI client instance (for subsequent API calls).

[0312] First stage processing (process_stage1 method)

[0313] Input: Original requirements text (requirements_text).

[0314] process:

[0315] ① Call the build_stage1_prompt method to generate the first stage prompt.

[0316] ② Call the OpenAI API, send a prompt word to the model, and get a response (temperature=0.1 indicates a more stable output).

[0317] ③ Call the parse_stage1_output method to parse the model output and obtain the preprocessed requirement list.

[0318] Second stage processing (process_stage2 method)

[0319] Input: The list of requirements after the first stage of preprocessing (preprocessed_requirements).

[0320] process:

[0321] ① Iterate through each preprocessed sub-requirement.

[0322] ② For each sub-requirement, call the build_stage2_prompt method to generate the second-stage prompt.

[0323] ③ Call the OpenAI API one by one to process the sub-requirements and obtain standardized results.

[0324] ④ Collect all results and return a processed list, which is the output text of the second stage.

[0325] In some specific embodiments of this application, based on step S14 of this application, the quality of the output text of the second stage is evaluated according to the preset evaluation indicators to determine the standardized text that meets the Chinese EARS paradigm. The code implemented using Python software is as follows:

[0326] Python

[0327] class QualityEvaluator:

[0328] def __init__(self):

[0329] self.ears_pattern = r'^(In.+ case,)?(.+) should (.+)(, to.+)?.$'

[0330] def evaluate_quality(self, requirements_list):

[0331] scores = {}

[0332] for i, req in enumerate(requirements_list):

[0333] scores[f"req_{i}"] = {

[0334] "ears_compliance": self.check_ears_format(req),

[0335] "grammatical_correctness": self.check_grammar(req),

[0336] "semantic_completeness": self.check_completeness(req),

[0337] "testability": self.check_testability(req)

[0338] }

[0339] return scores

[0340] def check_ears_format(self, requirement):

[0341] import re

[0342] return bool(re.match(self.ears_pattern, requirement))

[0343] def check_grammar(self, requirement):

[0344] # Check grammatical correctness: subject-verb-object completeness, punctuation correctness, etc.

[0345] has_subject = any(word in requirement for word in ["system", "user", "module"])

[0346] has_action = "should" in requirement

[0347] return has_subject and has_action

[0348] def check_completeness(self, requirement):

[0349] # Check semantic integrity: actions are clear and objects are well-defined.

[0350] return len(requirement)>10 and "should" in requirement

[0351] def check_testability(self, requirement):

[0352] # Check testability: Avoid subjective statements

[0353] subjective_words = ["suitable", "sufficient", "efficient", "stable", "aesthetically pleasing"]

[0354] return not any(word in requirement for word in subjective_words)

[0355] Specifically, the code is analyzed as follows:

[0356] 1. Class initialization (__init__ method)

[0357] (1) A regular expression, ears_pattern, is defined to match specific requirement formats (EARS paradigm).

[0358] (2) The meaning of this regular expression is: the requirement format should be "(under the circumstances,) ... should ... (, in order to ...)", for example, "when a user logs in, the system should record the login time".

[0359] 2. Core evaluation method (evaluate_quality)

[0360] Input: a list of requirements (requirements_list, each item is a string).

[0361] Output: A dictionary where the key is the requirement number (e.g., req_0) and the value is the evaluation result of the requirement in four dimensions (Boolean: True if met, False if not met).

[0362] The four evaluation dimensions include: EARS format compliance, syntactic correctness, semantic integrity, and testability.

[0363] 3. Inspection methods for each dimension

[0364] check_ears_format: Checks whether the requirements conform to the EARS format using an initialized regular expression.

[0365] check_grammar: Checks whether the grammar is complete by determining whether it contains a subject (such as "system" or "user") and "should" (action marker).

[0366] check_completeness: This function roughly checks whether the semantics are complete by judging the length (>10 characters) and whether it contains "should".

[0367] check_testability: Checks whether it contains subjective words (such as "appropriate" or "efficient"). If it does not, the testability meets the standard.

[0368] In some specific embodiments of this application, based on the above steps S11 to S17, the process of using a Chinese EARS paradigm template combined with a preset large language model, and outputting standardized text that conforms to the Chinese EARS paradigm through phased processing and quality evaluation, is implemented using Python software as follows:

[0369] Python

[0370] class ChineseRequirementsNormalizer:

[0371] def __init__(self):

[0372] self.llm_processor = LLMProcessor()

[0373] self.quality_evaluator = QualityEvaluator()

[0374] self.ears_template = "Under the <preconditions>, the <executing entity> should <perform an action> to achieve the <target effect>."

[0375] def normalize_requirements(self, input_requirements):

[0376] # Step 1: First Stage Processing

[0377] preprocessed = self.llm_processor.process_stage1(input_requirements)

[0378] # Step 2: Second Stage Processing

[0379] normalized = self.llm_processor.process_stage2(preprocessed)

[0380] # Step 3: Quality Assessment

[0381] quality_scores = self.quality_evaluator.evaluate_quality(normalized)

[0382] # Step 4: Output Results

[0383] return {

[0384] "original": input_requirements,

[0385] "preprocessed": preprocessed,

[0386] "normalized": normalized,

[0387] "quality_scores": quality_scores

[0388] }

[0389] Specifically, the code is analyzed as follows:

[0390] 1. Class initialization (__init__ method)

[0391] def __init__(self):

[0392] self.llm_processor = LLMProcessor() # Large Language Model Processor

[0393] self.quality_evaluator = QualityEvaluator() # Quality evaluator

[0394] self.ears_template = "Under the <preconditions>, the <executing entity> should <perform an action> to achieve the <target effect>."

[0395] Function Description:

[0396] Component initialization: Create instances of the LLM processor and quality evaluator to implement modular design;

[0397] Template definition: Set the Chinese EARS paradigm standard template as the target format for standardization;

[0398] Architecture design: Employ the composite pattern to decompose complex functions into independent components;

[0399] 2. Core processing method (normalize_requirements):

[0400] Method signature and parameters:

[0401] def normalize_requirements(self, input_requirements):

[0402] # input_requirements: The original Chinese requirement text (string or list)

[0403] # Return value: A dictionary containing the complete processing results

[0404] Detailed explanation of the four-step processing procedure:

[0405] Step 1, First stage preprocessing:

[0406] preprocessed = self.llm_processor.process_stage1(input_requirements)

[0407] Objective: To achieve uniqueness in requirement decomposition and text standardization.

[0408] Processing content:

[0409] Multi-action requirement breakdown: "The system should verify and save the data" → split into two independent requirements.

[0410] Special character handling: Remove parentheses "()", replace " / " with " or "

[0411] Pronoun disambiguation: Replace "the system" and "it" with specific entity names.

[0412] Output: A list of preprocessed requirement texts

[0413] Step 2, Second Stage Standardization:

[0414] normalized = self.llm_processor.process_stage2(preprocessed)

[0415] Objective: EARS paradigm shift and language quality improvement

[0416] Processing content:

[0417] Format conversion: Rewrite the requirements into standard EARS format.

[0418] Voice adjustment: passive voice → active voice

[0419] Refinement process: From vague terms to specific descriptions

[0420] Output: A list of texts conforming to the EARS paradigm and meeting normalization requirements.

[0421] Step 3, Quality Assessment:

[0422] quality_scores = self.quality_evaluator.evaluate_quality(normalized)

[0423] Objective: Multi-dimensional quality inspection

[0424] Evaluation dimensions:

[0425] EARS format compliance: Does it conform to the normalization structure?

[0426] Grammatical correctness: Subject-verb-object completeness check

[0427] Semantic integrity: explicitness of actions and objects

[0428] Testability: Avoid subjective statements

[0429] Output: A dictionary of quality scores for each requirement.

[0430] Step 4: Results Integration

[0431] return {

[0432] "original": input_requirements, # Original input

[0433] "preprocessed": preprocessed, # Preprocessing result

[0434] "normalized": normalized, # Normalized result

[0435] "quality_scores": quality_scores # Quality scores

[0436] }

[0437] 3. Complete code example of extended functionality

[0438] class ChineseRequirementsNormalizer:

[0439] def __init__(self):

[0440] self.llm_processor = LLMProcessor()

[0441] self.quality_evaluator = QualityEvaluator()

[0442] self.ears_template = "Under the <preconditions>, the <executing entity> should <perform an action> to achieve the <target effect>."

[0443] # Extension: Add configuration parameters

[0444] self.min_quality_threshold = 0.8 # Quality threshold

[0445] self.max_retry_attempts = 3 # Maximum number of retries

[0446] def normalize_requirements(self, input_requirements):

[0447] """

[0448] Main process for demand standardization

[0449] Args:

[0450] input_requirements (str|list): Original requirement text

[0451] Returns:

[0452] dict: A dictionary containing the complete processing results

[0453] Example:

[0454] normalizer = ChineseRequirementsNormalizer()

[0455] result = normalizer.normalize_requirements("The system needs to verify the user's password")

[0456] """

[0457] # Input Validation

[0458] if not input_requirements or not input_requirements.strip():

[0459] raise ValueError("The input requirement cannot be empty")

[0460] try:

[0461] # Step 1: First stage processing (preprocessing)

[0462] print("Executing the first stage of processing...")

[0463] preprocessed = self.llm_processor.process_stage1(input_requirements)

[0464] # Step 2: Second-stage processing (standardization)

[0465] print("Executing the second stage of processing...")

[0466] normalized = self.llm_processor.process_stage2(preprocessed)

[0467] # Step 3: Quality Assessment

[0468] print("Performed quality assessment...")

[0469] quality_scores = self.quality_evaluator.evaluate_quality(normalized)

[0470] # Extension: Quality filtering

[0471] filtered_results = self._filter_by_quality(normalized,quality_scores)

[0472] # Step 4: Result output

[0473] return {

[0474] "original": input_requirements,

[0475] "preprocessed": preprocessed,

[0476] "normalized": normalized,

[0477] "filtered_results": filtered_results, # High-quality results

[0478] "quality_scores": quality_scores,

[0479] "processing_summary": self._generate_summary(quality_scores)

[0480] }

[0481] except Exception as e:

[0482] return {

[0483] "error": f"Processing failed: {str(e)}",

[0484] "original": input_requirements

[0485] }

[0486] def _filter_by_quality(self, normalized_list, quality_scores):

[0487] """Filter results based on quality threshold"""

[0488] filtered = [ ]

[0489] for i, req in enumerate(normalized_list):

[0490] scores = quality_scores[f"req_{i}"]

[0491] # Calculate the overall quality score

[0492] total_score = sum(scores.values()) / len(scores)

[0493] if total_score>= self.min_quality_threshold:

[0494] filtered.append({

[0495] "requirement": req,

[0496] "quality_score": total_score,

[0497] "details": scores

[0498] })

[0499] return filtered

[0500] def _generate_summary(self, quality_scores):

[0501] """Generation Processing Summary Statistics"""

[0502] total_reqs = len(quality_scores)

[0503] passed_reqs = sum(1 for scores in quality_scores.values()

[0504] if all(scores.values()))

[0505] return {

[0506] "total_requirements": total_reqs,

[0507] "high_quality_count": passed_reqs,

[0508]

[0509] else "0%",

[0510] "ears_compliance_rate": f"{sum(1 for s in quality_scores.values() if

[0511] "

[0512] }

[0513] # Usage Example

[0514] if __name__ == "__main__":

[0515] # Create a normalizer instance

[0516] normalizer = ChineseRequirementsNormalizer()

[0517] # Test Cases

[0518] test_input = "The system must verify the password entered by the user while ensuring data security."

[0519] # Perform normalization processing

[0520] result = normalizer.normalize_requirements(test_input)

[0521] # Output Results

[0522] print("=== Result of requirement standardization processing===")

[0523] print(f"Original requirement: {result['original']}")

[0524] print(f"Preprocessed result: {result['preprocessed']}")

[0525] print(f"Normalization result: {result['normalized']}")

[0526] print(f"Quality score: {result['quality_scores']}")

[0527] print(f"Processing summary: {result['processing_summary']}")

[0528] The embodiments described above in this application achieve end-to-end processing of the entire process from original requirements to standardized output; ensure output quality through multi-dimensional evaluation, achieving quality assurance; retain the processing results at each stage for easy debugging and optimization, achieving traceability; achieve modular design through clear responsibilities for each component, making it easy to maintain and expand; and achieve error handling through graceful handling of abnormal situations. Through the above design, the automated, standardized, and high-quality processing of Chinese requirements is achieved, significantly improving the efficiency and quality of requirements engineering.

[0529] For example, the Chinese requirement normalization method based on a large language model and EARS paradigm provided in this application is used to normalize Chinese requirements:

[0530] Original requirements: "The system must be able to process user input data, while ensuring data security and having sufficient performance."

[0531] First stage output text:

[0532] 1. "The system must be able to process user-input data."

[0533] 2. "The system must ensure data security."

[0534] 3. "The system must have sufficient performance."

[0535] Second-stage output text:

[0536] 1. "The system should process data in various formats input by the user."

[0537] 2. "The system shall protect data security through encryption and access control mechanisms."

[0538] 3. "The system should respond to user requests within 1 second."

[0539] Quality evaluation results:

[0540] 1. EARS Paradigm - Consistency: 100%;

[0541] 2. Grammatical correctness: 100%;

[0542] 3. Semantic integrity: 100%.

[0543] 4. Testability: 100%

[0544] The embodiments described above employ a Chinese requirement standardization method based on a large language model and the EARS paradigm. Compared to traditional manual requirement standardization methods, this method reduces processing time from an average of 4 hours / 100 requirements to 30 minutes / 100 requirements, improving efficiency by 87.5%. The requirement quality problem detection rate increases from 65% to 85% compared to manual methods, and the requirement change rate in subsequent development stages decreases by 42%. The workload of requirement engineers is reduced by 80%, and the overall project cost is reduced by 15-20%. All output requirements strictly adhere to a unified EARS paradigm, eliminating subjective differences in manual processing. This provides an efficient and accurate automated solution for requirement standardization in software engineering, possessing significant industrial application value and broad prospects for promotion.

[0545] Figure 2 This is a schematic diagram illustrating the structure of a Chinese requirements standardization system based on a large language model and the EARS paradigm, according to an exemplary embodiment.

[0546] Reference Figure 2 As shown in one embodiment of this application, a Chinese requirement standardization system 100 based on a large language model and the EARS paradigm includes: a Chinese EARS paradigm template construction module 110, a first-stage requirement text processing module 120, a second-stage requirement text processing module 130, and a quality evaluation module 140.

[0547] The Chinese EARS paradigm template building module 110 is used to convert the English EARS paradigm pattern into a Chinese EARS paradigm template based on the Chinese grammatical structure.

[0548] The first-stage requirement text processing module 120 is used to input the original requirement text and the preset first-stage prompt words into the preset large language model to determine the first-stage output text. The preset first-stage prompt word template includes task description, processing goal, uniqueness judgment criteria, and text standardization rules.

[0549] The second-stage requirement text processing module 130 is used to input the first-stage output text and the preset second-stage prompt words into the preset large language model, perform structured transformation according to the Chinese EARS paradigm template, and determine the second-stage output text. The preset second-stage prompt word template includes task description, Chinese EARS paradigm template, transformation rules, and vocabulary replacement table.

[0550] The quality evaluation module 140 is used to evaluate the quality of the output text in the second stage according to the preset evaluation indicators, and to determine the standardized text that conforms to the Chinese EARS paradigm.

[0551] The embodiments described above in this application employ a Chinese EARS paradigm template tailored to Chinese requirements, thereby improving the accuracy of processing Chinese requirements. Combined with a pre-set large language model, the powerful semantic understanding capabilities and phased processing strategies of the large language model enable end-to-end automated processing, reducing manual intervention, effectively improving the processing quality and efficiency of Chinese requirements, and saving project costs.

[0552] Regarding the embodiments of the above system, the specific ways in which each module performs operations have been described in detail in the embodiments of the method, and will not be elaborated here.

[0553] Based on the same technical concept, in some specific embodiments of this application, a terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and a method that the processor can use to execute when executing the program.

[0554] Based on the same technical concept, in some specific embodiments of this application, a computer-readable storage medium is provided on which a computer program is stored, which can be used to execute a method when the program is executed by a processor.

[0555] Optionally, the memory is used to store programs; the memory may include volatile memory, such as random-access memory (RAM), such as static random-access memory (SRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.; the memory may also include non-volatile memory, such as flash memory. The memory is used to store computer programs (such as application programs and functional modules that implement the above methods), computer instructions, etc., and the aforementioned computer programs and computer instructions can be partitioned and stored in one or more memories. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by the processor.

[0556] The aforementioned computer programs, computer instructions, etc., can be stored in partitions within one or more memory locations. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by a processor.

[0557] A processor is used to execute a computer program stored in memory to implement the various steps of the methods involved in the above embodiments. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0558] The processor and memory can be separate structures or integrated structures. When the processor and memory are separate structures, they can be coupled together via a bus.

[0559] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0560] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0561] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0562] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0563] The foregoing has described some specific embodiments of this application. It should be understood that this application is not limited to the specific embodiments described above, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the substantive content of this application. The above-described preferred features can be used in any combination without conflict.< / response> < / system>

Claims

1. A method for standardizing Chinese requirements based on a large language model and the EARS paradigm, characterized in that, include: Based on the Chinese grammatical structure, the English EARS paradigm pattern is converted into a Chinese EARS paradigm template; Input the original requirement text and the preset first-stage prompt words into the preset large language model to determine the first-stage output text. The preset first-stage prompt word template includes task description, processing goal, uniqueness judgment criteria, and text standardization rules. The first-stage output text and the preset second-stage prompt words are input into the preset large language model. The structure is transformed according to the Chinese EARS paradigm template to determine the second-stage output text. The preset second-stage prompt word template includes task description, Chinese EARS paradigm template, transformation rules, and vocabulary replacement table. Based on the preset evaluation indicators, the quality of the output text in the second stage is evaluated to determine the standardized text that meets the Chinese EARS paradigm.

2. The Chinese requirement standardization method based on the large language model and EARS paradigm as described in claim 1, characterized in that, The English EARS paradigm includes Ubiquitous, Event-driven, State-driven, Optional, and Complex. The Chinese EARS paradigm template includes: under the condition of <preconditions>, the <executor> should <execute an action> to achieve the <target effect>; the <preconditions> and the <target effect> represent optional elements, while the <executor> and the <execute action> represent required elements.

3. The Chinese requirement standardization method based on the large language model and EARS paradigm as described in claim 1, characterized in that, The method further includes: Based on the first-stage requirement text processing task and the preset first-stage prompt word template, a preset first-stage prompt word is constructed. The preset first-stage prompt word is used to perform action uniqueness decomposition, symbol standardization, and pronoun disambiguation on the original requirement text. Based on the second-stage text processing task and the preset second-stage prompt word template, a preset second-stage prompt word is constructed. The preset second-stage prompt word is used to perform grammatical structure transformation, semantic specification, and terminology standardization on the first-stage output text. A few-shot learning strategy is adopted to embed a preset number of standardized examples into the preset first-stage prompt words and the preset second-stage prompt words, respectively.

4. The Chinese requirement standardization method based on the large language model and EARS paradigm as described in claim 1, characterized in that, The process of inputting the original requirement text and preset first-stage prompt words into a preset large language model to determine the first-stage output text includes: Based on the preset first-stage prompt words, the original requirement text is decomposed into action uniqueness to determine the atomic requirements of a single action; The atomic requirements of the single action are symbolically standardized to determine the symbolically standardized atomic requirements. The atomic requirements that have undergone symbolic standardization are subjected to pronoun disambiguation processing to determine the output text of the first stage.

5. The Chinese requirement standardization method based on the large language model and EARS paradigm as described in claim 4, characterized in that, The step of performing action-uniqueness decomposition on the original requirement text based on the preset first-stage prompt words to determine the atomic requirements of a single action includes: A preset verb recognition algorithm is used to detect action verbs in the original requirement text to determine the action verbs in the original requirement text; Perform parallel logical connector detection on the original requirement text to identify parallel logical connectors in the original requirement text; Based on the action verbs and the parallel logical connectors, the original requirement text is split into action segments to determine the atomic requirements of the single action; The symbolic standardization of the atomic requirements for the single action, and the determination of the symbolically standardized atomic requirements, includes: Remove the parentheses from the atomic requirements of the single action; Replace the symbol " / " in the atomic requirement of the single action with the Chinese expression "or" to determine the atomic requirement after symbol standardization. The step of performing pronoun disambiguation on the symbol-normalized atomic requirements to determine the first-stage output text includes: Replace the pronouns in the atomic requirements that have undergone symbolic normalization with entity names to determine the output text of the first stage.

6. The Chinese requirement standardization method based on the large language model and EARS paradigm as described in claim 1, characterized in that, The step of inputting the first-stage output text and the preset second-stage prompt words into the preset large language model, performing structured transformation according to the Chinese EARS paradigm template, and determining the second-stage output text includes: Convert the output text of the first stage into the text corresponding to the Chinese ERAS paradigm template; Convert the passive voice in the text corresponding to the Chinese ERAS paradigm template into the active voice; Convert the vague expressions in the text corresponding to the Chinese ERAS paradigm template into specific expressions; Convert unverifiable statements in the text corresponding to the Chinese ERAS paradigm template into testable statements; Remove non-essential <target effect> text from the text corresponding to the Chinese ERAS paradigm template to determine the output text for the second stage.

7. The Chinese requirement standardization method based on the large language model and EARS paradigm as described in claim 1, characterized in that, The preset evaluation indicators include EARS paradigm consistency indicator, syntactic correctness indicator, and semantic integrity indicator; The process of evaluating the quality of the output text in the second stage according to preset evaluation indicators, and determining the standardized text that conforms to the Chinese EARS paradigm, includes: The EARS paradigm consistency index is used to perform EARS paradigm consistency detection on the output text of the second stage to determine the required text after EARS paradigm consistency detection. The grammatical correctness index is used to perform grammatical correctness detection on the requirement text that has passed the EARS paradigm consistency test, and the requirement text that has passed the grammatical correctness detection is determined. The semantic integrity index is used to perform semantic integrity detection on the requirement text that has undergone grammatical correctness detection, thereby determining the standardized requirement text that conforms to the Chinese EARS paradigm.

8. A Chinese requirement standardization system based on a large language model and the EARS paradigm, characterized in that, include: The Chinese EARS paradigm template building module is used to convert English EARS paradigm patterns into Chinese EARS paradigm templates based on Chinese grammatical structure. The first-stage requirement text processing module is used to input the original requirement text and the preset first-stage prompt words into the preset large language model to determine the first-stage output text. The preset first-stage prompt word template includes task description, processing goal, uniqueness judgment criteria, and text standardization rules. The second-stage requirement text processing module is used to input the first-stage output text and the preset second-stage prompt words into the preset large language model, perform structured transformation according to the Chinese EARS paradigm template, and determine the second-stage output text. The preset second-stage prompt word template includes task description, Chinese EARS paradigm template, transformation rules, and vocabulary replacement table. The quality evaluation module is used to evaluate the quality of the output text in the second stage according to preset evaluation indicators, and to determine the standardized text that conforms to the Chinese EARS paradigm.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-7.

10. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • An extension method based on semi-structured natural language EARS requirement template

    CN114692588B

  • Process and system for automatic generation of functional architecture documents and software design and analysis specification documents from natural language

    CA3139543A1

  • Extension method based on semi-structured natural language EARS demand template

    CN114692588A