Question and answer retrieval method and device

By dynamically updating the hot topic question and answer set mechanism and adjusting the update frequency according to the number of queries per minute, the problem of wasted computing resources and low retrieval efficiency caused by high-frequency repetitive questions in intelligent question answering systems is solved, and efficient question and answer retrieval and fast response are achieved.

CN121833918APending Publication Date: 2026-04-10CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In the sales and after-sales services of operators, when intelligent question-answering systems generate answers by calling large language models, the frequent processing of high-frequency repetitive questions leads to a waste of computing resources and a decrease in retrieval efficiency. In particular, when there are high-frequency repetitive questions and answers in a short period of time, conventional historical question-answering retrieval methods cannot be effectively processed, resulting in obstruction of user service recovery.

Method used

It adopts a dynamically updated hot question and answer set mechanism, which adjusts the update frequency dynamically according to the number of queries per minute, accurately identifies and efficiently manages hot questions, generates answers through preset language models or historical question and answer data, and prioritizes the retrieval of answers from the hot question and answer set to avoid retrieving all historical questions.

Benefits of technology

It improves question-and-answer retrieval efficiency, reduces computing resource consumption, ensures rapid response in high-frequency, repetitive question-and-answer scenarios, and enhances the system's processing capabilities and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833918A_ABST
    Figure CN121833918A_ABST
Patent Text Reader

Abstract

The invention discloses a question and answer retrieval method and device. The method comprises the steps that a question to be answered is received, a hotspot question and answer set at a target moment is obtained, question and answer combinations in the hotspot question and answer set are updated according to a preset updating frequency, and the preset updating frequency is dynamically changed based on the query per minute (QPM); under the condition that the question and answer combination matched with the to-be-answered question exists in the hotspot question and answer set, generating an answer of the to-be-answered question according to the matched question and answer combination; and under the condition that the question and answer combination matched with the to-be-answered question does not exist in the hotspot question and answer set, generating an answer to the to-be-answered question by adopting a preset language model or according to historical question and answer data. According to the method provided by the invention, the technical problem of relatively low retrieval efficiency caused by performing retrieval matching on a new problem and a full-amount historical problem in related technologies is at least solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a question-answering retrieval method and apparatus. Background Technology

[0002] Artificial Intelligence (AI) is widely used in telecom operators' sales and after-sales services, with intelligent question-and-answer (Q&A) being a crucial support tool for installation and maintenance (EM) services. When EEM services are provided to customers, the intelligent Q&A system generates comprehensive generative service support, including technical guidance and business queries, by calling Large Language Models (LLMs). However, in scenarios such as service activation and group faults, there is a high frequency of recurring questions within a certain timeframe. Frequent calls to the LLM to generate answers result in a significant waste of computing resources. Therefore, setting an efficient historical Q&A retrieval method is a key aspect of optimizing the intelligent Q&A system's performance. However, conventional historical Q&A retrieval methods include knowledge base retrieval and semantic search (SS). Both match new questions with a complete set of historical questions. When handling high-frequency recurring questions and answers within a short period, this can cause a sudden surge in computing resource consumption, a significant decrease in retrieval efficiency, and increased delays in EEM inquiries, potentially hindering the recovery of customer services. Summary of the Invention

[0003] This application provides a question-and-answer retrieval method and apparatus to at least solve the technical problem in related technologies where retrieval efficiency is low due to matching the unanswered question with a full set of historical questions.

[0004] According to one aspect of the embodiments of this application, a question-and-answer retrieval method is provided, comprising: receiving a question to be answered and obtaining a set of hot questions and answers at a target time, wherein the question-and-answer combinations in the set of hot questions and answers are updated according to a preset update frequency, the preset update frequency being dynamically changed based on the number of queries per minute (QPM); if there is a question-and-answer combination in the set of hot questions and answers that matches the question to be answered, generating an answer to the question to be answered based on the matching question-and-answer combination; if there is no question-and-answer combination in the set of hot questions and answers that matches the question to be answered, generating an answer to the question to be answered using a preset language model or based on historical question-and-answer data.

[0005] Optionally, obtaining the hot topic question and answer set at a target time includes: obtaining a preset two-dimensional array of the hot topic question and answer set, wherein the preset two-dimensional array is used to store the QPM threshold of each preset time period within a preset period; obtaining the target threshold of the target time from the preset two-dimensional array according to the preset time period to which the target time belongs; determining the target scenario corresponding to the target time based on the comparison result between the QPM of the target time and the target threshold; determining the determination strategy of hot topic question and answer combinations in the hot topic question and answer set according to the determination strategy.

[0006] Optionally, determining the target scenario corresponding to the target time based on the comparison result between the QPM at the target time and the target threshold includes: determining the target scenario as a hotspot outbreak scenario when the comparison result indicates that the QPM at the target time is greater than a first multiple of the target threshold; and determining the target scenario as a non-hotspot outbreak scenario when the comparison result indicates that the QPM at the target time is less than a second multiple of the target threshold, wherein the first multiple is greater than the second multiple.

[0007] Optionally, the strategy for determining the combination of hot questions and answers in the hot question and answer set based on the target scenario corresponding to the target time includes: determining the preset update frequency as a first frequency when the target scenario is the hot topic outbreak scenario, and determining the preset update frequency as a second frequency when the target scenario is the no hot topic outbreak scenario, wherein the first frequency is higher than the second frequency; and determining the strategy for determining the combination of hot questions and answers in the hot question and answer set based on the preset update frequency.

[0008] Optionally, determining the hot question-answer combination in the hot question-answer set according to the preset update frequency includes: when the preset update frequency is the first frequency, determining the determination strategy as follows: when the ratio of the QPM of the question to be determined to the current total QPM exceeds a first ratio, determining the question-answer combination corresponding to the question to be determined as the hot question-answer combination; when the preset update frequency is the second frequency, determining the determination strategy as follows: when the ratio of the QPM of the question to be determined to the current total QPM exceeds a second ratio, determining the question-answer combination corresponding to the question to be determined as the hot question-answer combination, wherein the first ratio is less than the second ratio, and wherein the current total QPM is the total QPM within the update period corresponding to the second frequency.

[0009] Optionally, the method further includes: when the preset update frequency is the first frequency, if the ratio of the hot question and answer combination to the current total QPM is less than a third ratio, then removing the hot question and answer combination from the hot question and answer set; when the preset update frequency is the second frequency, if the ratio of the hot question and answer combination to the current total QPM is less than a fourth ratio, then removing the hot question and answer combination from the hot question and answer set, wherein the third ratio is less than the fourth ratio.

[0010] Optionally, generating an answer to the question to be answered using a preset language model or based on historical question-and-answer data includes: finding a question-and-answer combination that matches the question to be answered from the historical question-and-answer data; generating an answer to the question to be answered based on the matching question-and-answer combination if a matching question-and-answer combination exists in the historical question-and-answer data; and generating an answer to the question to be answered using a preset language model if no matching question-and-answer combination exists in the historical question-and-answer data.

[0011] According to another aspect of the embodiments of this application, a question-and-answer retrieval device is also provided, comprising: a receiving module, configured to receive a question to be answered and obtain a set of hot questions and answers at a target time, wherein the question-and-answer combinations in the set of hot questions and answers are updated according to a preset update frequency, the preset update frequency being dynamically changed based on the number of queries per minute (QPM); a first generating module, configured to generate an answer to the question to be answered based on the matching question-and-answer combinations in the set of hot questions and answers; and a second generating module, configured to generate an answer to the question to be answered using a preset language model or based on historical question-and-answer data when no matching question-and-answer combinations are found in the set of hot questions and answers.

[0012] According to another aspect of the embodiments of this application, a computer device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor, connected to the memory, is used to execute the above-described question-and-answer retrieval method.

[0013] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the above-described question-and-answer retrieval method.

[0014] In this embodiment, a method is employed that receives a question to be answered and obtains a set of trending questions and answers at a target time. The question-answer combinations in the trending question-answer set are updated according to a preset update frequency, which dynamically changes based on the query volume per minute (QPM). If a question-answer combination matching the question exists in the trending question-answer set, an answer to the question is generated based on that matching combination. If no matching combination exists in the trending question-answer set, an answer is generated using a preset language model or based on historical question-answer data. By dynamically updating the question-answer combinations in the trending question-answer set and prioritizing the retrieval of answers from the trending question-answer set, the method avoids retrieving all historical questions, thereby improving the retrieval efficiency of the question to be answered. This solves the technical problem in related technologies where matching the question to be answered with all historical questions leads to low retrieval efficiency. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0016] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a question-and-answer retrieval method according to an embodiment of this application;

[0017] Figure 2 This is a flowchart of a question-and-answer retrieval method according to an embodiment of this application;

[0018] Figure 3 This is a flowchart of another question-and-answer retrieval method according to an embodiment of this application;

[0019] Figure 4 This is a flowchart of a question-answering retrieval method in related technologies;

[0020] Figure 5 This is a flowchart of another question-and-answer retrieval method according to an embodiment of this application;

[0021] Figure 6 This is a flowchart of a preset update frequency adjustment method according to an embodiment of this application;

[0022] Figure 7 This is a flowchart of a method for determining hot topic question-and-answer combinations according to an embodiment of this application;

[0023] Figure 8 This is a flowchart of a method for removing non-hotspot question-and-answer combinations according to an embodiment of this application;

[0024] Figure 9 This is a structural diagram of a question-and-answer retrieval device according to an embodiment of this application. Detailed Implementation

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

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 this application 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 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.

[0027] The information collected in this application embodiment is information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant regions, and necessary confidentiality measures have been taken. It does not violate public order and good morals, and provides corresponding operation entry points for users to choose to authorize or reject the automated decision results. If the user chooses to reject, the process will proceed to the expert decision-making process.

[0028] To better understand the embodiments of this application, the technical terms used in the embodiments of this application are explained as follows:

[0029] AI: Artificial Intelligence, the technology that uses computer systems to simulate human intelligence.

[0030] SS: Semantic Search, which provides more accurate search results by understanding the user's intent.

[0031] LLM: Large Language Model, refers to a deep learning model trained using a large amount of text data.

[0032] QPM: Query Per Minute, refers to the number of queries processed by the system per minute.

[0033] To address the problems existing in related technologies, embodiments of this application provide a question-and-answer retrieval method, which can be run on... Figure 1 The computer terminal shown is explained below.

[0034] The question-and-answer retrieval method embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal for implementing a question-answering retrieval method is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected via wired and / or wireless networks. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0035] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0036] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the question-and-answer retrieval method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned question-and-answer retrieval method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0037] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for wireless communication with the Internet.

[0038] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0039] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware components (including circuitry), software components (including computer code stored on a computer-readable medium), or a combination of both hardware and software components. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0040] In the above operating environment, this application provides an embodiment of a question-answering retrieval method. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.

[0041] Figure 2 This is a flowchart of a question-and-answer retrieval method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0042] Step S202: Receive the questions to be answered and obtain the hot question and answer set at the target time. The question and answer combination in the hot question and answer set is updated according to a preset update frequency, which is dynamically changed based on the query volume per minute (QPM).

[0043] Step S204: If there is a question-and-answer combination in the hot question-and-answer set that matches the question to be answered, generate an answer to the question to be answered based on the matching question-and-answer combination;

[0044] Step S206: If there is no matching question-answer combination for the question to be answered in the hot question-answer set, an answer to the question to be answered is generated using a preset language model or based on historical question-answer data.

[0045] Through steps S202 to S206 above, the process involves receiving a question to be answered and obtaining a set of trending questions and answers at a target time. The question-answer combinations in the trending question-answer set are updated according to a preset update frequency, which dynamically changes based on the query volume per minute (QPM). If a question-answer combination matching the question exists in the trending question-answer set, an answer to the question is generated based on that matching combination. If no matching combination exists in the trending question-answer set, an answer is generated using a preset language model or based on historical question-answer data. By dynamically updating the question-answer combinations in the trending question-answer set and prioritizing the retrieval of answers from it, the process avoids searching the entire historical question set, thereby improving the retrieval efficiency of the question to be answered. This solves the technical problem in related technologies where matching the question to be answered with the entire historical question set leads to low retrieval efficiency. A detailed explanation follows.

[0046] Taking the application scenario of question-and-answer retrieval for installation and maintenance as an example, this application embodiment also provides a question-and-answer retrieval method, such as... Figure 3 As shown, this includes: setting up a dynamic update mechanism for hot issues, dynamically calculating the update frequency of hot issues, accurately identifying sudden hot issues, and setting up a mechanism to update and remove expired hot issues. By quickly matching and efficiently managing the list of hot issues through high-frequency hot issues, historical issues can be searched according to their popularity. Through the above dynamic update mechanism for hot issues, we can achieve efficient response to sudden hot issues, elastic control of computing resources, and accurate matching of business questions and answers.

[0047] In practical applications, the operator's intelligent Q&A system for installation and maintenance is mainly used to support installation and maintenance in areas such as external line construction, service activation, fault repair, and smart promotion. Based on LLM (Local Management Model), it can provide intelligent Q&A support, reducing the operator's online manual support costs. With the widespread application of Q&A, the amount of historical Q&A gradually increases, requiring the intelligent Q&A system to consider optimizing the retrieval and storage of historical Q&A to reduce frequent calls to LLM for repetitive questions and improve the system's response speed. Analysis of the operator's installation and maintenance Q&A support scenarios reveals characteristics such as business suddenness and recovery timeliness. These typically fall into two categories: sudden faults and emergency service deployments. When a sudden fault occurs, it triggers repetitive Q&A related to the fault, appearing frequently within a short period, and the fault needs to be restored as quickly as possible. During emergency service deployments, it triggers repetitive Q&A for batch service activation technical support, frequently accessed within a certain timeframe, and the service needs to be successfully deployed in a short time. The aforementioned batch Q&A scenarios account for a high proportion in operator installation and maintenance Q&A scenarios. They are characterized by high sensitivity and wide impact, which can cause a surge in concurrent Q&A requests to the system. If processing is delayed, it can lead to a batch of user complaints, which in turn can cause online public opinion and result in significant economic losses.

[0048] Conventional knowledge base retrieval or Service Creation (SS) methods involve traversal matching. When encountering frequently repeated questions within a short period, this leads to low question-and-answer retrieval efficiency, causing maintenance and installation questions to queue and wait for retrieval results, severely impacting the system's question-and-answer support efficiency. Conventional methods cannot effectively handle scenarios with frequent, repeated questions in a short period, and as the number of historical questions increases, the system response time will grow exponentially.

[0049] Operators' operating models are characterized by wide user coverage, significant business impact, and high time sensitivity; user inquiries or reports of problems can surge within a certain period. For example, suppose a question-and-answer system has 10 historical questions and answers, including 4 about broadband internet access problems, 3 about mobile internet access problems, 2 about iTV viewing problems, and 1 about landline call problems. In a conventional knowledge base matching or semantically relevant question-and-answer matching process, the execution flow is divided into two scenarios: historical question-and-answer matching and unmatched scenarios. Figure 4 As shown, this includes: (1) Historical Q&A matching scenario: When the installation and maintenance department initiates an iTV opening error code issue, the historical Q&A table is matched first in semantic order. If the semantically related questions match more than 60%, the Q&A is returned to the installation and maintenance department. When encountering a batch of installation and maintenance department inquiries about iTV not being able to be watched, the matching efficiency increases with the increase in quantity, and the system performance consumption gradually increases. (2) Historical Q&A mismatch scenario: When the installation and maintenance department initiates a broadband internet slow problem, if the historical Q&A semantic matching does not match, an LLM is initiated to generate a new Q&A and return it to the installation and maintenance department, and the new Q&A is added to the historical Q&A table. When encountering a batch of installation and maintenance department inquiries about broadband internet slow problem, not optimizing the matching of LLM-generated Q&A will lead to a significant decline in Q&A support efficiency.

[0050] To address the problems existing in conventional methods in related technologies, the question-and-answer retrieval method provided in this application embodiment designs a dynamic update mechanism for hot topics, accurately extracts sudden hot topics, and retrieves historical questions according to their popularity, ensuring that questions surging in a short period can be quickly matched and returned with answers. To ensure the accuracy of hot topic matching, this method also sets up a mechanism for removing invalid hot topics. Simultaneously, when there is no sudden surge in questions, the update frequency of hot topics is dynamically adjusted to avoid the computational resource consumption caused by high-frequency updates, maximizing system resource utilization. Furthermore, considering the timeliness of recovery from sudden problems, the update frequency of hot topics needs to be adjusted promptly after business recovery. The retrieval method provided in this application embodiment sets up a dynamic adjustment mechanism for the update frequency of hot topics. When identifying a sudden surge in hot topics, the frequency of hot topics is adjusted to high frequency, and vice versa, thereby ensuring rapid capture of problems during sudden business periods and achieving high-efficiency handling of sudden surges in questions. Secondly, hot topics are accurately captured and sent to memory for high-priority matching queries. At the same time, questions that meet the rules for decreasing popularity are removed from memory to maintain the timeliness of hot topics, thereby improving overall matching efficiency.

[0051] Taking the application scenario of intelligent Q&A for installation and maintenance by telecom operators as an example, such as Figure 5 As shown in the embodiments of this application, the retrieval method performs semantic relevance merging and counting on existing questions and answers, monitors QPM (Query Per Minute, total number of questions and queries per minute), and sets the default hotspot update frequency to low frequency, which can effectively save computing resources. When the total increase reaches 30% above the monitoring threshold (obtained through statistical analysis of sudden question and answer growth in installation and maintenance scenarios, this value can be adjusted according to different industry characteristics), a sudden hotspot issue is identified, and the hotspot issue update frequency is adjusted to high frequency. For example, the issue "iTV opens with an error code" is adjusted to a hotspot issue with high priority matching when its increase reaches the threshold. Through high-priority matching of hotspot issues and dynamic adjustment of the hotspot update frequency, efficient response to sudden hotspots, elastic management of computing resources, and accurate matching of business questions and answers are achieved.

[0052] Table 1 shows a comparison between the question-answering retrieval method provided in the embodiments of this application and conventional methods in related technologies.

[0053] Table 1

[0054]

[0055] In some embodiments of this application, the specific steps for obtaining the hot topic question and answer set at a target time are as follows: obtaining a preset two-dimensional array of the hot topic question and answer set, wherein the preset two-dimensional array is used to store the QPM threshold of each preset time period within a preset period; obtaining the target threshold of the target time from the preset two-dimensional array according to the preset time period to which the target time belongs; determining the target scenario corresponding to the target time based on the comparison result between the QPM of the target time and the target threshold; determining the determination strategy of hot topic question and answer combination in the hot topic question and answer set according to the determination strategy.

[0056] The specific steps for determining the target scenario corresponding to the target time based on the comparison result of the QPM at the target time and the target threshold include: if the comparison result indicates that the QPM at the target time is greater than a first multiple of the target threshold, for example, 130%, then the target scenario is determined to be a hotspot outbreak scenario; if the comparison result indicates that the QPM at the target time is less than a second multiple of the target threshold, for example, 110%, then the target scenario is determined to be a non-hotspot outbreak scenario, wherein the first multiple is greater than the second multiple.

[0057] It should be noted that, when the target scenario is the hot topic outbreak scenario, the preset update frequency is determined to be a first frequency, for example, 1 minute; when the target scenario is the non-hot topic outbreak scenario, the preset update frequency is determined to be a second frequency, for example, 30 minutes, wherein the first frequency is higher than the second frequency; the strategy for determining the hot topic question and answer combination in the hot topic question and answer set is determined according to the preset update frequency.

[0058] Specifically, the monitoring thresholds for QPM are a two-dimensional array. This is mainly because the installation and maintenance service has a weekly cyclical pattern, and the workload differs on Saturdays and Sundays compared to weekdays. The working hours are approximately from 8 AM to 8 PM. Therefore, the method sets QPM[1~7][8~20] to 7. Twelve thresholds are used, with the peak QPM for each hour serving as a baseline for comparison. The comparison is performed every minute, facilitating accurate comparison of sudden business events at different times. When adjusting the update frequency, it's necessary to consider both the comparison between the current QPM value and the threshold, as well as the current update frequency, to avoid misjudgments. The dynamic adjustment process for the preset update frequency is as follows: Figure 6 As shown, it includes:

[0059] Step 1: Set the default hotspot update frequency (preset update frequency) to 30 minutes (current_cycle=1800);

[0060] Step 2: Set the target threshold threshold_QPM[i][j] for monitoring and comparison, where i represents Monday to Sunday and j represents 8 to 20. The system counts the peak threshold_QPM for each hour during a non-burst business cycle from 8 am to 8 pm every 7 days, for a total of 7. There are 12 values, such as threshold_QPM[3]

[14] , which represents the peak QPM at 2 PM on Wednesday.

[0061] Step 3: Monitor and compare the current_QPM (QPM at the target time) with the target threshold_QPM[i][j] every minute; If current_QPM >= threshold_QPM[i][j] 130% and current_cycle=1800: current_cycle=60 means: if the current QPM exceeds 130% of threshold_QPM, and the current cycle time current_cycle is 1800 seconds, then current_cycle will be adjusted to 60 seconds to increase the hotspot update frequency; elif current_QPM<=threshold_QPM[i][j] 110% and current_cycle=60: current_cycle=1800 means that if the current QPM is lower than 110% of threshold_QPM and current_cycle is 60 seconds, then current_cycle will be adjusted back to 1800 seconds to reduce the hot spot update frequency.

[0062] The real-time monitoring of the retrieval method update frequency provided in this application embodiment monitors the ratio of the current QPM to the historical statistical analysis of QPM, accurately capturing the sudden outbreak and end of hot spots, thereby dynamically adjusting the hot spot update frequency according to the popularity, ensuring that the system responds efficiently to installation and maintenance questions and answers.

[0063] In some embodiments of this application, the strategy for determining the hot question-answer combination in the hot question-answer set based on the preset update frequency includes: when the preset update frequency is the first frequency, determining that the strategy is to determine the question-answer combination corresponding to the question to be determined as the hot question-answer combination when the ratio of the QPM of the question to be determined to the current total QPM exceeds a first ratio; when the preset update frequency is the second frequency, determining that the strategy is to determine the question-answer combination corresponding to the question to be determined as the hot question-answer combination when the ratio of the QPM of the question to be determined to the current total QPM exceeds a second ratio, wherein the first ratio, for example, 20%, is less than the second ratio, for example, 40%, and the current total QPM is the total QPM within the update period corresponding to the second frequency.

[0064] When the preset update frequency is the first frequency, if the ratio of the hot Q&A combination to the current total QPM is less than a third ratio, for example, 20%, then the hot Q&A combination is removed from the hot Q&A set; when the preset update frequency is the second frequency, if the ratio of the hot Q&A combination to the current total QPM is less than a fourth ratio, then the hot Q&A combination is removed from the hot Q&A set, wherein the third ratio is less than the fourth ratio.

[0065] Specifically, differentiated hotspot calculation and identification are performed based on different hotspot update frequencies. In scenarios of sudden hotspot issues, the system enables high-frequency hotspot updates and sets corresponding hotspot identification thresholds based on the heat analysis of sudden installation and maintenance scenarios. In scenarios without sudden hotspots, corresponding hotspot identification thresholds are set according to low-frequency cycles. The QPM values ​​here are all data retrieved after semantic correlation merging. Specifically, in sudden hotspot scenarios, since the hotspot calculation frequency is 1 minute, for consultation statistics analysis of sudden installation and maintenance scenarios, if the consultation volume of a certain issue within 1 minute accounts for 20% of the total consultation volume in the current 1 minute, it is quickly elevated to a hotspot issue for high-priority matching. In regular scenarios without sudden hotspots, the hotspot calculation frequency is 30 minutes. For consultation statistics analysis of installation and maintenance scenarios, if the total consultation volume of a certain issue within 30 minutes accounts for 40% of the total consultation volume, it is elevated to a hotspot issue for high-priority matching. The hotspot identification calculation process is as follows: Figure 7 As shown, it includes:

[0066] Scenario 1: Hot topic emerges, with a hot topic update frequency of 1 minute. If a certain question receives 20% of the current total inquiries per minute, it will be mentioned as a hot topic and matched with high priority: q = self._get_query_id(qa.text) means retrieving the current question ID; if qa_QPM[q] >= current_QPM 20% means if the QPM of the question and answer is greater than or equal to 20% of the current total QPM; hot_query.append(q) means that the question and answer will be promoted to the hot questions and answers, stored in memory, and matched first.

[0067] Scenario 2: In the absence of trending topics, if a certain question receives 40% of the total inquiries every 30 minutes, it will be mentioned as a trending question and given high priority in matching.

[0068] `q = self._get_query_id(qa.text)` means retrieving the current query ID.

[0069] if qa_30_QPM[q] >=current_30_QPM 40% means if the current QPM of the question and answer is greater than or equal to 40% of the current total QPM;

[0070] The `hot_query.append(q)` method elevates the question and answer to the "hot questions and answers" category, stores it in memory, and prioritizes its matching.

[0071] In summary, for sudden hot topic scenarios, since the hot topic frequency is calculated at 1 minute, the consultation statistics analysis for installation and maintenance sudden scenarios sets a priority level: if the consultation volume of a certain issue within 1 minute accounts for 20% of the total consultation volume within that 1 minute, it is quickly elevated to a hot topic and matched with high priority. In regular scenarios without sudden hot topics, the hot topic frequency is calculated at 30 minutes. For consultation statistics analysis of installation and maintenance application scenarios, if the total consultation volume of a certain issue within 30 minutes accounts for 40% of the total consultation volume, it is elevated to a hot topic and matched with high priority.

[0072] Differentiated hotspot removal calculations are performed based on different hotspot update frequencies. In hotspot outbreak scenarios, the system updates frequently, analyzing the decrease in popularity for sudden installation and maintenance events and setting corresponding hotspot reduction identification thresholds. In scenarios without sudden hotspot outbreaks, corresponding low-frequency popularity reduction identification thresholds are set to accurately remove corresponding failed hotspot issues, ensuring identification accuracy. The QPM values ​​here are all semantically correlated data, such as... Figure 8 As shown, it includes:

[0073] Scenario 1: A sudden surge in trending topics. Trending topics update every minute. If the number of inquiries for a particular trending topic falls below 10% of the current total number of inquiries per minute, that topic will be removed from the trending topics list and returned to the list of regular topics.

[0074] `q = self._get_query_id(qa.text)` means retrieving the current query ID.

[0075] if qa_QPM[q] <= current_QPM 10% means: if the QPM of this question and answer is less than or equal to 10% of the current total QPM;

[0076] hot_query.remove(q) means removing the query from the hot queries list;

[0077] The regular_query.append(q) function adds the question back to the list of regular questions.

[0078] Scenario 2: In the absence of trending topics, if a trending topic's consultation volume falls below 20% of the total consultation volume every 30 minutes, remove that topic from the trending topics list and return it to the list of regular topics.

[0079] `q = self._get_query_id(qa.text)` means: retrieve the current query ID.

[0080] if qa_30_QPM[q] <=current_30_QPM 20% means: if the QPM of this question and answer is less than or equal to 20% of the current total QPM;

[0081] hot_query.remove(q) means removing the query from the hot queries list;

[0082] The regular_query.append(q) function adds the question back to the list of regular questions.

[0083] It is understandable that the thresholds of 10% for high-frequency updates and 20% for low-frequency updates are derived from statistical analysis of installation and maintenance Q&A scenarios. Once a hot topic becomes invalid, it is placed in the list of ordinary questions for maintenance, rather than being directly deleted. After the system operation stabilizes, adjustments can be made based on actual conditions until the matching accuracy and efficiency are optimal. The calculation process for removing invalid hot topics, as provided in this embodiment, dynamically monitors the decline in the popularity of hot topics in scenarios without sudden hot topics and scenarios with sudden hot topics. When the current QPM of a certain question is lower than a certain percentage of the current total QPM, the question is removed from the list of hot topics to ensure the accuracy of system retrieval.

[0084] In some embodiments of this application, the specific process of generating the answer to the question to be answered using a preset language model or based on historical question-and-answer data is as follows: searching for a question-and-answer combination that matches the question to be answered from the historical question-and-answer data; if a question-and-answer combination that matches the question to be answered exists in the historical question-and-answer data, generating the answer to the question to be answered based on the matching question-and-answer combination; if no question-and-answer combination that matches the question to be answered exists in the historical question-and-answer data, generating the answer to the question to be answered using a preset language model.

[0085] It is understandable that the question-and-answer retrieval method provided in this application fully captures the timeliness characteristics of business recovery in the installation and maintenance question-and-answer scenario. When a sudden surge in hot issues is detected in real time, the update frequency of hot issues is adjusted to high frequency; when the popularity of hot issues decreases in real time, the update frequency is adjusted to low frequency. Compared with the traditional method with a fixed calculation frequency, this method can avoid the resource waste caused by fixed high-frequency updates and the decline in matching rate caused by fixed low-frequency updates. Through dynamic frequency management, a balance between the real-time retrieval of hot issues and computing resources is effectively achieved. In addition, the question-and-answer retrieval method provided in this application fully extracts the business surge characteristics of the installation and maintenance question-and-answer scenario, monitors the ratio of the number of inquiries for a certain question to the total number of inquiries, and distinguishes between hot and non-hot issues. It accurately captures the surge in hot issues and sets them as high-priority matching. Compared with static knowledge base retrieval and simple semantic question-and-answer table retrieval, the question-and-answer retrieval method provided in this application can efficiently improve the retrieval efficiency of the installation and maintenance question-and-answer support system, especially in scenarios with a surge in similar questions, where the retrieval efficiency is improved by 89%. It should also be noted that the question-and-answer retrieval method provided in this application fully analyzes the trend of declining popularity in the installation and maintenance question-and-answer scenario, monitors the ratio of the number of inquiries for a certain question to the total number of inquiries, and distinguishes between two scenarios: sudden hot topics and sudden non-hot topics. It accurately captures and removes expired hot topics questions and answers, which can effectively avoid low-popularity questions and answers occupying memory resources for a long time and further improve the matching accuracy.

[0086] Figure 9 A question-answering retrieval device is shown, the device comprising:

[0087] The receiving module 90 is used to receive questions to be answered and obtain a set of hot questions and answers at a target time. The question and answer combinations in the set of hot questions and answers are updated according to a preset update frequency, which is dynamically changed based on the number of queries per minute (QPM).

[0088] The first generation module 92 is used to generate an answer to the question to be answered based on the matching question-answer combination when there is a question-answer combination in the hot question-answer set that matches the question to be answered.

[0089] The second generation module 94 is used to generate an answer to the question to be answered by using a preset language model or based on historical question and answer data when there is no question and answer combination that matches the question to be answered in the hot question and answer set.

[0090] The aforementioned question-and-answer retrieval device receives a question to be answered and obtains a set of trending questions and answers at a target time. The question-and-answer combinations in the trending question-and-answer set are updated according to a preset update frequency, which dynamically changes based on the number of queries per minute (QPM). If a question-and-answer combination matching the question exists in the trending question-and-answer set, an answer to the question is generated based on that matching combination. If no matching combination exists in the trending question-and-answer set, an answer is generated using a preset language model or based on historical question-and-answer data. By dynamically updating the question-and-answer combinations in the trending question-and-answer set and prioritizing the retrieval of answers from the trending question-and-answer set, the device avoids retrieving all historical questions, thereby improving the retrieval efficiency of the question to be answered. This solves the technical problem in related technologies where matching the question to be answered with all historical questions leads to low retrieval efficiency.

[0091] The receiving module 90 includes an acquisition submodule, used to acquire a set of hot Q&A at a target time, including: acquiring a preset two-dimensional array of the hot Q&A set, wherein the preset two-dimensional array is used to store the QPM threshold of each preset time period within a preset period; acquiring the target threshold of the target time from the preset two-dimensional array according to the preset time period to which the target time belongs; determining the target scenario corresponding to the target time according to the comparison result between the QPM of the target time and the target threshold; determining the determination strategy of hot Q&A combinations in the hot Q&A set according to the target scenario corresponding to the target time; and determining the hot Q&A set according to the determination strategy.

[0092] The acquisition submodule includes a first determining unit and a second determining unit. The first determining unit is used to determine the target scenario corresponding to the target time based on the comparison result between the QPM at the target time and the target threshold. This includes: determining the target scenario as a hotspot burst scenario when the comparison result indicates that the QPM at the target time is greater than a first multiple of the target threshold; and determining the target scenario as a non-hotspot burst scenario when the comparison result indicates that the QPM at the target time is less than a second multiple of the target threshold, wherein the first multiple is greater than the second multiple.

[0093] The second determining unit is used to determine the determination strategy of hot question and answer combinations in the hot question and answer set according to the target scenario corresponding to the target time, including: when the target scenario is the hot topic outbreak scenario, determining the preset update frequency as a first frequency, and when the target scenario is the no hot topic outbreak scenario, determining the preset update frequency as a second frequency, wherein the first frequency is higher than the second frequency; and determining the determination strategy of hot question and answer combinations in the hot question and answer set according to the preset update frequency.

[0094] The second determining unit includes a determining subunit, configured to determine a determining strategy for hot question-answer combinations in the hot question-answer set based on the preset update frequency, including: when the preset update frequency is the first frequency, determining that the determining strategy is to determine the question-answer combination corresponding to the question to be determined as the hot question-answer combination when the ratio of the QPM of the question to be determined to the current total QPM exceeds a first ratio; and when the preset update frequency is the second frequency, determining that the determining strategy is to determine the question-answer combination corresponding to the question to be determined as the hot question-answer combination when the ratio of the QPM of the question to be determined to the current total QPM exceeds a second ratio, wherein the first ratio is less than the second ratio, and wherein the current total QPM is the total QPM within the update period corresponding to the second frequency.

[0095] The aforementioned question-and-answer retrieval device further includes: a removal submodule, configured to remove the hot question-and-answer combination from the hot question-and-answer set if the ratio of the hot question-and-answer combination to the current total QPM is less than a third ratio when the preset update frequency is the first frequency; and to remove the hot question-and-answer combination from the hot question-and-answer set if the ratio of the hot question-and-answer combination to the current total QPM is less than a fourth ratio when the preset update frequency is the second frequency, wherein the third ratio is less than the fourth ratio.

[0096] The aforementioned question-and-answer retrieval device further includes a generation submodule, used to generate an answer to the question to be answered using a preset language model or based on historical question-and-answer data. This includes: searching for question-and-answer combinations that match the question to be answered from the historical question-and-answer data; generating an answer to the question to be answered based on the matching question-and-answer combination if such a combination exists in the historical question-and-answer data; and generating an answer to the question to be answered using a preset language model if no matching question-and-answer combination exists in the historical question-and-answer data.

[0097] It should be noted that, Figure 9 The question-and-answer retrieval device shown is used to perform Figure 2The question-and-answer retrieval method shown above applies to this question-and-answer retrieval device as well, and will not be repeated here.

[0098] This application also provides a computer device, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor, connected to the memory, is used to execute the above-described question-and-answer retrieval method.

[0099] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the question-and-answer retrieval method in this application.

[0100] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0101] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0103] 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0104] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0105] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or 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 this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0106] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A question-and-answer retrieval method, characterized in that, include: Receive unanswered questions and obtain a set of hot questions and answers at a target time. The question and answer combinations in the set of hot questions and answers are updated according to a preset update frequency, which is dynamically changed based on the number of queries per minute (QPM). If a question-and-answer combination matching the question to be answered exists in the hot question and answer set, an answer to the question to be answered is generated based on the matching question-and-answer combination. If no question-and-answer combination matches the question to be answered in the hot question and answer set, the answer to the question to be answered is generated using a preset language model or based on historical question and answer data.

2. The method according to claim 1, characterized in that, Obtain the set of trending questions and answers at the target time, including: Obtain a preset two-dimensional array of the hot topic Q&A set, wherein the preset two-dimensional array is used to store the QPM threshold for each preset time period within a preset period; The target threshold of the target time is obtained from the preset two-dimensional array according to the preset time period to which the target time belongs; The target scene corresponding to the target time is determined based on the comparison between the QPM at the target time and the target threshold. The strategy for determining the combination of hot questions and answers in the hot question and answer set is determined based on the target scenario corresponding to the target time. The hot topic question and answer set is determined based on the determination strategy.

3. The method according to claim 2, characterized in that, Determining the target scene corresponding to the target time based on the comparison result between the QPM at the target time and the target threshold includes: If the comparison result indicates that the QPM at the target time is greater than a first multiple of the target threshold, the target scenario is determined to be a hotspot burst scenario; If the comparison result indicates that the QPM at the target time is less than a second multiple of the target threshold, the target scenario is determined to be a hotspot-free burst scenario, wherein the first multiple is greater than the second multiple.

4. The method according to claim 3, characterized in that, The strategy for determining the combination of hot questions and answers in the hot question and answer set based on the target scenario corresponding to the target time includes: When the target scenario is the hotspot outbreak scenario, the preset update frequency is determined to be a first frequency; when the target scenario is the non-hotspot outbreak scenario, the preset update frequency is determined to be a second frequency, wherein the first frequency is higher than the second frequency. The strategy for determining the combination of hot questions and answers in the hot question and answer set is based on the preset update frequency.

5. The method according to claim 4, characterized in that, The strategy for determining the combination of hot questions and answers in the hot question and answer set based on the preset update frequency includes: When the preset update frequency is the first frequency, the determination strategy is to determine the question-answer combination corresponding to the question to be determined as the hot question-answer combination when the ratio of the QPM of the question to be determined to the current total QPM exceeds the first ratio. When the preset update frequency is the second frequency, the determination strategy is to determine the question-answer combination corresponding to the question to be determined as the hot question-answer combination when the ratio of the QPM of the question to be determined to the current total QPM exceeds the second ratio. The first ratio is less than the second ratio, and the current total QPM is the total QPM within the update cycle corresponding to the second frequency.

6. The method according to claim 5, characterized in that, The method further includes: If the preset update frequency is the first frequency, and the ratio of the hot topic Q&A combination to the current total QPM is less than the third ratio, then the hot topic Q&A combination will be removed from the hot topic Q&A set. If the preset update frequency is the second frequency, and the ratio of the hot Q&A combination to the current total QPM is less than the fourth ratio, then the hot Q&A combination is removed from the hot Q&A set, wherein the third ratio is less than the fourth ratio.

7. The method according to claim 1, characterized in that, The answer to the question to be answered is generated using a preset language model or based on historical question-and-answer data, including: Find the question-and-answer combination that matches the question to be answered from the historical question-and-answer data; If a question-and-answer combination matching the question to be answered exists in the historical question-and-answer data, an answer to the question to be answered is generated based on the matching question-and-answer combination. If no matching question-and-answer combination exists in the historical question-and-answer data, an answer to the question is generated using a preset language model.

8. A question-and-answer retrieval device, characterized in that, include: The receiving module is used to receive questions to be answered and obtain a set of hot questions and answers at a target time. The question and answer combinations in the set of hot questions and answers are updated according to a preset update frequency, which is dynamically changed based on the number of queries per minute (QPM). The first generation module is used to generate an answer to the question to be answered based on the matching question-answer combination when there is a question-answer combination in the hot question-answer set that matches the question to be answered. The second generation module is used to generate an answer to the question to be answered by using a preset language model or based on historical question and answer data when there is no question and answer combination that matches the question to be answered in the hot question and answer set.

9. A computer device, characterized in that, include: A memory and a processor, wherein the memory is used to store program instructions; The processor, connected to the memory, is used to execute the question-answering retrieval method according to any one of claims 1 to 7.

10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the question-answering retrieval method according to any one of claims 1 to 7.