Large Model Q&A Method, Device, Storage Medium and Equipment Based on Cache Mechanism
By pre-stored questions and answers in the trust domain cache, the response delay and resource waste caused by the existing AI model relying on Internet access is solved, and more efficient question-and-answer processing and a better user experience is achieved.
Patent Information
- Application Number
- CN202510158203.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-02-13
AI Technical Summary
Existing AI models rely heavily on Internet access when answering user questions, resulting in delayed responses, high operating costs and waste of resources.
The big model question and answer method based on the cache mechanism is adopted to read the answers directly from the cache by pre-stored previously processed questions and answers in the trust domain cache, reducing the dependence on big model processing and Internet access.
Improves system response speed, improves processing efficiency, reduces latency, improves user experience, and reduces operating costs and resource waste.
Smart Images

Figure CN119621918B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of large model technologies, and particularly to a large model question-answering method, device, storage medium, and equipment based on a caching mechanism. Background Art
[0002] In today's information society, artificial intelligence (AI) technology, with its excellent data processing and learning capabilities, has demonstrated irreplaceable value in multiple fields, especially in intelligent question-answering systems. By deeply understanding and analyzing users' questions, AI models can quickly provide accurate and valuable information, greatly enhancing the convenience of information acquisition. However, existing AI large models generally rely highly on real-time Internet access when answering users' questions, which poses various challenges.
[0003] The working process of an intelligent question-answering system usually involves receiving a user's question, parsing the question, accessing the Internet to obtain relevant information, generating an answer, and returning it to the user. This process ensures the timeliness and accuracy of the answer, but several deficiencies have emerged in practical applications. The instability of Internet access may lead to system response delays, thereby reducing the user experience; at the same time, frequent Internet access also increases operating costs, especially in areas with high data traffic fees. More critically, for the same or similar questions frequently asked by users, the system needs to access the Internet again each time to generate an answer, which is not only inefficient but also causes a great waste of resources. This repeated Internet access not only further exacerbates the inefficiency problem but also leads to further waste of resources. Summary of the Invention
[0004] In view of this, embodiments of this application provide a large model question-answering method, device, storage medium, and equipment based on a caching mechanism. By pre-storing previously processed questions and answers in the cache, answers can be directly read from the cache without waiting for the large model to process or access the Internet, which can improve the system's response speed, enhance processing efficiency, reduce latency, and thus improve the user experience.
[0005] According to one aspect of this application, a large model question-answering method based on a caching mechanism is provided. The method includes:
[0006] Receiving question description information input by a target question initiator, and querying whether there is first answer information matching the question description information in the cache of the corresponding trusted domain to which the target question initiator belongs;
[0007] If there is first answer information matching the question description information in the cache of the corresponding trusted domain, then feedback the answer to the target question initiator based on the first answer information;
[0008] If there is no first answer information matching the problem description information in the cache of the corresponding trusted domain, then call the large model to generate second answer information corresponding to the problem description information, feedback the answer to the initiator of the target problem based on the second answer information, and store the problem description information and the second answer information in the cache of the corresponding trusted domain after association.
[0009] In an alternative embodiment, if there is first answer information matching the problem description information in the cache of the corresponding trusted domain, then feedback the answer to the initiator of the target problem based on the first answer information, including:
[0010] If there is first answer information matching the problem description information in the cache of the corresponding trusted domain, then verify the validity of the first answer information, feedback the answer to the initiator of the target problem based on the valid first answer information, and when the first answer information has expired, call the large model to generate third answer information corresponding to the problem description information, feedback the answer to the initiator of the target problem based on the third answer information, and store the problem description information and the third answer information in the cache of the corresponding trusted domain after association.
[0011] In an alternative embodiment, verifying the validity of the first answer information includes:
[0012] Verify the timeliness of the first answer information, and when the first answer information contains multiple answer contents, verify one preferred answer content among the multiple answer contents as the valid first answer information. In an alternative embodiment, before calling the large model to generate second answer information corresponding to the problem description information, it further includes:
[0013] Parse the problem description information through the parsing domain to determine the category chain to which the problem description information belongs, where the category chain includes multiple levels of classification categories corresponding to the problem description information;
[0014] Query whether there is a first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache of the parsing domain;
[0015] If there is a first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache, then access the corresponding first target trusted domain based on the first trusted domain access address, and when there is fourth answer information corresponding to the problem description information in the cache of the first target trusted domain, feedback the answer to the initiator of the target problem based on the fourth answer information, otherwise execute the step of calling the large model to generate second answer information corresponding to the problem description information;
[0016] If the first trusted domain access address corresponding to the bottom classification category in the category chain does not exist in the parsing domain cache, access the pointing domain layer by layer based on the multi-layer classification categories of the category chain to obtain the second trusted domain access address corresponding to the bottom classification category in the category chain. Access the corresponding second target trusted domain based on the second trusted domain access address. When the fifth answer information corresponding to the problem description information exists in the cache of the second target trusted domain, feedback the answer to the target problem initiator based on the fifth answer information; otherwise, execute the step of calling the large model to generate the second answer information corresponding to the problem description information.
[0017] In an alternative embodiment, when the fourth answer information corresponding to the problem description information exists in the cache of the first target trusted domain, feeding back the answer to the target problem initiator based on the fourth answer information includes:
[0018] When the fourth answer information corresponding to the problem description information exists in the cache of the first target trusted domain, verify the validity of the fourth answer information, feed back the answer to the target problem initiator based on the valid fourth answer information, and execute the step of calling the large model to generate the second answer information corresponding to the problem description information when the fourth answer information has expired;
[0019] In an alternative embodiment, when the fifth answer information corresponding to the problem description information exists in the cache of the second target trusted domain, feeding back the answer to the target problem initiator based on the fifth answer information includes:
[0020] When the fifth answer information corresponding to the problem description information exists in the cache of the second target trusted domain, verify the validity of the fifth answer information, feed back the answer to the target problem initiator based on the valid fifth answer information, and execute the step of calling the large model to generate the second answer information corresponding to the problem description information when the fifth answer information has expired.
[0021] In an alternative embodiment, accessing the pointing domain layer by layer based on the multi-layer classification categories of the category chain to obtain the second trusted domain access address corresponding to the bottom classification category in the category chain includes:
[0022] Starting from the first classification category in the multi-layer classification categories of the category chain, access the classification domains corresponding to each layer of classification categories in the pointing domain layer by layer to obtain the classification domain access address corresponding to the next layer of classification category until the classification domain access address corresponding to the bottom classification category in the category chain is obtained as the second trusted domain access address, where the pointing domain includes multiple classification domains, the top-level classification domain is the central domain, the bottom-level classification domain is the trusted domain, and the names and access addresses of the corresponding next-layer classification domains are stored in each layer of classification domains.
[0023] In an alternative embodiment, the target question initiator is any one of a plurality of question initiators, and the trust domains to which different question initiators belong are not completely the same. The trust domain cache of each trust domain includes a local cache and a foreign domain cache. The local cache of the trust domain is used to store question description information and corresponding answer information belonging to the classification category of the trust domain proposed by the question initiator corresponding to the trust domain. The foreign domain cache of the trust domain is used to store question description information and corresponding answer information that do not belong to the classification category corresponding to the trust domain proposed by the question initiator corresponding to the trust domain. The answer information includes the answer content or the acquisition address of the answer content, and at least one of the validity period, timestamp, and hit count.
[0024] In an alternative embodiment, the method further includes:
[0025] Count the number of question description information corresponding to the same answer content in each trust domain cache. If the number of the question description information meets the preset high - heat question condition, then associate and store the question description information that meets the preset high - heat question condition and the corresponding answer information in the answer index cache; and / or,
[0026] Count the data size of each answer content in each trust domain cache. If the data size meets the preset large - length answer condition, then associate and store the question description information and the answer information corresponding to the answer content that meets the preset large - length answer condition in the answer index cache;
[0027] Correspondingly, if there is no first answer information matching the question description information in the trust domain cache to which it belongs, then call the large - model to generate second answer information corresponding to the question description information, including:
[0028] If there is no first answer information matching the question description information in the trust domain cache to which it belongs, then query in the answer index cache whether there is sixth answer information matching the question description information;
[0029] If there is sixth answer information matching the question description information in the answer index cache, then feedback the answer to the target question initiator based on the sixth answer information, otherwise execute the step of calling the large - model to generate second answer information corresponding to the question description information.
[0030] In an alternative embodiment, the method further includes:
[0031] Receive trust domain management information, where the trust domain management information is at least one of trust domain creation information, trust domain modification information, and trust domain deletion information input by an administrator who has passed management permission authentication. The management permission of the administrator is valid after being applied by the administrator and granted by the central domain. The management permission includes at least one of trust domain creation permission, modification permission for at least one trust domain, and deletion permission for at least one trust domain;
[0032] Based on the trust domain management information, manage the corresponding trust domain. Among them, the trust domain creation information includes the classification name and description information of the newly created trust domain. The trust domain modification information includes the modified trust domain classification name and / or the modified trust domain description information. The trust domain deletion information includes the name of the trust domain to be deleted.
[0033] According to another aspect of the present application, there is provided a large model question and answer device based on a caching mechanism. The device includes:
[0034] A receiving module, configured to: receive question description information input by a target question initiator, and query whether there is first answer information matching the question description information in the cache of the corresponding belonging trust domain of the target question initiator;
[0035] A feedback module, configured to: if there is first answer information matching the question description information in the cache of the belonging trust domain, perform answer feedback to the target question initiator based on the first answer information; and,
[0036] if there is no first answer information matching the question description information in the cache of the belonging trust domain, call the large model to generate second answer information corresponding to the question description information, perform answer feedback to the target question initiator based on the second answer information, and store the question description information and the second answer information after association in the cache of the belonging trust domain.
[0037] In an optional implementation manner, the feedback module is further configured to:
[0038] if there is first answer information matching the question description information in the cache of the belonging trust domain, verify the validity of the first answer information, perform answer feedback to the target question initiator based on the valid first answer information, and when the first answer information has expired, call the large model to generate third answer information corresponding to the question description information, perform answer feedback to the target question initiator based on the third answer information, and store the question description information and the third answer information after association in the cache of the belonging trust domain.
[0039] In an optional implementation manner, the feedback module is further configured to:
[0040] Verify the timeliness of the first answer information, and when the first answer information contains multiple answer contents, verify one preferred answer content among the multiple answer contents as the valid first answer information.
[0041] In an alternative implementation, the feedback module is further configured to:
[0042] Parse the problem description information through a parsing domain to determine the category chain to which the problem description information belongs, where the category chain includes multiple levels of classification categories corresponding to the problem description information;
[0043] Query whether there is a first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache of the parsing domain;
[0044] If there is a first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache, access the corresponding first target trusted domain based on the first trusted domain access address, and when there is fourth answer information corresponding to the problem description information in the cache of the first target trusted domain, perform answer feedback to the target problem initiator based on the fourth answer information, otherwise execute the step of calling a large model to generate second answer information corresponding to the problem description information;
[0045] If there is no first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache, access the pointing domain layer by layer based on the multiple levels of classification categories of the category chain to obtain a second trusted domain access address corresponding to the bottom-level classification category in the category chain, access the corresponding second target trusted domain based on the second trusted domain access address, and when there is fifth answer information corresponding to the problem description information in the cache of the second target trusted domain, perform answer feedback to the target problem initiator based on the fifth answer information, otherwise execute the step of calling a large model to generate second answer information corresponding to the problem description information.
[0046] In an alternative implementation, the feedback module is further configured to:
[0047] When there is fourth answer information corresponding to the problem description information in the cache of the first target trusted domain, verify the validity of the fourth answer information, perform answer feedback to the target problem initiator based on the valid fourth answer information, and execute the step of calling a large model to generate second answer information corresponding to the problem description information when the fourth answer information has expired;
[0048] When there is fifth answer information corresponding to the problem description information in the cache of the second target trusted domain, performing answer feedback to the target problem initiator based on the fifth answer information includes:
[0049] When the fifth answer information corresponding to the problem description information exists in the cache of the second target trust domain, verify the validity of the fifth answer information, feedback the answer to the target question initiator based on the valid fifth answer information, and when the fifth answer information has expired, execute the step of calling the large model to generate the second answer information corresponding to the problem description information.
[0050] In an alternative embodiment, the feedback module is further configured to:
[0051] Starting from the first-level classification category in the multi-level classification categories of the category chain, access the classification domains corresponding to each level of classification categories layer by layer in the pointing domain to obtain the access address of the classification domain corresponding to the next-level classification category until the access address of the classification domain corresponding to the bottom-level classification category in the category chain is obtained as the second trust domain access address, where the pointing domain includes multiple levels of classification domains, the top-level classification domain is the central domain, the bottom-level classification domain is the trust domain, and the names and access addresses of the corresponding next-level classification domains are stored in each level of classification domain.
[0052] In an alternative embodiment, the target question initiator is any one of multiple question initiators, and the trust domains to which different question initiators belong are not completely the same. The trust domain cache of each trust domain includes a local cache and a foreign domain cache. The local cache of the trust domain is used to store the problem description information and corresponding answer information of the classification categories belonging to the trust domain proposed by the question initiator corresponding to the trust domain, and the foreign domain cache of the trust domain is used to store the problem description information and corresponding answer information of the classification categories that do not belong to the trust domain corresponding to the trust domain proposed by the question initiator corresponding to the trust domain; the answer information includes the answer content or the acquisition address of the answer content, and at least one of the valid time, time stamp, and hit count.
[0053] In an alternative embodiment, it further includes: a statistics module, configured to:
[0054] Statistically count the number of problem description information corresponding to the same answer content in each trust domain cache. If the number of problem description information meets the preset high-popularity problem condition, then associate and store the problem description information that meets the preset high-popularity problem condition and the corresponding answer information in the answer index cache; and / or,
[0055] Statistically count the data size of each answer content in each trust domain cache. If the data size meets the preset large-length answer condition, then associate and store the problem description information and answer information corresponding to the answer content that meets the preset large-length answer condition in the answer index cache;
[0056] Correspondingly, the feedback module is further configured to:
[0057] If there is no first answer information matching the problem description information in the trusted domain cache, query whether there is sixth answer information matching the problem description information in the answer index cache;
[0058] If there is sixth answer information matching the problem description information in the answer index cache, feedback the answer to the target question initiator based on the sixth answer information; otherwise, perform the step of calling the large model to generate the second answer information corresponding to the problem description information.
[0059] In an alternative embodiment, it further includes: a management module, configured to:
[0060] Receive trusted domain management information, where the trusted domain management information is at least one of a trusted domain creation information, a trusted domain modification information, and a trusted domain deletion information input by an administrator who has passed the management permission authentication. The management permission of the administrator is valid after the administrator applies and the central domain grants credit. The management permission includes at least one of a trusted domain creation permission, a modification permission for at least one trusted domain, and a deletion permission for at least one trusted domain;
[0061] Manage the corresponding trusted domain based on the trusted domain management information, where the trusted domain creation information includes the classification name and description information of the newly created trusted domain, the trusted domain modification information includes the modified trusted domain classification name and / or the modified trusted domain description information, and the trusted domain deletion information includes the name of the trusted domain to be deleted.
[0062] According to another aspect of the present application, there is provided a storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned large model question and answer method based on the cache mechanism is implemented.
[0063] According to still another aspect of the present application, there is provided a computer device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the program, the above-mentioned large model question and answer method based on the cache mechanism is implemented.
[0064] With the above technical solutions, a large model question-answering method, device, storage medium, and equipment based on a caching mechanism provided by an embodiment of the present application first query for question answers in the cache of the trusted domain to which the initiator of the target question asked by the user belongs. If the cache hits, the answer is directly fed back. If the cache misses, the large model is called to generate the answer and store it in the cache to provide an answer to the question description information raised by the user. Since the cache stores the questions and answers that have been processed before in the embodiment of the present application, the answer can be directly read from the cache without waiting for the large model to process or Internet access, which can improve the response speed of the system, enhance the processing efficiency, reduce the latency, and thus improve the user experience. Moreover, reducing the frequent access to the Internet means reducing the usage of data traffic. Especially in areas where the data traffic cost is high, this cost-saving effect is more obvious. At the same time, since the use of the cache reduces the unnecessary consumption of computing resources, the operation cost can also be reduced to a certain extent. In addition, the instability of Internet access may lead to system response latency or failure. By introducing the caching mechanism, the dependence on the Internet can be reduced to a certain extent, thereby enhancing the stability and reliability of the system. Even if there are problems with Internet access, the system can still provide answers from the cache to ensure the continuity of the service.
[0065] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically exemplified below. Brief Description of the Drawings
[0066] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0067] Figure 1 A flowchart showing a large model question-answering method based on a caching mechanism provided by an embodiment of the present application is shown;
[0068] Figure 2 A flowchart showing another large model question-answering method based on a caching mechanism provided by an embodiment of the present application is shown;
[0069] Figure 3 A flowchart showing yet another large model question-answering method based on a caching mechanism provided by an embodiment of the present application is shown;
[0070] Figure 4 A flowchart showing a method for iteratively obtaining the trusted domain access address provided by an embodiment of the present application is shown;
[0071] Figure 5The figure shows a schematic structural diagram of a large model question-answering device provided by an embodiment of the present application. Detailed implementation manners
[0072] In the following, the present application will be described in detail with reference to the accompanying drawings and in combination with embodiments. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0073] With the continuous growth of the user base, the repeated queries of common questions have become increasingly frequent, but the existing systems have failed to effectively utilize historical interaction data to optimize the response process. This repeated Internet access not only further exacerbates the problem of inefficiency but also leads to further waste of resources. Therefore, to address these challenges, the present application provides a large model system that can combine Internet access and local data caching, which can significantly improve the response speed, reduce the operation cost, and significantly enhance the user experience.
[0074] In this embodiment, a large model question-answering method based on a caching mechanism is provided. As Figure 1 shown, the method includes:
[0075] Step 101: Receive the question description information input by the target question initiator, and query whether there is a first answer information matching the question description information in the cache of the corresponding trusted domain of the target question initiator.
[0076] Step 102: If there is a first answer information matching the question description information in the cache of the corresponding trusted domain, feedback the answer to the target question initiator based on the first answer information.
[0077] Step 103: If there is no first answer information matching the question description information in the cache of the corresponding trusted domain, call the large model to generate a second answer information corresponding to the question description information, feedback the answer to the target question initiator based on the second answer information, and store the question description information and the second answer information in the cache of the corresponding trusted domain after association.
[0078] In the embodiments of the present application, when a user asks a question through a target question initiator, for the question description information input by the user, it is first queried in the cache of the trusted domain to which the target question initiator belongs. Here, the target question initiator is any one of multiple question initiators. Different users can use the question initiators with which they have usage permissions to ask questions. Each question initiator corresponds to its own trusted domain, and each trusted domain corresponds to its own trusted domain cache. The "cache of the trusted domain to which it belongs" here can be understood as a local or distributed cache system specifically set up for the target question initiator, used to store previously processed questions and their answers. If there is answer information (referred to as the first answer information) in the cache of the trusted domain to which it belongs that matches the current question description information, it means that this question has been processed before and the answer has been cached. The answer information can be the specific answer content or the acquisition address of the answer content. If the first answer information is the specific answer content, the answer can be directly fed back based on this cached answer without having to call the large model again or access the Internet. If the first answer information is the acquisition address of the answer content, then the specific answer content can be obtained through this acquisition address and fed back. If there is no matching answer information in the cache, it means that this is a new question (or the previous answer has expired and has been deleted from the cache). At this time, the large model will be called to generate new answer information and this answer will be fed back to the user. At the same time, the question description information and the generated answer information will be associated to form a question-answer pair and stored in the cache for future reuse of this information.
[0079] By applying the technical solution of this embodiment, first query the question answer in the cache of the trusted domain to which the target question initiator of the user's question belongs. If the cache hits, directly feedback the answer. If it misses, call the large model to generate the answer and store it in the cache to give an answer to the question description information raised by the user. In the embodiments of the present application, since the cache stores the questions and answers that have been processed before, the answer can be directly read from the cache without waiting for the large model to process or access the Internet, which can improve the response speed of the system, enhance the processing efficiency, reduce the latency, and thus improve the user experience. Moreover, reducing the frequent access to the Internet means reducing the usage of data traffic. Especially in areas where the data traffic cost is relatively high, this cost-saving effect is more obvious. At the same time, since the use of the cache reduces the unnecessary consumption of computing resources, the operation cost can also be reduced to a certain extent. In addition, the instability of Internet access may lead to system response latency or failure. By introducing the cache mechanism, the dependence on the Internet can be reduced to a certain extent, thereby enhancing the stability and reliability of the system. Even if there is a problem with Internet access, the system can still provide answers from the cache to ensure the continuity of the service.
[0080] Further, as a refinement and extension of the specific implementation manner of the above embodiment, in order to completely illustrate the specific implementation process of this embodiment, another large model question-answering method based on a caching mechanism is provided, as Figure 2 shown, the method includes:
[0081] Step 201, receive the question description information input by the target question initiator, and query whether there is a first answer information matching the question description information in the cache of the corresponding trusted domain to which the target question initiator belongs.
[0082] In this embodiment, as Figure 3 shown, receive the question description information input by the user through the target question initiator. Subsequently, query whether there is a first answer information matching the question description information in the cache of the corresponding trusted domain to which the target question initiator belongs. In order to quickly respond to questions that already have answers by first querying the trusted domain cache, thereby improving the system response speed and user experience.
[0083] Step 202, if there is a first answer information matching the question description information in the cache of the corresponding trusted domain, verify the validity of the first answer information, feedback the answer to the target question initiator based on the valid first answer information, and when the first answer information has expired, call the large model to generate a third answer information corresponding to the question description information, feedback the answer to the target question initiator based on the third answer information, and store the question description information and the third answer information in the cache of the corresponding trusted domain after association.
[0084] In this embodiment, if there is a first answer information matching the question description information in the trusted domain cache, the validity of the first answer information can be further verified. If the answer is valid, it is directly fed back to the target question initiator. If the answer has expired (for example, because the information is outdated or the cache has expired), the large model is called to generate new answer information (i.e., the third answer information), and the cache is updated. This step ensures that the user receives the latest and valid answer. At the same time, by updating the cache, a faster and more accurate response is provided for future queries.
[0085] In the embodiment of the present application, optionally, in step 202, verifying the validity of the first answer information includes: verifying the timeliness of the first answer information, and verifying a preferred answer content as the valid first answer information among multiple answer contents when the first answer information includes multiple answer contents.
[0086] In the above embodiments, verifying the validity of the first answer information mainly includes two aspects of verification: on the one hand, verifying the timeliness of the first answer information: the timeliness verification is to ensure that the answer information is still accurate and relevant. In a rapidly changing Internet environment, a lot of information may quickly become outdated. Therefore, it is possible to check the timestamp or other timeliness markers of the answer information to determine whether it is still valid. If the answer is outdated, the answer will be considered invalid and it will be necessary to call the large model to generate a new answer. On the other hand, verifying a preferred answer content among multiple answer contents: for the case where there are multiple answer contents, it is necessary to further determine which answer is the most accurate or relevant. This can be achieved through various methods, such as sorting or scoring based on factors such as the number of likes, comments, authoritative source markers, historical accuracy, etc. of the answer. Select the answer with the highest score as the valid first answer information for feedback. Additionally, if all answers do not meet certain quality standards, then it can also be considered that there is no valid answer, and the large model will be called to generate a new answer. Through the verification of timeliness and preferred answer content in the embodiments of the present application, it is possible to ensure that the answers provided to users are the latest and most relevant. What the user receives is an answer that has been screened and verified, increasing the user's trust and satisfaction with the answers provided by the system.
[0087] Step 203, if there is no first answer information matching the problem description information in the trust domain cache, then parse the problem description information through the parsing domain to determine the category chain to which the problem description information belongs, where the category chain includes multiple levels of classification categories corresponding to the problem description information; query whether there is a first trust domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache of the parsing domain.
[0088] In this embodiment, as Figure 3 shown, if there is no matching answer in the trust domain cache, the parsing domain can be further accessed to parse the problem description information. Specifically, the category chain parsing can be achieved through keyword matching, semantic analysis, etc. to determine the category chain to which it belongs. This category chain represents the multi-level classification structure corresponding to the problem description information. Then, query the classification domain access address (i.e., the first trust domain access address) corresponding to the bottom-level classification category in the category chain in the cache of the parsing domain. Through determining the category chain in the embodiments of the present application, it is possible to more accurately locate the field or topic to which the problem belongs, thereby more effectively searching for answers.
[0089] Step 204: If there is a first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache, access the corresponding first target trusted domain based on the first trusted domain access address, and when there is fourth answer information corresponding to the problem description information in the cache of the first target trusted domain, feedback the answer to the target problem initiator based on the fourth answer information; otherwise, execute step 206.
[0090] In this embodiment, if the address is found, the corresponding first target trusted domain can be directly accessed through the first trusted domain access address, and the answer (i.e., the fourth answer information corresponding to the problem description information) can be searched for in its cache. Through the parsing domain cache, the system can quickly locate the trusted domain that may contain the answer, thereby reducing unnecessary search and calculation overhead. Additionally, if the answer information corresponding to the problem description information is not found in the cache of the first target trusted domain, the large model is used to answer the problem description information.
[0091] In an embodiment of the present application, optionally, in step 204, when there is fourth answer information corresponding to the problem description information in the cache of the first target trusted domain, feeding back the answer to the target problem initiator based on the fourth answer information includes: when there is fourth answer information corresponding to the problem description information in the cache of the first target trusted domain, verifying the validity of the fourth answer information, feeding back the answer to the target problem initiator based on the valid fourth answer information, and when the fourth answer information has expired, executing the step of invoking the large model to generate second answer information corresponding to the problem description information.
[0092] In the above embodiment, when the fourth answer information corresponding to the problem description information is found in the cache of the first target trusted domain, in order to ensure the validity of the feedback answer, the validity of the fourth answer information can also be verified first, rather than immediately feeding back the answer information to the target problem initiator. The method of verifying the validity of the fourth answer information is the same as the method of verifying the validity of the first answer information described above and will not be elaborated here. If the fourth answer information is confirmed to be valid after verification, then the answer will be fed back to the target problem initiator based on the verified and valid fourth answer information. In this way, the target problem initiator can obtain a quick and accurate answer. However, if the fourth answer information is determined to have expired after verification, then the step of invoking the large model to generate the second answer information corresponding to the problem description information will be executed. Through the validity verification of the answer in the cache in the embodiment of the present application, even if an answer is found in the cache of the first target trusted domain, it is ensured that the latest and most accurate answer is provided to the user, further improving the accuracy and reliability of the large model question-answering method based on the cache mechanism.
[0093] Step 205: If the first trusted domain access address corresponding to the bottom-level classification category in the classification chain does not exist in the parsing domain cache, access the pointing domain layer by layer based on the multi-level classification categories of the classification chain to obtain the second trusted domain access address corresponding to the bottom-level classification category in the classification chain. Access the corresponding second target trusted domain based on the second trusted domain access address. When the fifth answer information corresponding to the problem description information exists in the cache of the second target trusted domain, feedback the answer to the target question initiator based on the fifth answer information; otherwise, execute step 206.
[0094] In this embodiment, if the first trusted domain access address corresponding to the bottom-level classification category cannot be found in the parsing domain cache, the pointing domain will be accessed layer by layer until the second trusted domain access address corresponding to the bottom-level classification category is found. Then, the second target trusted domain will be accessed, and the answer will be searched in its cache. This step ensures that even when there is no direct trusted domain access address, the possible answer source can be found by accessing the pointing domain layer by layer, increasing the flexibility and applicability of the system.
[0095] In an embodiment of the present application, optionally, in step 205, accessing the pointing domain layer by layer based on the multi-level classification categories of the classification chain to obtain the second trusted domain access address corresponding to the bottom-level classification category in the classification chain includes: starting from the first-level classification category in the multi-level classification categories of the classification chain, accessing the classification domains corresponding to each level of classification categories in the pointing domain layer by layer to obtain the classification domain access address corresponding to the next-level classification category until the classification domain access address corresponding to the bottom-level classification category in the classification chain is obtained as the second trusted domain access address. The pointing domain includes multiple levels of classification domains, the top-level classification domain is the central domain, and the bottom-level classification domain is the trusted domain. The names and access addresses of the corresponding next-level classification domains are stored in each level of classification domain.
[0096] In this embodiment, the pointing domain is a structured information repository that contains multiple levels of classification domains, each corresponding to a specific classification category. The top-level classification domain is usually regarded as the central domain, representing the broadest classification scope, while the bottom-level classification domain is the specific trusted domain that stores information or answers related to specific categories. In an alternative embodiment, such as Figure 3As shown, the classification domain can include four layers, namely the central domain, the sub-domain, the grandchild domain, and the trust domain. In the process of accessing the pointed domain layer by layer through the multi-layer classification categories of the category chain, first, identify the topmost or first-layer classification category to which the problem description information or the problem itself belongs. This category is the starting point of the category chain and defines the general scope or field of the problem. Starting from the top-level classification category, search for the corresponding classification domain in the pointed domain. After accessing the classification domain of the current layer, search for the names and access addresses of the next-layer classification domains stored in this domain. These information are predefined and used to guide the system on how to further delve into more specific classification levels. Continue to repeat the above steps and access layer by layer downward until reaching the classification domain corresponding to the bottom-layer classification category in the category chain. This domain is the second trust domain to be found ultimately, and it stores the information or answers most directly related to the problem. Finally, obtain the access address of the classification domain corresponding to the bottom-layer classification category, that is, the second trust domain access address. Through this address, the system can access the trust domain storing the specific answers or information. By accessing layer by layer for classification, the embodiment of the present application can more accurately locate the trust domain related to the problem, more effectively utilize the cache and storage resources, reduce unnecessary search and access operations, and improve the accuracy and relevance of the retrieved information.
[0097] In an example, as Figure 4 shown, the detailed process of iteratively obtaining the final trust domain address (i.e., the second trust domain access address) is as follows:
[0098] Access the central domain: The parsing domain sends the domain A (classification name) to the central domain. The central domain queries the access address B of the domain A and returns B to the parsing domain.
[0099] Access B: The parsing domain sends the sub-domain A1 (classification name) to the central domain. The central domain queries the access address B1 of the sub-domain A1 and returns B1 to the parsing domain.
[0100] Access B1: The parsing domain sends the sub-domain A1-1 (classification name) to the central domain. The central domain queries the access address B1-1 of the sub-domain A1-1 and returns B1-1 to the parsing domain.
[0101] Access B1-1: The parsing domain sends the final trust domain (classification name) to the central domain. The central domain queries the access address of the final trust domain and returns the address to the parsing domain.
[0102] In an embodiment of the present application, optionally, in step 205, when there is fifth answer information corresponding to the problem description information in the cache of the second target trust domain, feedback of the answer to the target question initiator based on the fifth answer information includes: when there is fifth answer information corresponding to the problem description information in the cache of the second target trust domain, verifying the validity of the fifth answer information, feeding back the answer to the target question initiator based on the valid fifth answer information, and when the fifth answer information has expired, performing the step of calling the large model to generate second answer information corresponding to the problem description information.
[0103] In the above embodiment, when the fifth answer information corresponding to the problem description information is found in the cache of the second target trust domain, in order to ensure the validity of the feedback answer, the validity of the fifth answer information can also be verified first, instead of immediately feeding back the answer information to the target question initiator. The method for verifying the validity of the fifth answer information is the same as the method for verifying the validity of the first answer information described above, and will not be elaborated here.
[0104] Step 206: Call the large model to generate second answer information corresponding to the problem description information, feed back the answer to the target question initiator based on the second answer information, and store the problem description information and the second answer information in the cache of the corresponding trust domain after association.
[0105] In this embodiment, if no matching answer is found in all of the above steps, then call the large model to generate second answer information corresponding to the problem description information and feed it back to the target question initiator. At the same time, the problem description information and the answer information will be associated to form a question-answer pair and stored in the cache of the corresponding trust domain. By calling the large model to generate answers in the embodiments of the present application, problems that have not been encountered before and problems for which the answers have expired can be handled. At the same time, updating the cache ensures that future queries can obtain answers faster.
[0106] In an embodiment of the present application, optionally, the target question initiator is any one of multiple question initiators, and the trust domains to which different question initiators belong are not completely the same. The trust domain cache of each trust domain includes a local cache and an external domain cache. The local cache of the trust domain is used to store problem description information and corresponding answer information belonging to the classification category of the trust domain proposed by the question initiator corresponding to the trust domain, and the external domain cache of the trust domain is used to store problem description information and corresponding answer information that do not belong to the classification category corresponding to the trust domain proposed by the question initiator corresponding to the trust domain; the answer information includes the answer content or the acquisition address of the answer content, and at least one of the valid time, time stamp, and hit count.
[0107] In the above embodiments, the target question initiator is any one of multiple question initiators, that is, the system can process query requests from different question initiators. Different question initiators may belong to different trust domains, that is, the trust domains corresponding to different question initiators can be the same or different. The trust domain can be understood here as a logical grouping used to distinguish different question initiators and the scope or category of the questions they raise. In addition, each trust domain has its own trust domain cache, which includes two parts: a local cache and a foreign domain cache. The local cache is used to store question description information and corresponding answer information that are raised by the question initiator corresponding to this trust domain and belong to the classification category of this trust domain. It can also be understood that the local cache mainly stores questions and answers directly related to this trust domain. The foreign domain cache is used to store question description information and corresponding answer information that are raised by the question initiator corresponding to this trust domain but do not belong to the classification category of this trust domain. This reflects the system's ability to process cross-trust domain questions, that is, it can store and retrieve question answers in other trust domains. Further, the answer information not only includes the answer content itself, but may also include the acquisition address of the answer content. In addition, the answer information also includes metadata such as the valid time, timestamp, and hit count. These metadata help manage the cache content and ensure the timeliness of the answers. The valid time indicates when the answer becomes invalid, helping to identify and clear outdated answers. The timestamp records the time when the answer is stored or updated, helping to track the newness of the answer so as to determine outdated answers as invalid. Ensure that the answers provided to users are accurate, timely, and relevant. The hit count records the number of times the answer is retrieved or used, providing clues to the system about the popularity of the answer.
[0108] In an embodiment of the present application, optionally, it further includes: counting the number of question description information corresponding to the same answer content in each trust domain cache, and if the number of the question description information meets the preset high-heat question condition, associatively storing the question description information that meets the preset high-heat question condition and the corresponding answer information in the answer index cache; and / or, counting the data size of each answer content in each trust domain cache, and if the data size meets the preset large-length answer condition, associatively storing the question description information and the answer information corresponding to the answer content that meets the preset large-length answer condition in the answer index cache;
[0109] Correspondingly, if there is no first answer information matching the problem description information in the cache of the trusted domain to which it belongs, then call the large model to generate second answer information corresponding to the problem description information, including: if there is no first answer information matching the problem description information in the cache of the trusted domain to which it belongs, then query in the answer index cache whether there is sixth answer information matching the problem description information; if there is sixth answer information matching the problem description information in the answer index cache, then feedback the answer to the target question initiator based on the sixth answer information, otherwise execute the step of calling the large model to generate second answer information corresponding to the problem description information.
[0110] In the above embodiments, in order to further improve the efficiency and response speed of the system, especially for frequently occurring problems and long answer content, an answer index cache mechanism may also be introduced in the embodiments of the present application. Specifically, the number of problem description information corresponding to the same answer content in each trusted domain cache can be counted. If the number of a certain problem description information meets the preset high-frequency problem condition (for example, the number of problem description information exceeds a certain threshold), then this problem description information and its corresponding answer information can be associated and stored in the answer index cache. Thus, when the same or similar problem is raised again, the answer can be quickly retrieved directly from the answer index cache without having to call the large model again or traverse the trusted domain cache. In addition, the data size of each answer content in each trusted domain cache can also be counted. If the data size of a certain answer content meets the preset long answer condition (for example, the answer length exceeds a certain number of characters), then the problem description information and answer information corresponding to this answer content can also be associated and stored in the answer index cache. Further, based on the original answer retrieval process, the following optimizations can also be made: when a problem description information is received and it is determined that there is no first answer information matching the problem description information in the trusted domain cache to which it belongs, first query in the answer index cache whether there is answer information matching the problem description information, that is, the sixth answer information. If there is matching sixth answer information in the answer index cache, then directly feedback the answer to the target problem initiator based on this sixth answer information. If there is no matching answer information in the answer index cache, then continue to execute the step of parsing the problem description information through the parsing domain in 203 above. In addition, for the answer information stored in the trusted domain cache, the acquisition address of the answer content included in the answer information can specifically point to the above answer index cache, that is, the specific answer content is obtained from the answer index cache through the acquisition address of the answer content. Of course, the acquisition address of the answer content included in the answer information can also point to other locations, which is not limited here. By introducing the answer index cache mechanism in the embodiments of the present application, the system can retrieve frequently occurring problems and long answer content faster, thereby reducing unnecessary calculations and resource consumption, so that users can obtain answers faster and improve the response speed of the system.
[0111] It should be noted that, in order to further reduce the cache pressure, for the answer content already stored in the answer index cache, if these answer contents are also stored in certain trusted domain caches at the same time, the same answer content in the trusted domain cache can be replaced with the answer address information pointing to the answer index cache. In this way, when the required answer address information is retrieved from the trusted domain cache, the answer content in the answer index cache can be obtained through the answer address information, so as to achieve unified management of frequently occurring and long answer content and reduce the pressure on the trusted domain cache.
[0112] In an embodiment of the present application, optionally, it further includes: receiving trust domain management information, where the trust domain management information is at least one of trust domain creation information, trust domain modification information, and trust domain deletion information input by an administrator who has passed the management authority authentication. The management authority of the administrator is valid after the administrator applies and the central domain grants credit. The management authority includes at least one of a trust domain creation authority, a modification authority for at least one trust domain, and a deletion authority for at least one trust domain; based on the trust domain management information, manage the corresponding trust domain, where the trust domain creation information includes the classification name and description information of the newly created trust domain, the trust domain modification information includes the modified trust domain classification name and / or the modified trust domain description information, and the trust domain deletion information includes the name of the trust domain to be deleted.
[0113] In the above embodiment, in order to enhance the flexibility and manageability of the system, the embodiment of the present application further provides a trust domain management mechanism, which allows an administrator who has passed the management authority authentication to perform operations such as creating, modifying, and deleting trust domains. The system can receive trust domain management information, which is input by an administrator with management authority. The management authority of the administrator is obtained by applying to the central domain and being granted credit, ensuring the legality and security of the administrator's operations. The trust domain management information can include at least one of trust domain creation information, trust domain modification information, and trust domain deletion information. These information respectively correspond to the operations of creating, modifying, and deleting trust domains. Among them, the trust domain creation authority allows the administrator to create a new trust domain, including setting the classification name and description information of the newly created trust domain, etc.; the trust domain modification authority allows the administrator to modify at least one trust domain with management authority, including modifying the classification name, description information, or other relevant attributes of the trust domain; the trust domain deletion authority allows the administrator to delete at least one trust domain with management authority, and the name of the trust domain to be deleted needs to be provided during the operation. Further, based on the received trust domain management information, perform management operations on the corresponding trust domain. Among them, for the trust domain creation information, create a new trust domain and set its classification name and description information according to the provided information, etc. For the trust domain modification information, make corresponding modifications to the specified trust domain according to the provided information. For the trust domain deletion information, delete the specified trust domain to ensure that the trust domain list of the system remains up-to-date and accurate. The embodiment of the present application ensures that only authorized administrators can perform management operations on trust domains by introducing a management authority authentication mechanism, enhancing the security of the system.
[0114] In a specific application scenario, the detailed process of trust domain management is as follows:
[0115] (1) Login and permission verification:
[0116] The management role logs in to the management interface of the trusted domain or trusted entity through the security authentication mechanism. The system verifies the identity and permissions of the management role to ensure that it has the management permissions for a specific trusted domain or trusted entity.
[0117] (2)Classification rule setting:
[0118] The management role enters the "Classification Management" module to view the current classification rule list.
[0119] Create a new classification: The management role clicks "New Classification", enters the classification name and description information, and the interface adds the new classification to the rule list.
[0120] Edit classification: The management role selects the classification to be edited and modifies its name or description information. The interface updates the corresponding rule configuration.
[0121] Delete classification: The management role selects the classification to be deleted. After confirming the operation, the interface removes the classification from the rule list and adjusts the classification attribution of the relevant Q&A pairs.
[0122] (3)Apply for credit:
[0123] The management role enters the "Credit Application" module, fills in the necessary application information, and the interface sends the application information to the central domain for review. The management role can view the application status in real time through the management interface.
[0124] The detailed processing flow of the central domain is as follows:
[0125] (1)Login and permission verification:
[0126] The management role logs in to the management interface of the central domain through the security authentication mechanism.
[0127] The system verifies the identity and permissions of the management role to ensure that it has the management permissions for the central domain.
[0128] (2)Authentication and authorization:
[0129] Review credit application: The management role enters the "Credit Review" module to view the list of applications for trusted domains or trusted entities to be reviewed.
[0130] The management role views the detailed application information and uploaded supporting documents for evaluation. The management role can choose to "approve" or "reject" the application. If approved, the interface generates a unique credit code for the trusted domain or trusted entity and adds it to the global trust list; if rejected, the interface notifies the applicant.
[0131] Revoke credit: The management role can select a trusted domain or trusted entity with granted credit. After confirming the operation, the interface removes the entity from the global trust list and stops its access permission to the interface.
[0132] By applying the technical solution of this embodiment, a multi-level DNS-like architecture answer cache is constructed. By introducing the concept of a trust domain, efficient management and utilization of question-answer pairs are achieved. This design not only solves the problem of resource waste caused by repeated queries in the prior art, but also improves the system's response speed and user experience. In addition, the present invention extends information security and privacy protection. Through the credit mechanism and hierarchical management, the data security within each trust domain or trust body is ensured to be controllable. Compared with traditional AI question-and-answer systems, this solution significantly reduces the dependence on large models by introducing a local cache mechanism, reducing computing power consumption and operating costs. At the same time, since most common questions can be solved locally, the waiting time of users is greatly shortened, and the interaction experience is greatly improved. More importantly, the multi-level architecture and trust domain management mechanism adopted by the present invention not only enhance the security and reliability of the system, but also provide possibilities for personalized services and community co-construction.
[0133] Further, as Figure 1 a specific implementation of the method, an embodiment of the present application provides a large model question-and-answer device based on a cache mechanism, as Figure 5 shown. The device includes:
[0134] A receiving module, configured to: receive question description information input by a target question initiator, and query whether there is first answer information matching the question description information in the cache of the trust domain to which the target question initiator belongs;
[0135] A feedback module, configured to: if there is first answer information matching the question description information in the cache of the trust domain to which it belongs, perform answer feedback to the target question initiator based on the first answer information; and,
[0136] if there is no first answer information matching the question description information in the cache of the trust domain to which it belongs, call a large model to generate second answer information corresponding to the question description information, perform answer feedback to the target question initiator based on the second answer information, and store the question description information and the second answer information in an associated manner in the cache of the trust domain to which it belongs.
[0137] In an alternative embodiment, the feedback module is further configured to:
[0138] If there is first answer information that matches the problem description information in the cache of the corresponding trusted domain, verify the validity of the first answer information, feedback the answer to the initiator of the target question based on the valid first answer information, and when the first answer information has expired, call the large model to generate third answer information corresponding to the problem description information, feedback the answer to the initiator of the target question based on the third answer information, and store the problem description information and the third answer information after association in the cache of the corresponding trusted domain.
[0139] In an alternative embodiment, the feedback module is further configured to:
[0140] Verify the timeliness of the first answer information, and when the first answer information contains multiple answer contents, verify one preferred answer content among the multiple answer contents as the valid first answer information.
[0141] In an alternative embodiment, the feedback module is further configured to:
[0142] Parse the problem description information through the parsing domain to determine the category chain to which the problem description information belongs, where the category chain includes multiple levels of classification categories corresponding to the problem description information;
[0143] Query whether there is a first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache of the parsing domain;
[0144] If there is a first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache, access the corresponding first target trusted domain based on the first trusted domain access address, and when there is fourth answer information corresponding to the problem description information in the cache of the first target trusted domain, feedback the answer to the initiator of the target question based on the fourth answer information, otherwise perform the step of calling the large model to generate second answer information corresponding to the problem description information;
[0145] If there is no first trusted domain access address corresponding to the bottom-level classification category in the category chain in the parsing domain cache, access the pointing domain layer by layer based on the multiple levels of classification categories of the category chain to obtain a second trusted domain access address corresponding to the bottom-level classification category in the category chain, access the corresponding second target trusted domain based on the second trusted domain access address, and when there is fifth answer information corresponding to the problem description information in the cache of the second target trusted domain, feedback the answer to the initiator of the target question based on the fifth answer information, otherwise perform the step of calling the large model to generate second answer information corresponding to the problem description information.
[0146] In an alternative embodiment, the feedback module is further configured to:
[0147] When the fourth answer information corresponding to the problem description information exists in the cache of the first target trust domain, verify the validity of the fourth answer information, feedback the answer to the target problem initiator based on the valid fourth answer information, and when the fourth answer information has expired, execute the step of calling the large model to generate the second answer information corresponding to the problem description information;
[0148] When the fifth answer information corresponding to the problem description information exists in the cache of the second target trust domain, feedback the answer to the target problem initiator based on the fifth answer information, including:
[0149] When the fifth answer information corresponding to the problem description information exists in the cache of the second target trust domain, verify the validity of the fifth answer information, feedback the answer to the target problem initiator based on the valid fifth answer information, and when the fifth answer information has expired, execute the step of calling the large model to generate the second answer information corresponding to the problem description information.
[0150] In an alternative embodiment, the feedback module is further configured to:
[0151] Starting from the first-level classification category in the multi-level classification categories of the category chain, access the classification domains corresponding to each level of classification category in the pointing domain layer by layer to obtain the access address of the classification domain corresponding to the next-level classification category, until the access address of the classification domain corresponding to the bottom-level classification category in the category chain is obtained as the second trust domain access address, where the pointing domain includes multiple levels of classification domains, the top-level classification domain is the central domain, the bottom-level classification domain is the trust domain, and the names and access addresses of the corresponding next-level classification domains are stored in each level of classification domain.
[0152] In an alternative embodiment, the target problem initiator is any one of multiple problem initiators, the trust domains to which different problem initiators belong are not completely the same, the trust domain cache of each trust domain includes a local cache and a foreign domain cache, the local cache of the trust domain is used to store the problem description information and the corresponding answer information of the classification categories belonging to the trust domain proposed by the problem initiator corresponding to the trust domain, and the foreign domain cache of the trust domain is used to store the problem description information and the corresponding answer information of the classification categories that do not belong to the trust domain corresponding to the trust domain proposed by the problem initiator corresponding to the trust domain; the answer information includes the answer content or the acquisition address of the answer content, and at least one of the valid time, timestamp, and hit count.
[0153] In an alternative embodiment, it further includes: a statistics module, configured to:
[0154] Count the number of problem description information corresponding to the same answer content in each trust domain cache. If the number of the problem description information meets the preset high-heat problem condition, associate and store the problem description information that meets the preset high-heat problem condition and the corresponding answer information in the answer index cache; and / or,
[0155] Count the data size of each answer content in each trust domain cache. If the data size meets the preset large-length answer condition, associate and store the problem description information and the answer information corresponding to the answer content that meets the preset large-length answer condition in the answer index cache;
[0156] Correspondingly, the feedback module is further configured to:
[0157] If there is no first answer information matching the problem description information in the trust domain cache to which it belongs, query whether there is a sixth answer information matching the problem description information in the answer index cache;
[0158] If there is a sixth answer information matching the problem description information in the answer index cache, perform answer feedback to the target question initiator based on the sixth answer information, otherwise execute the step of calling the large model to generate the second answer information corresponding to the problem description information.
[0159] In an optional implementation manner, it further includes: a management module, configured to:
[0160] Receive trust domain management information, where the trust domain management information is at least one of trust domain creation information, trust domain modification information, and trust domain deletion information input by an administrator who has passed the management permission authentication. The management permission of the administrator becomes effective after being applied by the administrator and approved by the central domain. The management permission includes at least one of trust domain creation permission, modification permission for at least one trust domain, and deletion permission for at least one trust domain;
[0161] Based on the trust domain management information, manage the corresponding trust domain, where the trust domain creation information includes the classification name and description information of the newly created trust domain, the trust domain modification information includes the modified trust domain classification name and / or the modified trust domain description information, and the trust domain deletion information includes the name of the trust domain to be deleted.
[0162] It should be noted that for other corresponding descriptions of each functional unit involved in the large model question and answer device based on the cache mechanism provided in the embodiments of the present application, reference can be made to Figures 1 to 4 The corresponding description in the method, which will not be elaborated here.
[0163] The embodiments of the present application further provide a computer device, which may specifically be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory, and a communication interface, and may further include an input / output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements the steps in the method embodiments.
[0164] Those skilled in the art can understand that the structure of the above computer device is only a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine some components, or have different component arrangements.
[0165] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program. When the computer program is executed by the processor, it implements the steps in the above method embodiments.
[0166] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, it implements the steps in the above method embodiments.
[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties.
[0168] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0169] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0170] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A large model question answering method based on a cache mechanism, characterized in that: The method comprises: Receive question description information input by the user through the target question initiator, and query whether there is first answer information matching the question description information in the trust domain cache corresponding to the target question initiator; wherein each question initiator corresponds to its own trust domain, and each trust domain corresponds to its own trust domain cache; If the first answer information matching the question description information exists in the trust domain cache, then providing an answer feedback to the target question initiator based on the first answer information; If the first answer information matching the question description information does not exist in the cache of the trust domain to which it belongs, the question description information is parsed through the parsing domain to determine the category chain to which the question description information belongs; based on the multi-layer classification categories of the category chain, the pointing domain is accessed layer by layer to obtain the second trust domain access address corresponding to the bottom-level classification category in the category chain, and the corresponding second target trust domain is accessed based on the second trust domain access address, and when the fifth answer information corresponding to the question description information exists in the cache of the second target trust domain, the answer is fed back to the target question initiator based on the fifth answer information, otherwise the large model is called to generate the second answer information corresponding to the question description information, and the answer is fed back to the target question initiator based on the second answer information, and the question description information and the second answer information are associated and stored in the cache of the trust domain to which it belongs.
2. The large model question answering method based on cache mechanism according to claim 1 is characterized in that: If the first answer information matching the question description information exists in the trust domain cache, then providing an answer feedback to the target question initiator based on the first answer information, including: If there is first answer information matching the question description information in the trust domain cache, the validity of the first answer information is verified, and an answer is fed back to the target question initiator based on the valid first answer information. When the first answer information is invalid, the large model is called to generate third answer information corresponding to the question description information, and an answer is fed back to the target question initiator based on the third answer information. The question description information and the third answer information are associated and stored in the trust domain cache.
3. The large model question answering method based on cache mechanism according to claim 2 is characterized in that: Verifying the validity of the first answer information includes: Verify the timeliness of the first answer information, and if the first answer information contains multiple answer contents, verify a preferred answer content among the multiple answer contents as the valid first answer information.
4. The large model question answering method based on cache mechanism according to claim 1 is characterized in that: After parsing the problem description information through the parsing domain to determine the category chain to which the problem description information belongs, the method further includes: querying whether there is a first trust domain access address corresponding to the bottom classification category in the category chain in the resolution domain cache of the resolution domain; If the first trust domain access address corresponding to the bottom classification category in the category chain exists in the resolution domain cache, then the corresponding first target trust domain is accessed based on the first trust domain access address, and when the fourth answer information corresponding to the question description information exists in the cache of the first target trust domain, the answer is fed back to the target question initiator based on the fourth answer information, otherwise the step of calling the large model to generate the second answer information corresponding to the question description information is executed; If the first trust domain access address corresponding to the bottom classification category in the category chain does not exist in the resolution domain cache, the step of accessing the pointing domain layer by layer based on the multi-layer classification categories of the category chain to obtain the second trust domain access address corresponding to the bottom classification category in the category chain is performed.
5. The large model question answering method based on cache mechanism according to claim 4 is characterized in that: When the fourth answer information corresponding to the question description information exists in the cache of the first target trust domain, providing an answer feedback to the target question initiator based on the fourth answer information includes: When the fourth answer information corresponding to the question description information exists in the cache of the first target trust domain, verify the validity of the fourth answer information, provide an answer feedback to the target question initiator based on the valid fourth answer information, and execute the step of calling the large model to generate the second answer information corresponding to the question description information when the fourth answer information is invalid; When the fifth answer information corresponding to the question description information exists in the cache of the second target trust domain, providing an answer feedback to the target question initiator based on the fifth answer information includes: When the fifth answer information corresponding to the question description information exists in the cache of the second target trust domain, the validity of the fifth answer information is verified, and the answer feedback is provided to the target question initiator based on the valid fifth answer information. When the fifth answer information is invalid, the step of calling the large model to generate the second answer information corresponding to the question description information is executed.
6. The large model question answering method based on cache mechanism according to claim 4 is characterized in that: Accessing the pointing domain layer by layer based on the multi-layer classification categories of the category chain to obtain the second trust domain access address corresponding to the bottom classification category in the category chain includes: Starting from the first layer of classification categories in the multi-layer classification categories of the category chain, the classification domains corresponding to the classification categories of each layer are accessed layer by layer in the pointing domain to obtain the classification domain access address corresponding to the next layer of classification categories, until the classification domain access address corresponding to the bottom layer of classification categories in the category chain is obtained as the second trust domain access address, wherein the pointing domain includes multiple layers of classification domains, the top-level classification domain is the central domain, the bottom-level classification domain is the trust domain, and each layer of classification domain stores the name and access address of the corresponding next layer of classification domain.
7. The large model question answering method based on cache mechanism according to claim 6 is characterized in that: The target question initiator is any one of multiple question initiators, and the trust domains to which different question initiators belong are not exactly the same. The trust domain cache of each trust domain includes a local cache and an external domain cache. The local cache of the trust domain is used to store question description information and corresponding answer information belonging to the classification category of the trust domain proposed by the question initiator corresponding to the trust domain, and the external domain cache of the trust domain is used to store question description information and corresponding answer information that do not belong to the classification category corresponding to the trust domain proposed by the question initiator corresponding to the trust domain; the answer information includes the answer content or the address for obtaining the answer content, as well as at least one of the validity period, timestamp, and number of hits.
8. The large model question answering method based on cache mechanism according to claim 7 is characterized in that: The method further comprises: Counting the number of question description information corresponding to the same answer content in each trust domain cache, if the number of question description information meets the preset high-heat question condition, the question description information meeting the preset high-heat question condition and the corresponding answer information are associated and stored in the answer index cache; and / or, Counting the data size of each answer content in each trust domain cache, if the data size meets the preset large-length answer condition, then associating the question description information and answer information corresponding to the answer content meeting the preset large-length answer condition and storing them in the answer index cache; Correspondingly, if the first answer information matching the question description information does not exist in the trust domain cache, calling the large model to generate the second answer information corresponding to the question description information includes: If the first answer information matching the question description information does not exist in the trust domain cache, querying whether there is sixth answer information matching the question description information in the answer index cache; If there is sixth answer information matching the question description information in the answer index cache, an answer feedback is provided to the target question initiator based on the sixth answer information; otherwise, the step of calling the large model to generate second answer information corresponding to the question description information is executed.
9. The method according to claim 7, characterized in that: The method further comprises: Receiving trust domain management information, wherein the trust domain management information is at least one of trust domain creation information, trust domain modification information, and trust domain deletion information input by an administrator who has passed management authority authentication, the management authority of the administrator is valid after being applied for by the administrator and authorized by the central domain, and the management authority includes at least one of trust domain creation authority, at least one trust domain modification authority, and at least one trust domain deletion authority; Based on the trust domain management information, the corresponding trust domain is managed, wherein the trust domain creation information includes the classification name and description information of the newly created trust domain, the trust domain modification information includes the modified trust domain classification name and / or the modified trust domain description information, and the trust domain deletion information includes the name of the trust domain to be deleted.
10. A large model question-answering device based on a cache mechanism, characterized in that: The device comprises: The receiving module is used to: receive the question description information input by the user through the target question initiator, and query whether there is a first answer information matching the question description information in the trust domain cache corresponding to the target question initiator; wherein each question initiator corresponds to its own trust domain, and each trust domain corresponds to its own trust domain cache; A feedback module is used to: if there is first answer information matching the question description information in the trust domain cache, then provide answer feedback to the target question initiator based on the first answer information; and If the first answer information matching the question description information does not exist in the cache of the trust domain to which it belongs, the question description information is parsed through the parsing domain to determine the category chain to which the question description information belongs; based on the multi-layer classification categories of the category chain, the pointing domain is accessed layer by layer to obtain the second trust domain access address corresponding to the bottom-level classification category in the category chain, and the corresponding second target trust domain is accessed based on the second trust domain access address, and when the fifth answer information corresponding to the question description information exists in the cache of the second target trust domain, the answer is fed back to the target question initiator based on the fifth answer information, otherwise the large model is called to generate the second answer information corresponding to the question description information, and the answer is fed back to the target question initiator based on the second answer information, and the question description information and the second answer information are associated and stored in the cache of the trust domain to which it belongs.
11. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
12. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Data processing method, system and device, equipment and storage medium
CN113343088A
Data processing device and method, electronic equipment and storage medium
CN115827512A
Edge semantic caching method and device based on content delivery network and storage medium
CN119271770A