Label information generation method and device, equipment and medium

By simulating an expert discussion group through a cascaded label judgment model, accurate label information is generated, solving the problems of low efficiency and low accuracy of manually preset labels, and realizing the accuracy and reliability of label information generation.

CN121881981APending Publication Date: 2026-04-17BEIJING SIMING QICHUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING SIMING QICHUANG TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, manually pre-setting labels for various types of text is inefficient and inaccurate, making it difficult to efficiently generate accurate label information.

Method used

By acquiring the text to be processed and the set of tags, and inputting them into multiple chained tag judgment models, a large language model is used to simulate a human expert discussion group. Through the role mechanism of proposal, questioning, correction and response, a tag scheme that is both accurate and interpretable is generated.

Benefits of technology

It improves the accuracy of label information generation, ensures the rigor and reliability of label results, and avoids the generation of invalid or inconsistent labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121881981A_ABST
    Figure CN121881981A_ABST
Patent Text Reader

Abstract

The invention discloses a label information generation method and device, equipment and a medium. The method comprises the steps of obtaining a to-be-processed text and a label set; inputting the to-be-processed text and the tag set into a plurality of tag judgment models which are connected in series; processing output results of the to-be-processed text, the tag set and the historically executed tag judgment model through the currently executed tag judgment model to obtain a text analysis result, a tag judgment result and a consensus judgment result; and determining a target label of the to-be-processed text in the label set according to the consensus judgment result and the label judgment result output by each label judgment model. According to the embodiment of the invention, the accuracy of tag information generation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and medium for generating tag information. Background Technology

[0002] With the rapid development of technology, the variety of electronic products is gradually increasing. Electronic products can display various types of text for users to read. These texts can be pre-labeled, allowing users to search for text using these labels, thus improving search efficiency.

[0003] Currently, various texts are pre-labeled by humans.

[0004] However, there are many types and a large quantity of text, and manually setting pre-defined labels for various types of text is inefficient and inaccurate. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and medium for generating label information to improve the accuracy of label information generation.

[0006] In a first aspect, embodiments of the present invention provide a method for generating tag information, the method comprising:

[0007] Get the text to be processed and the tag set;

[0008] The text to be processed and the set of tags are input into multiple tag judgment models in a series;

[0009] The currently executing label judgment model is used to process the text to be processed, the label set, and the output results of the previously executed label judgment models to obtain the text analysis results, label judgment results, and consensus judgment results.

[0010] Based on the consensus judgment results and label judgment results output by each label judgment model, the target label of the text to be processed is determined from the label set.

[0011] Secondly, embodiments of the present invention also provide a tag information generation device, the device comprising:

[0012] The information acquisition module is used to acquire the text to be processed and the set of tags;

[0013] The information input module is used to input the text to be processed and the set of tags into multiple tag judgment models in a series.

[0014] The model recognition module is used to process the text to be processed, the tag set, and the output results of the previously executed tag judgment model based on the currently executed tag judgment model, to obtain the text analysis results, tag judgment results, and consensus judgment results.

[0015] The label determination module is used to determine the target label of the text to be processed from the label set based on the consensus judgment result and label judgment result output by each label judgment model.

[0016] Thirdly, embodiments of the present invention also provide a label information generation device, the label information generation device comprising:

[0017] At least one processor; and

[0018] A memory that is communicatively connected to at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the tag information generation method of any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the tag information generation method of any embodiment of the present invention.

[0021] The technical solution of this invention involves obtaining the text to be processed and a set of tags; inputting the text to be processed and the set of tags into multiple chained tag judgment models; processing the text to be processed, the set of tags, and the output results of previously executed tag judgment models through the currently executed tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results; and determining the target tag of the text to be processed in the tag set based on the consensus judgment results and tag judgment results output by each tag judgment model. This method can determine the tag corresponding to the text to be processed through multi-dimensional data, thereby improving the accuracy of tag information generation.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0024] Figure 1 This is a flowchart of a tag information generation method provided in Embodiment 1 of the present invention;

[0025] Figure 2This is a flowchart of a tag information generation method provided in Embodiment 1 of the present invention;

[0026] Figure 3 This is a flowchart of a tag information generation method provided in Embodiment 2 of the present invention;

[0027] Figure 4 This is a schematic diagram of a programming problem-solving system provided according to Embodiment 2 of the present invention;

[0028] Figure 5 This is a structural diagram of a tag information generation device according to an embodiment of the present invention;

[0029] Figure 6 This is a schematic diagram of the structure of a tag information generation device provided in an embodiment of the present invention. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] In the technical solutions of the embodiments of the present invention, the acquisition, storage and application of the text to be processed, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0033] Example 1

[0034] Figure 1This is a flowchart illustrating a label information generation method according to Embodiment 1 of the present invention. This embodiment of the invention is applicable to label information generation, and the method can be executed by a label information generation device, which can be implemented in hardware and / or software.

[0035] See Figure 1 The label information generation method shown includes:

[0036] S101. Obtain the text to be processed and the set of tags.

[0037] Here, tags can be category identifiers set for the text to be processed, and the text to be processed can be the original content that needs to be matched with tags. The tag set can be a pre-defined list of tags. The text to be processed can be push notifications, news, programming system questions, hotel information, or essay information, etc.

[0038] Specifically, the storage locations of the text to be processed and the tag set can be determined, ensuring read permissions are available. Key fields of the text to be processed are extracted from the data source and concatenated into a complete text containing all necessary information. The system loads a predefined, complete tag set. This tag set serves as a constraint for the model, ensuring that all model-generated tags fall within this allowed range, preventing the model from generating invalid or inconsistent tags. For example, key fields may include the question stem, input data format description, output requirement description, constraints (time / space complexity or data range, etc.), and descriptive information to aid understanding of the question using example inputs and outputs. The complete tag set is extracted from the tag library. Information preprocessing is performed on the text to be processed and the tag set, for example, removing duplicate descriptions, adding missing words, or removing irrelevant characters. The tag set is a predefined list of tags and represents the only selectable range for tag selection; the tags corresponding to the text to be processed can only be obtained from this tag set. The text to be processed can be: Problem ID: 1001 - Problem content: "Input two integers A and B, calculate and output the sum of A+B. The tag set can be syntax, sequential structure, basic input / output, selection structure, loop structure, algorithm, basic algorithm, simulation, enumeration, mathematics, elementary number theory and high-precision arithmetic, etc."

[0039] S102. Input the text to be processed and the set of tags into multiple tag judgment models in series.

[0040] Among them, the label judgment model can be a large language model that filters the labels corresponding to the text to be processed from the label set.

[0041] Specifically, a preset number of label judgment models are acquired, which can be up to four. These models are arranged and executed in a preset order. Subsequent models receive output data from preceding models. Different large language models can correspond to different types of large language models. Different models correspond to different input templates (instruction templates), which constrain the models to output data according to preset tasks and standards. Input templates can include at least one attribute and its corresponding value. For example, input templates may include role identifiers, task descriptions, and historical discussion content. These templates can be in JSON format to ensure structured interaction between models, improving accuracy and efficiency. Each model can have a specific role (e.g., proposer, questioner, corrector, or responder). An "expert discussion group" mechanism, with multiple large language models playing different roles, simulates the process of human experts conducting in-depth analysis and argumentation of a topic, ultimately generating a labeling scheme that is both accurate and interpretable based on consensus. For example: Proposer: Assigned to the DeepSeek model, responsible for the first round of analysis and proposing a labeling scheme. Critic: Assigned to the GPT-4 model, responsible for reviewing proposals from a negative perspective, identifying potential errors and omissions. Corrector: Assigned to the Claude model, responsible for synthesizing various viewpoints and proposing more comprehensive amendments. Responder: Also handled by the DeepSeek model, responsible for responding to criticisms and corrections, and providing the final conclusion for the current round. Model 1 (Proposal) → Model 2 (Criticism) → Model 3 (Correction) → Model 4 (Responder), executed sequentially. The types of large language models corresponding to each label judgment model can be the same or different. Prompt Engineering can meticulously design exclusive instruction templates for each role. These templates clearly define the role's positioning, task description, required historical discussion content, and the strict JSON format that the output results must adhere to. For example, json{"labels": { "syntax": { "sequential structure": ["basic input and output"]}}, "promblem_steps": ["1. Read two integers A and B", "2. Calculate the sum of A and B", "3. Output the result"],"reason": "The problem only involves the basic sequential execution flow, that is, input, processing, and output, so it corresponds to the 'basic input and output' label."The `confidence` parameter (0.95) ensures that communication between models is structured and efficient. This JSON object can be recorded in the history and used as input for subsequent models. Furthermore, the model can calculate the confidence score for each label in the label set, determine the confidence value for each label, obtain the confidence threshold, and identify at least one label with a confidence score greater than the threshold as the target label, which is then populated into the output template. The text to be processed and the label set are encapsulated together in the instruction template prepared for Model 1, forming a complete request (Prompt), which is sent to Model 1 to obtain its output. Model 1 can then... The output results, the text to be processed, and the tag set are input into Model 2, which is connected in series with Model 1, to obtain the output result of Model 2. The output results, the text to be processed, and the tag set of each model executed before Model 2 are also input into Model 2 to obtain its output result. The output results of Model 1 and Model 2, the text to be processed, and the tag set are input into Model 3 to obtain its output result. The output results of Model 1, Model 2, and Model 3, the text to be processed, and the tag set are input into Model 4 to obtain its output result. This process is repeated sequentially until all connected models have been executed.

[0042] S103. Using the currently executing label judgment model, process the text to be processed, the label set, and the output results of the previously executed label judgment models to obtain the text analysis results, label judgment results, and consensus judgment results.

[0043] The text analysis results can be the parsing results of the core content of the text to be processed, such as the syntax, semantics, theme, or core needs of the text. The label judgment results can be the labels that the currently executing label judgment model selects from the label set and match the text to be processed. The consensus judgment results can be the acceptance status of the label judgment results of the preceding label judgment models by non-first models, and the consensus judgment results can be divided into reaching a consensus or not reaching a consensus.

[0044] Specifically, the process encapsulates the text to be processed, the tag set, and the historical output of previous tag judgment models into a structured input that the current tag judgment model can parse. Based on the role of the currently executing tag judgment model (e.g., proposal, challenge, correction, or response), a corresponding dedicated instruction template is loaded. This instruction template is then fused with the structured input and input into the currently executing tag judgment model to obtain the text analysis result, tag judgment result, and consensus judgment result. For example, if the tag judgment result output by the currently executing tag judgment model matches the tag judgment result output by its predecessor, the consensus judgment result of the currently executing tag judgment model is "consensus reached." If the tag judgment result output by the currently executing tag judgment model does not match the tag judgment result output by its predecessor, the consensus judgment result of the currently executing tag judgment model is "no consensus reached." The obtained text analysis result, tag judgment result, and consensus judgment result can be verified to ensure they conform to preset format specifications, avoiding the generation of invalid information.

[0045] S104. Based on the consensus judgment results and label judgment results output by each label judgment model, determine the target label of the text to be processed in the label set.

[0046] The target label can be a finalized label that precisely matches the text to be processed.

[0047] Specifically, the outputs of all label judgment models are organized into structured data, and key fields are extracted, such as consensus judgment results and label judgment results from the output of each model. The consensus judgment results and label judgment results of all label judgment models are then summarized; it is determined whether there is full consensus, partial consensus, or no consensus. Valid consensus result filtering can exclude the first model and only count the consensus judgment result fields of non-first models; a full consensus scenario is defined as the proportion of consensus judgment results in each label judgment model reaching a consensus ≥ a preset threshold (e.g., 80%), and the label judgment results of all models reaching a consensus are completely consistent. A partial consensus scenario is defined as the proportion of consensus judgment results in each label judgment model reaching a consensus < a threshold, but there is overlap in the label judgment results of multiple models; a no-consensus scenario is defined as all non-first models failing to reach a consensus, and the label judgment results of multiple models having no overlap. Based on the consensus status, target labels are filtered according to preset rules to ensure that all target labels come from a preset label set. For example, ... Figure 2As shown, the example problem is: A+BProblem, Problem ID: 1001, Problem content: "Input two integers A and B, calculate and output the sum of A+B." The preset tagging system includes: syntax, sequential structure, basic input / output, selection structure, loop structure, algorithm, basic algorithm, simulation, enumeration, mathematics, elementary number theory, and high-precision arithmetic. Before the target tag generation process officially begins, two preparatory tasks are required: 1. Pre-processing of the "model": Treat the model as an "expert brain" with general knowledge. Assign roles, tasks, and communication rules to these "experts." Specifically, this includes: Role setting and model allocation: Assign different roles to different tag judgment models (the tag judgment model can be a large language model, such as DeepSeek, GPT-4, and Claude). For example: Proposer: Assigned to the DeepSeek model, responsible for the first round of analysis and proposing tag solutions. Critic: Assigned to the GPT-4 model, responsible for reviewing proposals from a negative perspective and identifying potential errors and omissions. Corrector: Assigned to the Claude model, responsible for synthesizing various viewpoints and proposing more comprehensive amendments. Responder: Also handled by the DeepSeek model, responsible for responding to questions and corrections, and providing the final conclusion for the current round. PromptEngineering: A dedicated instruction template is meticulously designed for each role. This template clearly defines its role, task description, required historical discussion content, and most importantly—the strict JSON format that the output must adhere to. This ensures structured and efficient communication between models. For labeled "A+BPoblem" problems, data loading is performed first: the core information of the problem is read from a problem database (such as a CSV file), most importantly `problem_content` (the original problem description). Label constraints: The system loads a predefined, complete list of "label hierarchy structures." This list serves as a constraint for the model, ensuring that all model-generated labels are within this allowed range, preventing models from "freely creating" invalid or inconsistent labels. Information Encapsulation: The original question text and the list of tag constraints are encapsulated together in an instruction template prepared for the "Proposer," forming a complete request (Prompt) ready to be sent to the "Proposer" model. The flow of question data within the "Expert Discussion Group" is in the form of structured text (mainly JSON-formatted strings) passed and evolved through instruction templates from different roles. 1. Proposal Stage (Proposer): Input Format: The information received by the "Proposer" model is a text instruction containing the original question text and a list of optional tags. Processing: The model analyzes the question "Input two integers A and B, calculate and output the sum of A+B," identifying its core operations as reading, calculating, and printing.Output Format: It generates a JSON object as the starting point for the discussion. `json{"labels":{"syntax":{"sequential structure":[basic input / output,"promblem_steps":["1. Read two integers A and B","2. Calculate the sum of A and B","3. Output the result"],"reason":"The question only involves a basic sequential execution flow, i.e., input, processing, output, therefore corresponding to the 'basic input / output' label.","confidence":0.95}` This JSON object is recorded in the "discussion history". 2. Critic Stage Input Format: The instructions received by the "Critic" model include not only the original question and label list, but also the JSON just generated by the "Proposer" as the "discussion history". Processing: It evaluates the "Proposer's" conclusion. For the simple question "A+BProblem", it will likely consider the proposal accurate and sufficient. Output Format: It generates a new JSON object expressing its position. The `json{"position":"agree","main_reason":"The labels provided by the proposer accurately summarize the core requirements of the problem, without involving selection, loops, or other complex algorithms. The solution steps are clear and the reasons are sufficient.","labels":{ / / Because of agreement, the labels here are consistent with the proposer's, "syntax":{"sequential structure":["basic input and output"]}},"confidence":0.98}` comment is also added to the "Discussion History". 3. Correction Phase (Corrector): Input Format: The "Corrector" receives the complete "Discussion History" containing the original problem text, the label list, and the opinions of both the "Proposer" and the "Dissenter". Processing: It reviews the problem from another perspective. Similarly, for this problem, it is likely to agree with the existing conclusions. Output format: json{"position":"agree","main_reason":"From the perspective of teaching and the value of the question, the purpose of this question is to test the most basic programming input and output ability. The 'basic input and output' label under 'sequential structure' is accurately positioned.","labels":{ / / Agree again "syntax":{"sequential structure":["basic input and output"]}},"confidence":0.97} This JSON object is also added to the "discussion history". 4. Response phase (Responder), Input format: The "Responder" receives all the discussion history for this round. Processing: It examines the positions that both the "Dissenters" and "Modifiers" agree on. Output format: It generates the final ruling JSON.The third step is to derive the final label scheme. After each round of discussion, the system performs a "consensus check". The system checks whether the "position" field of both the "questioner" and the "corrector" is "agree", and whether their confidence is higher than a preset threshold (e.g., 0.8). The conclusion is that in the example of "A+BProblem", since all parameters... All parties quickly reached a consensus with high confidence, achieving agreement in the first round. Final solution: The system uses the `labels` field output by the "respondent" as the final labeling scheme for the topic and marks the entire process as "automatic labeling successful." If more complex topics are encountered (e.g., a problem might involve both "dynamic programming" and "binary search"), the "dissenters" and "correctors" might raise disagreements and offer different labeling schemes. In this case, the process enters a second and third round of discussion. During the second or third round and subsequent rounds, only the historical records of previous rounds are sent to the model corresponding to the dissenter, not to the model corresponding to the proposer, until the "respondent's" scheme achieves consensus or the maximum number of discussion rounds is reached. If consensus is not reached after the maximum number of rounds, the topic will be marked as "requiring manual review," and a complete discussion history will be attached for human experts to decide. As can be seen from the above embodiments, this invention ensures the rigor and reliability of the labeling results through a procedural, multi-perspective argumentation process.

[0048] The technical solution of this invention involves obtaining the text to be processed and a set of tags; inputting the text to be processed and the set of tags into multiple chained tag judgment models; processing the text to be processed, the set of tags, and the output results of previously executed tag judgment models through the currently executed tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results; and determining the target tag of the text to be processed in the tag set based on the consensus judgment results and tag judgment results output by each tag judgment model. This method can determine the tag corresponding to the text to be processed through multi-dimensional data, thereby improving the accuracy of tag information generation.

[0049] Example 2

[0050] Figure 3 This is a flowchart illustrating a label information generation method according to Embodiment 2 of the present invention. Based on the above embodiments, this embodiment optimizes and improves the label information generation operation.

[0051] Furthermore, the process of "processing the text to be processed, the tag set, and the output of the previously executed tag judgment models through the currently executed tag judgment model to obtain the text analysis result, tag judgment result, and consensus judgment result" is refined to "processing the text to be processed and the tag set through the first executed tag judgment model to obtain the text analysis result and tag judgment result; the output of the previously executed tag judgment models of the first executed tag judgment model is empty, and the consensus judgment result of the first executed tag judgment model is empty; processing the text to be processed, the tag set, and the output of the previously executed tag judgment models through non-first executed tag judgment models to obtain the text analysis result, tag judgment result, and consensus judgment result," in order to improve the operation of tag information generation.

[0052] It should be noted that for parts not described in detail in the embodiments of the present invention, please refer to the descriptions in other embodiments.

[0053] See Figure 3 The label information generation method shown includes:

[0054] S301. Obtain the text to be processed and the set of tags.

[0055] S302. Input the text to be processed and the set of tags into multiple tag judgment models in series.

[0056] S303. The first executed tag judgment model processes the text to be processed and the tag set to obtain the text analysis result and the tag judgment result; the output result of the historically executed tag judgment models of the first executed tag judgment model is empty, and the consensus judgment result of the first executed tag judgment model is empty.

[0057] Specifically, the first tag judgment model executed does not need to refer to any historical discussion information because there is no previous model for this tag judgment model, indicating that there is no historical output data and no need to judge consensus. Therefore, a role can be assigned to the first tag judgment model, for example, the role could be a proposer, with the explicit task of analyzing the topic and matching tags; only the cleaned text to be processed and the tag set should be passed in, without adding any other interfering information, and the output format should be constrained. The output format can be defined as a preset JSON structure to prevent the model from acting arbitrarily; the tag judgment model should output the text analysis results and tag judgment results in a fixed format, and the consensus judgment result should be fixed as an empty string; the tag judgment results can be validated to ensure that the output tags come from the preset tag set, and if the validation fails, it should be retried.

[0058] S304. Using the label judgment model that is not the first one executed, process the text to be processed, the label set, and the output results of the previously executed label judgment models to obtain the text analysis results, label judgment results, and consensus judgment results.

[0059] Specifically, for label judgment models that are not executed for the first time, the text to be processed, the label set, and the output of all preceding models are integrated; specific tasks are assigned according to the model role (questioning, correcting, or responding) (e.g., questioners find label problems, correctors propose optimization solutions, etc.); the question is re-analyzed (to verify the rationality of historical analysis) → preceding labels are checked (to find errors, omissions, or redundancies), and it is determined whether to accept the final preceding labels to obtain a consensus judgment result; the text analysis results, label judgment results, and consensus judgment results are output in a fixed format.

[0060] S305. Based on the consensus judgment results and label judgment results output by each label judgment model, determine the target label of the text to be processed in the label set.

[0061] In this embodiment of the invention, the first executed tag judgment model processes the text to be processed and the tag set to obtain text analysis results and tag judgment results. The output results of the previously executed tag judgment models are empty, as is the consensus judgment result of the first executed tag judgment model. The non-first executed tag judgment models process the text to be processed, the tag set, and the output results of the previously executed tag judgment models to obtain text analysis results, tag judgment results, and consensus judgment results. The tag judgment results can be optimized based on historical iteration information to improve the accuracy of tag determination.

[0062] Optionally, when there are consensus judgment results that have not reached a consensus among the outputs of each label judgment model, the text to be processed and the label set are input into at least one label judgment model other than the first executed label judgment model; the output results of the text to be processed, the label set, and the previously executed label judgment models are processed by the currently executed label judgment model to obtain the text analysis result, the label judgment result, and the consensus judgment result; based on the consensus judgment result and the label judgment result output by each label judgment model, the target label of the text to be processed is determined in the label set.

[0063] Specifically, the consensus judgment results of all models are checked. If at least one consensus judgment result indicates a lack of consensus, a multi-round mechanism is initiated. At least one label judgment model other than the first executed label judgment model is obtained. For each label judgment model, the text to be processed, the label set, and the output results of previously executed label judgment models are input into that model to obtain the text analysis result, label judgment result, and consensus judgment result. Based on the consensus judgment result and label judgment result output by each label judgment model in this round, the target label for the text to be processed is determined from the label set.

[0064] When there are consensus judgment results that do not reach a consensus among the outputs of various label judgment models, the text to be processed and the label set are input into at least one label judgment model other than the first executed label judgment model. The currently executed label judgment model processes the output results of the text to be processed, the label set, and the previously executed label judgment models to obtain the text analysis result, the label judgment result, and the consensus judgment result. Based on the consensus judgment result and the label judgment result output by each label judgment model, the target label of the text to be processed is determined in the label set. The label inventory result is optimized by multiple non-first label judgment models to improve the accuracy of the target label determination.

[0065] Optionally, when there are consensus judgment results that do not reach a consensus among the outputs of each label judgment model, the text to be processed and the label set are input into at least one label judgment model other than the first executed label judgment model. This includes: when there are consensus judgment results that do not reach a consensus among the outputs of each label judgment model, obtaining the judgment round; when the judgment round is less than a preset number of times threshold, accumulating the judgment round, and inputting the text to be processed and the label set into at least one label judgment model other than the first executed label judgment model; when the judgment round is greater than or equal to the preset number of times threshold, stopping the label judgment process and prompting the user for review.

[0066] The judgment round can be the number of label judgments completed so far, and each round must include at least one execution of a model other than the first one. The preset number of judgment rounds can be a pre-set maximum allowed number of judgment rounds, used to control the termination of the process and avoid infinite loops.

[0067] Specifically, first check the consensus judgment results of all executed models to confirm whether any consensus has not been reached. This is a prerequisite for initiating round control. Extract the consensus judgment results of all models: From the full model output list, extract the consensus judgment result field of each model, retaining only the consensus results of models other than the first one. Determine if any consensus has not been reached: If any consensus has not been reached, proceed to the round verification stage; if all valid consensuses are not reached, directly determine the target label based on the label judgment result of the last executed label judgment model in this round, without proceeding to the subsequent process. If any consensus has not been reached, proceed to the round verification stage. Obtain the current judgment round: Compare the round with the threshold: Case 1: Current judgment round < preset threshold (e.g., 1 < 3): Meets the conditions for continuing judgment, execute the cumulative round and obtain the starting label judgment model for the new round. Current judgment round ≥ preset threshold: Does not meet the conditions for continuing judgment, execute the stop process and prompt for manual review. It should be noted that after accumulating rounds, add non-first models for execution, and the new model needs to refer to the full historical results to promote consensus formation. The operation steps are as follows: Accumulate the judgment rounds: Current judgment round += 1 (e.g., 1→2, 2→3). Select the model to add: From the list of non-first models (["critic", "corrector", "responder"]), select at least one model (usually in the order of "critic → corrector → responder" to avoid repetition). Substitute the text to be processed, the tag set, and the full historical output into the selected model until all non-first models in the current round have been executed, completing the current round. If the automatic judgment reaches the maximum number of rounds without reaching a consensus, terminate the automatic process and hand over the judgment power to the user to avoid generating incorrect tags.

[0068] When there are consensus judgment results that have not reached a consensus among the outputs of each label judgment model, the text to be processed and the set of labels are input into at least one label judgment model other than the first executed label judgment model. This includes: when there are consensus judgment results that have not reached a consensus among the outputs of each label judgment model, obtaining the judgment round; when the number of judgment rounds is less than a preset number threshold, accumulating the number of judgment rounds, and inputting the text to be processed and the set of labels into at least one label judgment model other than the first executed label judgment model; when the number of judgment rounds is greater than or equal to the preset number threshold, stopping the label judgment process and prompting the user for review. This can control the number of training rounds and avoid infinite loops.

[0069] Optionally, based on the consensus judgment results and label judgment results output by each label judgment model, the target label of the text to be processed is determined in the label set, including: when the consensus judgment results output by each label model are all consensus results, the label judgment result of the last executed label judgment model is determined as the target label of the text to be processed.

[0070] Specifically, we first exclude meaningless empty consensus results from the first model, and only verify the consensus results of models other than the first to confirm whether all have reached a consensus. This is a prerequisite for decision-making. From the list of outputs from all models, we extract the consensus judgment result field of each model and verify consistency: we check whether the consensus judgment results of all models have reached a consensus. Following the model execution order, we find the last model, whose output is the final conclusion after integrating all historical discussions, and has the highest reference value. Models are executed in a preset order, which is fixed and traceable (e.g., "Proposer → Questioner → Modifier → Response Provider"). We locate the last model: using the label judgment result of the last model as the target label.

[0071] When all the consensus judgment results output by each label model are the same, the label judgment result of the last executed label judgment model is determined as the target label of the text to be processed. The final label optimized by each model is determined as the target label, thus improving the accuracy of the target label.

[0072] Optionally, the text to be processed, the tag set, and the output results of previously executed tag judgment models are processed through the currently executed tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results. This includes: adding the text to be processed, the tag set, and the output results of previously executed tag judgment models to the role prompt template corresponding to the currently executed tag judgment model to obtain the current input data of the currently executed tag judgment model; the role prompt templates of multiple tag judgment models in series include: the first role template for the first tag judgment, the second role template for questioning the tag judgment result, the third role template for correcting the tag judgment result, and the fourth role template for responding to the historical tag judgment result; and processing the current input data through the currently executed tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results.

[0073] The role-based prompt templates can be customized prompt templates for each role, including role positioning, task instructions, and output format constraints, ensuring that the model recognizes the text to be processed according to the preset role. The first role template can be a prompt template for a model that independently analyzes the text to be processed and matches it with tags. The second role template can be a template that identifies errors, omissions, or redundancies in previous tags based on historical results and outputs the basis for questioning. The third role template can be a template that integrates historical records, proposes an optimized tagging scheme, and explains the correction logic. The fourth role template can be a template that synthesizes all historical viewpoints, responds to questions and corrections, and provides the final tag judgment. The current input data can be the complete input content generated after filling the text to be processed, the tag set, and historical output results into the current model role template.

[0074] Specifically, based on the current model's position in the process (first / not first) and task (proposal / question / correction / response), a preset role prompt template is matched to ensure the model clearly defines its own role. The current role is obtained from the process control parameters. A specific prompt template for that role is retrieved from the template library (the template includes role positioning, task steps, and output format). The text to be processed, the tag set, and the output results of previously executed tag judgment models are added to the role prompt template corresponding to the currently executing tag judgment model to obtain the current input data for the currently executing tag judgment model. The currently executing tag judgment model processes the current input data to obtain text analysis results, tag judgment results, and consensus judgment results.

[0075] By adding the text to be processed, the tag set, and the output of historically executed tag judgment models to the role prompt template corresponding to the currently executed tag judgment model, the current input data of the currently executed tag judgment model is obtained. The role prompt templates of multiple tag judgment models in series include: the first role template for the first tag judgment, the second role template for questioning the tag judgment result, the third role template for correcting the tag judgment result, and the fourth role template for responding to historical tag judgment results. The currently executed tag judgment model processes the current input data to obtain text analysis results, tag judgment results, and consensus judgment results. Based on the role templates, the large model's optimized tag task is limited, the tag judgment results are optimized, and the accuracy of target tag determination is improved.

[0076] Optionally, the text to be processed includes programming problems in a programming problem-solving system, and the text analysis results include: syntax and semantics; the target labels include the knowledge points and code style of the text to be processed.

[0077] Specifically, a programming problem-solving system can be an online judge (OJ), such as... Figure 4As shown. The system allows users to solve algorithmic problems by writing code, and then complete the problem by submitting code online and testing sample code. Each problem has corresponding knowledge point tags, facilitating user querying and filtering. The system retrieves programming problems and tag sets from the programming problem-solving system; inputs these sets into multiple concatenated tag judgment models; and processes the outputs of the programming problems, tag sets, and previously executed tag judgment models using the currently executing tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results. Programming problems in the system can include task descriptions, input / output formats, constraints, and examples (input + output). Syntax analysis results can describe the basic programming operations, syntax features, and data structure usage required to fulfill the problem requirements. Examples include data structure operations such as array traversal, element insertion, deletion, retrieval, and sorting; control flow such as loops (for / while), conditional judgments (if / else), and nested logic; and variables and operations such as numerical calculations, indexing operations, and deduplication. Semantic analysis can describe the core task, implicit constraints, and solution approach of the problem. For example, the legality of the nested parentheses order, the elimination of inefficient algorithms, and the underlying logic for solving the problem (such as using the last-in-first-out property of a stack to match parentheses and using a hash table to implement O(1) lookup, etc.). The final target label covers both what technologies (knowledge points) are being examined and what should be paid attention to in coding (code style), realizing a structured and precise description of programming problems.

[0078] The text to be processed includes programming questions from a programming problem-solving system. The text analysis results include: syntax and semantics; the target labels include the knowledge points and code style of the text to be processed. By using multi-dimensional data, the target labels of the text to be processed are determined, which improves the accuracy of target label determination.

[0079] Example 3

[0080] Figure 5 This is a schematic diagram of a label information generation device according to Embodiment 3 of the present invention. This embodiment of the present invention is applicable to label information generation; the device can execute a label information generation method and can be implemented in hardware and / or software.

[0081] See Figure 5 The label information generation device shown includes: an information acquisition module 501, an information input module 502, a model recognition module 503, and a label determination module 504, wherein...

[0082] Information acquisition module 501 is used to acquire the text to be processed and a set of tags;

[0083] The information input module 502 is used to input the text to be processed and the set of tags into multiple tag judgment models in a series.

[0084] The model recognition module 503 is used to process the text to be processed, the tag set, and the output results of the previously executed tag judgment model through the currently executed tag judgment model, to obtain the text analysis result, the tag judgment result, and the consensus judgment result.

[0085] The label determination module 504 is used to determine the target label of the text to be processed from the label set based on the consensus judgment result and label judgment result output by each label judgment model.

[0086] The technical solution of this invention involves obtaining the text to be processed and a set of tags; inputting the text to be processed and the set of tags into multiple chained tag judgment models; processing the text to be processed, the set of tags, and the output results of previously executed tag judgment models through the currently executed tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results; and determining the target tag of the text to be processed in the tag set based on the consensus judgment results and tag judgment results output by each tag judgment model. This method can determine the tag corresponding to the text to be processed through multi-dimensional data, thereby improving the accuracy of tag information generation.

[0087] Optionally, the model recognition module 503 includes:

[0088] The first model processing unit is used to process the text to be processed and the set of tags through the first executed tag judgment model to obtain the text analysis result and the tag judgment result; the output result of the previously executed tag judgment models of the first executed tag judgment model is empty, and the consensus judgment result of the first executed tag judgment model is empty;

[0089] The second model processing unit is used to process the text to be processed, the tag set, and the output results of the previously executed tag judgment models through the tag judgment model that is not the first one executed, to obtain the text analysis results, tag judgment results, and consensus judgment results.

[0090] Optionally, the label information generation device further includes:

[0091] The information input unit is used to input the text to be processed and the tag set into at least one tag judgment model other than the first tag judgment model executed when there is a consensus judgment result that has not reached a consensus among the consensus judgment results output by each tag judgment model.

[0092] The information processing unit is used to process the text to be processed, the tag set, and the output results of the previously executed tag judgment model through the currently executed tag judgment model, to obtain the text analysis results, tag judgment results, and consensus judgment results;

[0093] The tag filtering unit is used to determine the target tag of the text to be processed from the tag set based on the consensus judgment result and tag judgment result output by each tag judgment model.

[0094] Optional, information input unit, specifically used for:

[0095] When there are consensus judgment results that have not reached a consensus among the outputs of each label judgment model, the judgment round is obtained;

[0096] When the number of judgment rounds is less than the preset threshold, the number of judgment rounds is accumulated, and the text to be processed and the tag set are input into at least one tag judgment model other than the first tag judgment model executed.

[0097] When the number of rounds is greater than or equal to a preset threshold, the tag judgment process is stopped and the user is prompted to review.

[0098] Optional, the label determination module 504 is specifically used for:

[0099] When all the consensus judgment results output by each label model are consensus results, the label judgment result of the last executed label judgment model is determined as the target label of the text to be processed.

[0100] Optional, the model recognition module 503 is specifically used for:

[0101] The text to be processed, the tag set, and the output of the previously executed tag judgment model are added to the role prompt template corresponding to the currently executed tag judgment model to obtain the current input data of the currently executed tag judgment model; the role prompt templates of the multiple tag judgment models in series include: the first role template for the first tag judgment, the second role template for questioning the tag judgment result, the third role template for correcting the tag judgment result, and the fourth role template for responding to the previous tag judgment result;

[0102] The currently executing label judgment model processes the current input data to obtain text analysis results, label judgment results, and consensus judgment results.

[0103] Optionally, the text to be processed includes programming problems in a programming problem-solving system, and the text analysis results include: syntax and semantics; the target labels include the knowledge points and code style of the text to be processed.

[0104] The label information generation device provided in the embodiments of the present invention can execute the label information generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the label information generation method.

[0105] Example 4

[0106] Figure 6 A schematic diagram of the structure of a tag information generation device 600 that can be used to implement embodiments of the present invention is shown.

[0107] like Figure 6 As shown, the tag information generation device 600 includes at least one processor 601 and a memory, such as a read-only memory (ROM) 602 or a random access memory (RAM) 603, communicatively connected to the at least one processor 601. The memory stores computer programs executable by the at least one processor. The processor 601 can perform various appropriate actions and processes based on the computer program stored in the ROM 602 or loaded into the RAM 603 from the storage unit 608. The RAM 603 can also store various programs and data required for the operation of the tag information generation device 600. The processor 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0108] Multiple components in the tag information generation device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless transceiver, etc. The communication unit 609 allows the tag information generation device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0109] Processor 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 601 performs the various methods and processes described above, such as the tag information generation method.

[0110] In some embodiments, the label information generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the label information generation device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by processor 601, one or more steps of the label information generation method described above may be performed. Alternatively, in other embodiments, processor 601 may be configured to perform the label information generation method by any other suitable means (e.g., by means of firmware).

[0111] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0113] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0114] To provide user interaction, the systems and techniques described herein can be implemented on a label information generation device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the label information generation device. Other types of devices can also be used to provide user interaction; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0115] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0116] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability.

[0117] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0118] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for generating tag information, characterized in that, The method includes: Get the text to be processed and the tag set; The text to be processed and the tag set are input into multiple tag judgment models in a series; The text to be processed, the tag set, and the output results of the previously executed tag judgment models are processed using the currently executed tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results. Based on the consensus judgment results and label judgment results output by each of the label judgment models, the target label of the text to be processed is determined in the label set.

2. The method according to claim 1, characterized in that, The process involves using the currently executing tag judgment model to process the text to be processed, the tag set, and the output results of previously executed tag judgment models to obtain text analysis results, tag judgment results, and consensus judgment results, including: The first executed tag judgment model processes the text to be processed and the tag set to obtain text analysis results and tag judgment results; the output results of the previously executed tag judgment models of the first executed tag judgment model are empty, and the consensus judgment result of the first executed tag judgment model is empty; By using a tag judgment model that is not the first one executed, the text to be processed, the tag set, and the output results of the previously executed tag judgment models are processed to obtain text analysis results, tag judgment results, and consensus judgment results.

3. The method according to claim 1, characterized in that, Also includes: When there is a consensus judgment result that has not reached a consensus among the outputs of each of the label judgment models, the text to be processed and the label set are input into at least one label judgment model other than the first executed label judgment model; The text to be processed, the tag set, and the output results of the previously executed tag judgment models are processed using the currently executed tag judgment model to obtain text analysis results, tag judgment results, and consensus judgment results. Based on the consensus judgment results and label judgment results output by each of the label judgment models, the target label of the text to be processed is determined in the label set.

4. The method according to claim 3, characterized in that, When the consensus judgment results output by each of the label judgment models contain results that do not reach a consensus, the text to be processed and the label set are input into at least one label judgment model other than the first executed label judgment model, including: When the consensus judgment results output by each of the label judgment models contain results that do not reach a consensus, the judgment round is obtained; When the number of judgment rounds is less than a preset threshold, the number of judgment rounds is accumulated, and the text to be processed and the tag set are input into at least one tag judgment model other than the first tag judgment model executed. When the number of judgment rounds is greater than or equal to a preset threshold, the label judgment process is stopped and the user is prompted to review.

5. The method according to claim 1, characterized in that, The step of determining the target tag of the text to be processed in the tag set based on the consensus judgment result and tag judgment result output by each of the tag judgment models includes: When all the consensus judgment results output by the label models are consensus results, the label judgment result of the last executed label judgment model is determined as the target label of the text to be processed.

6. The method according to claim 1, characterized in that, The process involves using the currently executing tag judgment model to process the text to be processed, the tag set, and the output results of previously executed tag judgment models to obtain text analysis results, tag judgment results, and consensus judgment results, including: The text to be processed, the tag set, and the output results of the previously executed tag judgment models are added to the role prompt template corresponding to the currently executed tag judgment model to obtain the current input data of the currently executed tag judgment model; the role prompt templates of the multiple tag judgment models in series include: the first role template for the first tag judgment, the second role template for questioning the tag judgment result, the third role template for correcting the tag judgment result, and the fourth role template for responding to the historical tag judgment result; The currently executed tag judgment model processes the current input data to obtain text analysis results, tag judgment results, and consensus judgment results.

7. The method according to claim 1, characterized in that, The text to be processed includes programming problems in a programming problem-solving system. The text analysis results include: syntax and semantics; the target tags include the knowledge points and code specifications of the text to be processed.

8. A label information generation device, characterized in that, The device includes: The information acquisition module is used to acquire the text to be processed and the set of tags; An information input module is used to input the text to be processed and the tag set into multiple tag judgment models connected in series; The model recognition module is used to process the text to be processed, the tag set, and the output results of the previously executed tag judgment models using the currently executed tag judgment model, so as to obtain text analysis results, tag judgment results, and consensus judgment results. The tag determination module is used to determine the target tag of the text to be processed in the tag set based on the consensus judgment result and tag judgment result output by each of the tag judgment models.

9. A label information generation device, characterized in that, The label information generation device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the tag information generation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the tag information generation method according to any one of claims 1-7.