Question and answer method, device and equipment for multi-agent comparison problem
By decomposing the multi-agent comparison problem into sub-problems and generating comparison constraint rules, and calling a search engine to obtain and verify the results, the inaccuracy and inefficiency of multi-agent comparison question answering in existing technologies are solved, and efficient and accurate multi-agent comparison question answering is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE JIUTIAN ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-09
AI Technical Summary
Existing multi-subject comparison question-answering systems cannot effectively decompose subjects, dimensions, and time, resulting in inaccurate results and low efficiency, failing to meet practical application needs.
The multi-subject comparison problem is broken down into sub-problems that include a single subject, a single dimension, and a comparison time. By generating comparison constraint rules and retrieval instructions, the search engine is invoked to obtain retrieval results, which are then filtered and verified to generate structured question-and-answer results.
It significantly improves the accuracy and processing efficiency of multi-subject comparison problems, ensuring that all subjects are identified, dimensions are broken down in detail, and time is consistent, avoiding problems such as omission of subjects, confusion of dimensions, and inconsistency of time, and providing efficient and accurate comparison results.
Smart Images

Figure CN122173600A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent question-answering technology, and in particular to a question-answering method, apparatus, and device for multi-subject comparison questions. Background Technology
[0002] With the rapid development of artificial intelligence and natural language processing technologies, intelligent question answering systems have been integrated into multiple fields such as economy, science and technology, environment, and society, and users' demand for multi-subject comparative question answering is becoming increasingly urgent.
[0003] In related technologies, multi-subject comparison problems are usually directly input into a general large model to obtain the answer. This method relies entirely on the model's internal pre-trained knowledge base to generate the answer, and its credibility and accuracy are difficult to meet the needs of practical applications. Summary of the Invention
[0004] This invention provides a question-and-answer method, apparatus, and device for multi-subject comparison problems. By decomposing multi-subject comparison problems into sub-problems that include a single subject, a single dimension, and a comparison time, the structured transformation of comparison requirements is achieved. This effectively ensures that the subjects in multi-subject comparison problems are fully decomposed, the fuzzy dimensions are finely decomposed, and the comparison time is unified. It effectively avoids problems such as subject omission, dimension confusion, and time inconsistency in the prior art, and significantly improves the accuracy and processing efficiency of multi-subject comparison question-and-answer.
[0005] This invention provides a question-and-answer method for multi-subject comparison questions, comprising the following steps: Obtain a multi-subject comparison problem input by the user, wherein the multi-subject comparison problem includes multiple subjects and dimensions to be compared; Based on the multi-subject comparison problem, multiple sub-problems are generated; each sub-problem includes a single subject, a single dimension, and a comparison time. Based on the multiple sub-problems, the results of the multi-agent comparison problem are generated.
[0006] According to the present invention, a question-answering method for a multi-subject comparison question is provided, wherein generating multiple sub-questions based on the multi-subject comparison question includes: Based on the scenario to which the multi-subject comparison problem belongs, generate prompt words containing comparison constraint rules; the comparison constraint rules include: multiple subjects in the multi-subject comparison problem are split into a single subject, multiple comparison dimensions are split into a single dimension, and the comparison time remains consistent; Based on the prompt words, the multi-subject comparison problem is broken down into multiple sub-problems.
[0007] According to a question-answering method for multi-agent comparison questions provided by the present invention, the step of generating the result of the multi-agent comparison question based on the plurality of sub-questions includes: Based on the comparison dimensions in the sub-questions, the multiple sub-questions are clustered into at least one retrieval task group; For each retrieval task group, generate retrieval instructions that include multiple subjects and comparison time; The search engine is invoked to execute the search command and obtain the search results; Based on the search results, the results for the multi-subject comparison problem are generated.
[0008] According to a question-answering method for multi-subject comparison questions provided by the present invention, when a search engine is invoked to execute the retrieval instruction and multiple retrieval results corresponding to the retrieval instruction are obtained, the method further includes: The multiple search results are filtered according to their priority order corresponding to the search command; among them, the search results that cover all the comparison subjects in the multi-subject comparison problem have the first priority; the search results that cover some comparison subjects and clearly indicate that each comparison subject uses the same statistical standard have the second priority; and the search results that cover only a single comparison subject have the third priority.
[0009] According to a question-and-answer method for multi-subject comparison questions provided by the present invention, the method further includes: The search results shall be subjected to at least one of the following: statistical caliber verification, time range verification, data unit verification, and multi-source cross-validation.
[0010] According to a question-answering method for multi-subject comparison questions provided by the present invention, the step of generating the result of the multi-subject comparison question based on the search result includes: Based on the scenario to which the multi-subject comparison problem belongs, the processing rules corresponding to the search results are determined; the processing rules include unit alignment rules, multi-subject difference calculation rules, and multi-subject difference attribution rules in the search results; Based on the processing rules and the retrieval results, the question-and-answer results for the multi-subject comparison question are generated; the question-and-answer results include the differences between the multiple subjects and the attribution of the differences between the multiple subjects.
[0011] The present invention also provides a question-and-answer device for multi-subject comparison questions, comprising the following modules: The acquisition module is used to acquire a multi-subject comparison question input by the user, wherein the multi-subject comparison question contains multiple subjects and dimensions to be compared; The generation module is used to generate multiple sub-problems based on the multi-subject comparison problem; the sub-problems include a single subject, a single dimension, and a comparison time. The question-and-answer module is used to generate the results of the multi-subject comparison question based on the multiple sub-questions.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a question-and-answer method for a multi-subject comparison problem as described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a question-and-answer method for a multi-subject comparison problem as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a question-and-answer method for multi-subject comparison questions as described above.
[0015] The question-and-answer method, apparatus, and device for multi-subject comparison problems provided by this invention decompose multi-subject comparison problems into sub-problems containing a single subject, a single dimension, and a comparison time, thereby realizing the structured transformation of comparison requirements. This effectively ensures that the subjects in multi-subject comparison problems are fully decomposed, the fuzzy dimensions are finely decomposed, and the comparison time is unified. It effectively avoids problems such as subject omission, dimension confusion, and time inconsistency in the prior art, and significantly improves the accuracy and processing efficiency of multi-subject comparison question and answer. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts of the question-and-answer method for multi-subject comparison problems provided by the present invention.
[0018] Figure 2 This is the second flowchart of the question-and-answer method for multi-subject comparison problems provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the structure of the question-and-answer device for multi-subject comparison problems provided by the present invention.
[0020] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] The following is combined Figures 1 to 4 The present invention describes a question-and-answer method, apparatus, and device for multi-subject comparison problems.
[0023] To facilitate a clearer understanding of the technical solutions of the various embodiments of this application, some technical content related to the various embodiments of this application will be introduced first.
[0024] Current question-answering solutions for multi-subject comparison problems mainly revolve around "general large model + retrieval enhancement," and can be categorized into three core types. It is important to note that all three types of solutions are general-purpose designs and have not been specifically optimized for the core needs of the "multi-subject comparison" scenario. Their technical logic and application goals are focused on "single information query or general question-answering," as detailed below: (1) General large model direct generation scheme (no retrieval, no decomposition) This approach directly inputs multi-entity comparison questions into a general-purpose model, relying entirely on the model's pre-trained knowledge base to generate answers. The core objective of this solution is to quickly respond to various general questions, without embedding any scenario-specific decomposition or verification logic. For example, if a user asks "Comparison of 2024 GDP of countries A, B, and C," the model only outputs the GDP figures and simple descriptions of the three countries based on general knowledge learned during training, without considering the real-time nature of the data, consistency of sources, or the completeness of the comparison dimensions.
[0025] (2) Direct retrieval + large model answering scheme (with retrieval, without decomposition) When a user poses a multi-subject comparison question, the system directly uses the complete question as the search term to invoke a general search engine (including API interfaces). After retrieving search results containing information from multiple subjects, these results are input into a large model to generate the answer. This solution's search logic is based on "general information retrieval," lacking the multi-subject constraint strategies required for comparison scenarios. For example, if a user asks "Comparison of GDP in countries A, B, and C in 2024," the system directly uses this complete question to retrieve the results. The returned web pages, reports, and other mixed information are then input into the large model, and integration is driven solely by the general instruction "Based on the following information, answer the comparison of GDP in countries A, B, and C in 2024," without any filtering or alignment rules designed for multi-subject data.
[0026] (3) Basic Search Enhancement Generation (RAG) Scheme (with retrieval and decomposition) The three-step approach of "problem decomposition → sub-problem retrieval → answer summarization" is a relatively advanced and general question-answering solution. However, the decomposition and retrieval stages still lack adaptability to different scenarios. ① Decomposition: The comparison problem is decomposed into single-subject sub-problems (such as "GDP of Country A in 2024" and "GDP of Country B in 2024") through a general large model. The decomposition logic only meets the requirement of "independent solution of a single problem" and has no comparison constraints of "alignment of multiple subject dimensions and time consistency". ② Search: Use a general search engine (including API interface) to obtain search results for each sub-question. The search process does not employ a comparative strategy of "prioritizing data from the same source and filtering authoritative sources". ③Summary: The single-subject retrieval information is input into the large model to generate comparative answers. The summarization logic is "general information integration". No dedicated modules such as data alignment and difference calculation are designed for the comparison scenario.
[0027] The three existing general-purpose solutions, lacking specific optimization for comparison scenarios, exhibit shortcomings in handling multi-entity comparison needs. These shortcomings stem not from insufficient technical implementation, but from a systemic problem caused by a lack of scenario adaptation. These issues directly result in comparison results that are "disorganized, fragmented, and lacking in value," failing to meet practical application requirements. Specific problems are as follows: (1) The multi-subject, multi-dimensional analysis lacks "comparative specificity". Limited by general question-and-answer logic, the decomposition process completely failed to consider the comparison scenarios' requirements for "subject integrity, dimensional consistency, and information relevance": For "collective subjects", only overall data can be output, and it is not possible to break it down to specific sub-subjects according to comparison needs; When multiple subjects' data are mixed in the same search result, due to the lack of dedicated filtering logic, it is easy to miss or mismatch, and large models are prone to errors when extracting data due to information clutter. There are common problems such as "incomplete breakdown of the main body", "insufficient breakdown of dimensions", and "redundant sub-problems". The breakdown results need to be manually adjusted again before they can be used for comparison.
[0028] (2) The problem of "data consistency" is prominent in the retrieval stage. The general search strategy lacks a mechanism to ensure "data homogeneity and standard uniformity" for the comparison scenario, resulting in data quality that fails to meet the comparison requirements. The general large model direct generation scheme relies on training libraries, which has inherent time lag and inconsistent standards. Direct retrieval methods lack authoritative source filtering logic, have scattered data sources, and are easily mixed with false information such as predictions from self-media, ultimately outputting answers with low credibility. The independent retrieval mode of sub-questions in the basic RAG scheme further exacerbates data inconsistency, with differences in data sources, statistical methods, time ranges, and units among various subjects, and a lack of unified calibration standards.
[0029] (3) The answer integration is merely "data piling up" and has no comparative value. The existing solution aims to "present information" rather than "output comparative conclusions," and it does not embed integrated analysis logic specific to the comparative scenario. Data alignment issues: Inconsistent units, standards, and timeframes directly affect the effectiveness of comparisons. Lack of quantitative analysis of differences: Only raw data is listed, without calculating core comparative indicators such as absolute differences and relative proportions; Attribution interpretation is lacking: the reasons for the differences are not explained, and the answer only remains at the level of data display, without any actual analytical value. Users need to manually process the data.
[0030] Figure 1 This is one of the flowcharts illustrating the question-and-answer method for multi-subject comparison problems provided by the present invention, such as... Figure 1 As shown, the method includes the following: Step 101: Obtain the multi-subject comparison problem input by the user. The multi-subject comparison problem contains multiple subjects and dimensions to be compared.
[0031] Specifically, in this embodiment, the system first receives a multi-entity comparison question input by the user, and then determines the entities to be compared and the comparison dimensions. For example, the multi-entity comparison question X input by the user is to compare the total GDP and GDP per capita of country A and country B.
[0032] Step 102: Based on the multi-subject comparison problem, generate multiple sub-problems; each sub-problem includes a single subject, a single dimension, and a comparison time.
[0033] Specifically, after obtaining the user-inputted multi-subject comparison question, this application decomposes the multi-subject comparison question into multiple sub-questions, thereby achieving a structured transformation of the comparison requirements and effectively improving the automation and accuracy of the comparison process. Optionally, the decomposed sub-questions include single subject, single dimension, and comparison time. For example, the multi-subject comparison question X can be decomposed into sub-question 1, sub-question 2, sub-question 3, and sub-question 4; where sub-question 1 is the total GDP of country A, sub-question 2 is the total GDP of country B, sub-question 3 is the GDP per capita of country A, and sub-question 4 is the GDP per capita of country B.
[0034] Step 103: Generate the results of the multi-subject comparison problem based on multiple sub-problems.
[0035] Specifically, after generating multiple sub-questions based on a multi-subject comparison question, the comparison results can be retrieved and output based on the generated sub-questions, effectively improving the accuracy of multi-subject comparison question answering.
[0036] The method described in the above embodiments decomposes the multi-subject comparison problem into sub-problems that include a single subject, a single dimension, and a comparison time, thereby achieving a structured transformation of the comparison requirements. This effectively ensures that the subjects in the multi-subject comparison problem are fully decomposed, the fuzzy dimensions are broken down into finer details, and the comparison time is unified. It effectively avoids problems such as subject omission, dimension confusion, and time inconsistency in the prior art, and significantly improves the accuracy and processing efficiency of multi-subject comparison question answering.
[0037] In some embodiments, based on the multi-agent comparison problem, multiple sub-problems are generated, including: Based on the scenario of the multi-subject comparison problem, generate prompt words containing comparison constraint rules; the comparison constraint rules include: multiple subjects in the multi-subject comparison problem are split into a single subject, multiple comparison dimensions are split into a single dimension, and the comparison time remains consistent; Based on the prompts, the multi-subject comparison problem is broken down into multiple sub-problems.
[0038] Specifically, in this embodiment, the scenario to which the multi-subject comparison problem belongs can be identified first, such as an economic scenario, a technological scenario, an environmental scenario, a social scenario, etc., and then prompt words containing comparison constraint rules can be dynamically generated for that scenario. Optionally, the comparison constraint rules are used to explicitly split the multi-subject into independent subjects and refine the fuzzy comparison dimensions into searchable quantitative indicators. Moreover, the comparison time of all sub-problems remains consistent, thereby providing a clear basis for the generation of sub-problems, avoiding subjectivity and randomness in the decomposition process, and achieving accurate decomposition of the multi-subject comparison problem.
[0039] Optionally, after generating prompts containing comparison constraint rules based on the scenario to which the multi-subject comparison question belongs, the prompts containing comparison constraint rules can be input into a large language model to structurally decompose the multi-subject comparison question input by the user. This effectively ensures that the subjects in the multi-subject comparison question are completely decomposed, the fuzzy dimensions are finely decomposed, and the comparison time of all subjects is unified, thereby improving the accuracy and processing efficiency of multi-subject comparison question answering.
[0040] For example, as shown in Table 1, this application can automatically identify the domain to which the problem belongs through keyword matching and scene feature library, providing a basis for subsequent breakdown.
[0041] Table 1 Scene categories Core keywords Feature description (subject / dimensional type) Economic scenarios GDP, per capita income, unemployment rate, imports and exports The subjects are mostly countries / regions, and the dimensions are quantitative economic indicators. Technology Scenarios R&D investment, patents, and technology investment The main subjects are enterprises / countries, and the dimensions are science and technology input / output indicators. Environment Scene Forest cover, CO2 emissions, pollution The main body is the country / region, and the dimension is environmental monitoring indicators. Social Scene Life expectancy, school enrollment rate, employment rate The main body is the country / region, and the dimension is social and livelihood indicators. Optionally, this application supports dynamic scenario configuration, allowing the addition of new scenarios (such as "education scenario" or "medical scenario") through configuration files without modifying the code. This effectively enhances system scalability and enables rapid deployment and dynamic activation without the need for complex algorithms or large-scale data training.
[0042] For example, educational scenarios can be added through configuration files: { Scene Name: "Educational Scene" Key keywords: ["College entrance rate", "Education funding", "Enrollment rate", "Number of teachers"] "Subject Type": ["Country / Region", "School"], "Dimensional Features": "Input / Output Indicators of Educational Resources", "Path to the associated rule base": ". / rules / education_rules.json" / / Points to the integrated rules for this scenario } Optionally, when performing a structured decomposition of a multi-subject comparison problem input by the user, a prompt word containing "comparison constraint rules" can be dynamically generated for different scenarios.
[0043] For example, a user-input multi-entity comparison question might be: "Compare the economic strength of countries A, B, and C in 2023. How large is the gap?" The dynamically generated prompt word containing "comparison constraint rules" for this economic scenario would be: Please extract the following information from user questions and output it in a table, which must meet the following requirements: 1. Comparison Subjects: The subject is broken down into multiple parts, ensuring no object is omitted from the comparison. 2. Comparison Dimensions: Vague dimensions need to be refined into searchable quantitative indicators (such as "economic strength" being broken down into total GDP, GDP per capita, and growth rate), covering the core comparison dimensions of "total + per capita"; 3. Time range: If not explicitly mentioned, the default is "the most recent full year," and the time base must be consistent across all entities; 4. Sub-problem constraint: Only sub-problems with "single subject + single dimension + fixed time" are generated to avoid redundant content that is irrelevant to the comparison.
[0044] For example, based on the above prompts, the decomposed sub-problems contain a triplet of subject, dimension, and time, as shown in Table 2: Table 2 Comparison subject Comparison Dimensions Time range Sub-problems (single subject + single dimension) China Total GDP, GDP per capita, growth rate 2024 China's total GDP in 2024, China's GDP per capita in 2024, and China's GDP growth rate in 2024. USA Total GDP, GDP per capita, growth rate 2024 US GDP in 2024, US GDP per capita in 2024, US GDP growth rate in 2024 Germany Total GDP, GDP per capita, growth rate 2024 Germany's total GDP in 2024, Germany's GDP per capita in 2024, and Germany's GDP growth rate in 2024. The method described in the above embodiments generates prompts containing comparison constraint rules based on the scenario to which the multi-subject comparison question belongs. It explicitly requires that the multiple subjects be split into independent individuals, that the fuzzy comparison dimensions be refined into searchable quantitative indicators, and that the comparison time base of all sub-questions be kept consistent. This provides a clear basis for the generation of sub-questions and effectively solves the problems in the existing technology, such as lack of comparison focus in the decomposition process, easy omission of subjects, chaotic dimension definition, and inconsistent time base. It realizes the standardization and precise decomposition of multi-subject comparison questions and significantly improves the overall processing accuracy and efficiency of multi-subject comparison question answering.
[0045] In some embodiments, the results of a multi-agent comparison problem are generated based on multiple sub-problems, including: Based on the comparison dimensions in the sub-questions, multiple sub-questions are clustered into at least one retrieval task group; For each retrieval task group, generate retrieval instructions that include multiple subjects and comparison time; Call the search engine to execute search commands and obtain search results; Based on the search results, generate results for the multi-subject comparison question.
[0046] Specifically, in this embodiment, after breaking down the user-input multi-subject comparison question into multiple sub-questions, sub-questions including the same comparison dimension can be grouped together to form a retrieval task group. This effectively solves the problems of low efficiency and data clutter caused by scattered sub-question retrieval, making the retrieval target more focused and improving the systematic nature and efficiency of the retrieval. For example, sub-questions can be clustered into retrieval task groups (such as "total GDP group" and "GDP per capita group") according to dimensional correlation, which facilitates the batch generation of retrieval instructions for a general search engine and improves retrieval efficiency.
[0047] Optionally, for each retrieval task group, retrieval instructions containing multiple subjects and comparison time are generated. These instructions are then input into a general search engine to execute the retrieval, obtaining search results in various formats, including authoritative reports, officially released data, and industry standard documents, ensuring the breadth and authority of the data sources. Optionally, after obtaining the search results, they can be integrated and analyzed to generate final results for multi-subject comparison questions, improving the accuracy of multi-subject comparison question answering.
[0048] The method described in the above embodiments effectively avoids the inefficiency and data disorder caused by scattered sub-questions, by clustering the decomposed sub-questions according to the comparison dimension to form retrieval task groups and generating retrieval instructions containing multiple subjects and a unified comparison time. This makes the retrieval target more focused, greatly improves the systematicness and efficiency of the retrieval, and significantly improves the accuracy of multi-subject comparison question answering.
[0049] In some embodiments, when a search engine is invoked to execute a search command and multiple search results corresponding to the search command are obtained, the method further includes: Based on the priority order of multiple search results corresponding to the search command, the search results are filtered. Among them, the search results that cover all the comparison subjects in the multi-subject comparison problem have the first priority; the search results that cover some comparison subjects and clearly indicate that each comparison subject uses the same statistical standard have the second priority; and the search results that cover only a single comparison subject have the third priority.
[0050] Specifically, after obtaining multiple search results from a search engine, this application can prioritize high-priority search results to achieve hierarchical filtering of search results. Optionally, the first priority is search results covering all comparison subjects; the second priority is search results covering some comparison subjects and clearly marked that each subject uses the same statistical standard; the third priority is search results covering only a single comparison subject. In other words, after obtaining multiple search results from a search engine, this application prioritizes filtering search results covering all comparison subjects, thereby maximizing the completeness and accuracy of the data required for multi-subject comparisons and avoiding the impact of missing subject data on the comparison effect. Simultaneously, listing the results of some subjects marked with unified statistical standards as the second priority can reduce errors caused by differences in statistical methods among different subjects, effectively solving the problems of scattered data sources and inconsistent methods in existing technologies, and ensuring that data meeting comparison requirements can still be systematically filtered even in complex data environments.
[0051] For example, this application generates standardized search instructions for each search task group, including multiple subjects, a unified time frame, and authoritative source constraints. Searches are then performed based on these instructions to obtain search results from multiple authoritative domains. Optionally, the search results from multiple authoritative domains can be filtered. The first priority is authoritative reports that simultaneously include data from all compared subjects; the second priority is data covering some subjects but explicitly marked with unified statistical standards; and the third priority is official data from a single subject.
[0052] The method described above employs a hierarchical filtering rule: search results covering all comparison subjects are given first priority; search results covering some subjects and labeled with uniform statistical standards are given second priority; and search results covering only a single subject are given third priority. This method prioritizes high-priority search results and supplements low-priority results as needed, thereby maximizing the integrity of multi-subject comparison data, avoiding the impact of missing subject data on comparison results, significantly reducing the difference in statistical standards between different subject data, and effectively solving the problems of scattered data sources and inconsistent standards in the prior art.
[0053] In some embodiments, at least one of the following is performed on the search results: statistical caliber verification, time range verification, data unit verification, and multi-source cross-validation.
[0054] Specifically, after executing a search command through a search engine and obtaining the search results, this application can perform statistical caliber verification, time range verification, data unit verification, and multi-source cross-validation on the search results, thereby effectively improving the accuracy and credibility of multi-subject comparison results. Optionally, it can verify whether each comparison subject adopts consistent statistical standards across all comparison dimensions by using matching rule encoding or calling a general large model. Optionally, it can also check whether the data of all subjects correspond to the same time base, and annotate any time deviations. Optionally, it can also verify the data units of different subjects' data. Optionally, it can also supplement the search with data from other authoritative domains for subjects from a single source to achieve multi-source cross-validation.
[0055] For example, after calling a search engine to execute a search command and obtain the search results, this application performs data consistency verification on the search results, as follows: Calibratory caliber verification: By using the calibratory feature library and the encoding method of the matching rules or by calling a general large model, input the statistical caliber of "{dimension} in {data source document}" to confirm whether each entity adopts the same standard (e.g., whether GDP is all "expenditure approach"); Time verification: Check whether all subject data are within the same time range (e.g., all are calendar year 2023). If there are discrepancies (e.g., a subject's data is from Q3 2023), mark "Time Deviation" and notify the user. Unit verification: Automatically unifies data units (e.g., converting "RMB / Euro" to "USD", using the average exchange rate for the corresponding year); Cross-validation: If the data of a subject comes from only a single source, supplement the search by Bing API with "{subject}{dimension}{time} data source site: other authoritative domains". If the quantitative deviation of more than 3 independent source data is ≤N%, it is considered "high consistency". Otherwise, it is marked "disputed, needs to be integrated or averaged".
[0056] The method described in the above embodiments effectively solves the problems of distorted comparison results caused by scattered data sources, chaotic standards, inconsistent units, and inconsistent times in the prior art by performing statistical caliber verification, time range verification, data unit verification, and multi-source cross-verification on the search results. It significantly improves the accuracy and reliability of multi-subject comparison data, reduces the tedious operation of manual calibration, and improves the processing efficiency of multi-subject comparison problems.
[0057] In some embodiments, based on the search results, results for a multi-subject comparison problem are generated, including: Based on the scenario of the multi-subject comparison problem, determine the processing rules corresponding to the search results; the processing rules include unit alignment rules, multi-subject difference calculation rules, and multi-subject difference attribution rules in the search results; Based on the processing rules and search results, the question and answer results for multi-subject comparison questions are generated; the question and answer results include the differences between the multiple subjects and the attribution of the differences between the multiple subjects.
[0058] Specifically, after executing a search command through a search engine and obtaining search results, this application can determine the corresponding processing rules from a pre-defined lightweight rule base based on the scenario of the multi-subject comparison question. Optionally, the processing rules for the search results include unit alignment rules, multi-subject difference calculation rules, and multi-subject difference attribution rules. Optionally, the filtered and verified search results can first undergo standardization processing such as unit unification and caliber alignment according to the unit alignment rules; then, the core comparison indicators such as absolute and relative differences between multiple subjects can be quantified according to the difference calculation rules; finally, the core reasons for the differences can be analyzed by combining the difference attribution rules with auxiliary search data, ultimately generating a question-and-answer result for the multi-subject comparison question that includes original multi-subject data, quantified difference results, difference attribution interpretation, and data source annotation. This allows the question-and-answer result for the multi-subject comparison question to not only present data differences but also accurately explain why differences exist, thus upgrading from simple information display to a decision reference with analytical value, saving users a lot of secondary analysis work and significantly improving the user experience.
[0059] For example, as shown in Table 3, the rule base in this embodiment is stored in a local lightweight database and is categorized by scenario. Each scenario includes alignment rules, difference calculation rules, and attribution rules for high-frequency dimensions: Table 3 Scene Dimension Alignment rules Difference Calculation Rules Attribution rules economy GDP per capita The unit is uniformly set in "US dollars (current price)"; the measurement is uniformly set in "per capita disposable income of residents". Absolute difference: AB; Relative difference: (AB) / Global mean × 100% Related factors: labor productivity, average years of schooling per capita; if country A's labor productivity is 50% higher than country B's, the reason is attributed to "labor productivity as the core driving factor". environment Forest coverage Units are standardized as "% (percentage of land area)"; urban green space is excluded, and adjustments are made according to the "FAO standards". Absolute difference: AB; Relative difference: (AB) / B × 100% Related factors: duration of forestry policy implementation, percentage of investment in forest protection; if country A's policies have been implemented for over 10 years and investment is ≥1% of GDP, the reason is attributed to "long-term policy and investment-driven" factors. Optionally, alignment rules can be executed based on the problem scenario and dimensions to unify the units, definitions, and timeframes of all main data, such as unifying the total GDP to US$ billion in 2023 using the expenditure approach; difference calculation rules can be executed to generate core comparative indicators such as absolute differences and relative proportions, and present them in the form of tables / charts; and attribution rules can be executed in conjunction with the retrieved auxiliary data.
[0060] The method described above, by performing unit alignment, multi-subject difference calculation, and difference attribution on the filtered and verified search results, not only achieves standardized processing of multi-subject comparison data in different scenarios, effectively solving the problems of data clutter and invalid comparison, and significantly improving the accuracy and standardization of comparison results, but also upgrades the question-and-answer results of multi-subject comparison questions from simple information display to analytical conclusions with decision-making reference value through automated difference calculation and attribution interpretation, saving users a lot of secondary analysis work and significantly improving the user experience.
[0061] For example, such as Figure 2 As shown in the figure, this application provides a question-and-answer method for multi-subject comparison questions, as detailed below: (1) Comparison of dedicated structured decomposition To address the core deficiency of general technical solutions lacking comparative awareness in their disassembly, a dedicated disassembly logic for comparative scenarios is designed. By identifying comparative scenarios through a pre-set scenario library and keyword matching, disassembly instructions are automatically generated, including complete subject disassembly, detailed dimension disassembly, and unified time constraints. The disassembly results are output as a table of subject, dimension, and time triplets, ensuring that aggregate subjects are disassembled into specific sub-subjects, fuzzy dimensions are disassembled into comparable indicators, and all subjects have consistent time. This results in effective sub-problems that retain a single subject and a single dimension, while eliminating redundant content irrelevant to the comparison. This allows the disassembly results to directly adapt to multi-subject comparison needs without manual adjustment.
[0062] (2) Lightweight same-origin search using general search engine API Addressing the core shortcomings of general-purpose technical solutions, such as inconsistent and disorganized data sources, this system generates search instructions that include multiple subjects, unified dimensions, unified timeframes, and authoritative source filtering. This guides search engines to return data from multiple subjects with the same source. Search results prioritize authoritative reports that include all subjects, followed by official single-subject data to reduce source confusion. The system automatically verifies and unifies the statistical definitions, time ranges, and units of the data without manual calibration, specifically addressing the data consistency issues of general-purpose solutions. The system automatically ensures authoritative sources and unified standards, effectively improving processing efficiency.
[0063] (3) Lightweight rule base integration analysis Addressing the core deficiency of generic technical solutions that merely pile up data without comparative value, this approach integrates rules to give results direct analytical value. It stores three types of rules—data alignment, difference calculation, and attribution interpretation—in a JSON configuration file, supporting simple configuration modifications to add new rules; it unifies data format, calculates and compares differences, and explains the reasons for differences; and it outputs standardized results including data tables, difference conclusions, attribution information, and source annotations, ensuring clarity and verifiability.
[0064] The method described above focuses on the needs of comparison scenarios and relies on three core technologies: comparison-specific structured decomposition, lightweight retrieval via general search engine API, and rule-based intelligent integration. Specifically, through the optimization of the entire process from question classification, comparison-specific structured decomposition, lightweight retrieval via general search engine API, data consistency verification, rule-based intelligent integration, to answer output, it achieves efficient processing of multi-subject comparison problems without the need for complex model training or extensive API integration.
[0065] The question-and-answer apparatus for multi-agent comparison problems provided by the present invention will be described below. The question-and-answer apparatus for multi-agent comparison problems described below can be referred to in correspondence with the question-and-answer method for multi-agent comparison problems described above. For example, Figure 3 As shown, the question-and-answer device for multi-subject comparison questions in this application includes: The acquisition module 310 is used to acquire the multi-subject comparison question input by the user, which contains multiple subjects and dimensions to be compared; The generation module 320 is used to generate multiple sub-questions based on the multi-subject comparison problem; the sub-questions include single subject, single dimension and comparison time; The question-and-answer module 330 is used to generate results for multi-subject comparison questions based on multiple sub-questions.
[0066] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440. The processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a question-and-answer method for multi-agent comparison questions. This method includes: acquiring a multi-agent comparison question input by a user, the multi-agent comparison question containing multiple agents and dimensions to be compared; generating multiple sub-questions based on the multi-agent comparison question; each sub-question containing a single agent, a single dimension, and a comparison time; and generating the result of the multi-agent comparison question based on the multiple sub-questions.
[0067] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0068] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the question-and-answer method for multi-subject comparison questions provided by the above methods. The method includes: obtaining a multi-subject comparison question input by a user, wherein the multi-subject comparison question includes multiple subjects and dimensions to be compared; generating multiple sub-questions based on the multi-subject comparison question; wherein each sub-question includes a single subject, a single dimension, and a comparison time; and generating a result for the multi-subject comparison question based on the multiple sub-questions.
[0069] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements a question-answering method for multi-subject comparison questions provided by the methods described above. The method includes: acquiring a multi-subject comparison question input by a user, the multi-subject comparison question including multiple subjects and dimensions to be compared; generating multiple sub-questions based on the multi-subject comparison question; each sub-question including a single subject, a single dimension, and a comparison time; and generating a result for the multi-subject comparison question based on the multiple sub-questions.
[0070] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0071] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A question-and-answer method for multi-subject comparison questions, characterized in that, include: Obtain a multi-subject comparison problem input by the user, wherein the multi-subject comparison problem includes multiple subjects and dimensions to be compared; Based on the multi-subject comparison problem, multiple sub-problems are generated; each sub-problem includes a single subject, a single dimension, and a comparison time. Based on the multiple sub-problems, the results of the multi-agent comparison problem are generated.
2. The question-and-answer method for multi-subject comparison questions according to claim 1, characterized in that, The process of generating multiple sub-problems based on the multi-agent comparison problem includes: Based on the scenario to which the multi-subject comparison problem belongs, prompt words containing comparison constraint rules are generated; the comparison constraint rules include: multiple subjects in the multi-subject comparison problem are split into a single subject, multiple comparison dimensions are split into a single dimension, and the comparison time remains consistent; Based on the prompt words, the multi-subject comparison problem is broken down into multiple sub-problems.
3. The question-and-answer method for multi-subject comparison questions according to claim 1, characterized in that, The step of generating the result of the multi-agent comparison problem based on the multiple sub-problems includes: Based on the comparison dimensions in the sub-questions, the multiple sub-questions are clustered into at least one retrieval task group; For each retrieval task group, generate retrieval instructions that include multiple subjects and comparison time; The search engine is invoked to execute the search command and obtain the search results; Based on the search results, the results for the multi-subject comparison problem are generated.
4. The question-and-answer method for multi-subject comparison questions according to claim 3, wherein when a search engine is invoked to execute the retrieval instruction and multiple retrieval results corresponding to the retrieval instruction are obtained, the method further includes: The multiple search results are filtered according to their priority order corresponding to the search command; among them, the search results that cover all the comparison subjects in the multi-subject comparison problem have the first priority; the search results that cover some comparison subjects and clearly indicate that each comparison subject uses the same statistical standard have the second priority; and the search results that cover only a single comparison subject have the third priority.
5. The question-and-answer method for multi-subject comparison questions according to claim 4, further comprising: The search results shall be subjected to at least one of the following: statistical caliber verification, time range verification, data unit verification, and multi-source cross-validation.
6. The question-answering method for multi-subject comparison questions according to any one of claims 3-5, wherein generating the result of the multi-subject comparison question based on the search result includes: Based on the scenario to which the multi-subject comparison problem belongs, determine the processing rules corresponding to the search results; The processing rules include unit alignment rules in search results, multi-subject difference calculation rules, and multi-subject difference attribution rules; Based on the processing rules and the retrieval results, the question-and-answer results for the multi-subject comparison question are generated; the question-and-answer results include the differences between the multiple subjects and the attribution of the differences between the multiple subjects.
7. A question-and-answer device for multi-subject comparison questions, characterized in that, include: The acquisition module is used to acquire a multi-subject comparison question input by the user, wherein the multi-subject comparison question contains multiple subjects and dimensions to be compared; The generation module is used to generate multiple sub-problems based on the multi-subject comparison problem; the sub-problems include a single subject, a single dimension, and a comparison time. The question-and-answer module is used to generate the results of the multi-subject comparison question based on the multiple sub-questions.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the question-and-answer method for multi-subject comparison questions as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the question-and-answer method for multi-subject comparison questions as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the question-and-answer method for multi-subject comparison questions as described in any one of claims 1 to 6.