A large model-based query result acquisition method, device and medium

CN121388150BActive Publication Date: 2026-08-07HANGZHOU YSCREDIT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU YSCREDIT CO LTD
Filing Date
2025-11-05
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0002]当前基于大模型的对话系统通常采用实时生成机制,即针对用户的每次查询请求独立生成响应内容,但这种机制存在着一定的缺陷,例如相同查询在不同会话中可能生成语义差异显著的响应,当用户希望复现先前有价值但未存储的查询结果时,即便输入完全相同的提示词,新生成的内容也可能无法满足用户需求;且现有系统普遍缺乏有效的长期记忆机制,在设备更换、系统重启等场景下,历史交互记录将完全丢失,用户不得不重新发起查询,但受模型随机性与幻觉影响,难以重现先前有价值的内容

Benefits of technology

本发明提供了一种基于大模型的查询结果获取方法,首先基于预设大模型根据目标查询语句输出的目标结果文本,获取目标结果文本对应的结果关键词序列,包含了所有关键词的出现次序,在一定程度上反映出了上下文关键词之间的逻辑关系,进而大致概括了目标结果文本的语义情况;然后将结果关键词序列转换为位图数据结构的目标位图数据,并与目标查询语句关联存储至预设数据库中,将结果关键词序列代替目标结果文本进行存储而极大地节省了存储空间的基础上,又将结果关键词序列转换成位图数据结构进行存储,进一步减少了存储空间的占用且还能提高数据的查询速度;当判断出当前再次接收到目标查询语句时,从预设数据库中得到关联的目标位图数据,并转换为对应的结果关键词序列,最后基于结果关键词序列,通过预设大模型输出与目标结果文本具有较高语义相似度的新结果文本,使得用户即使在不同的设备相同账号或不同账号相同设备上,只要输入相同的目标查询语句,便能得到相似的查询结果,优化了大模型选择性长期记忆的功能,增强了用户的个性化体验,为用户的重复查询提供了很大的便利。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121388150B_ABST
    Figure CN121388150B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data query, in particular to a query result acquisition method and device based on a large model and a medium, the method comprises the following steps: based on a preset large model, acquiring a result keyword sequence corresponding to a target result text output according to a target query statement, converting the result keyword sequence into target bitmap data of a bitmap data structure, and storing the target bitmap data in association with the target query statement in a preset database; when it is judged that the target query statement is received again, obtaining the corresponding result keyword sequence; based on the result keyword sequence, outputting a new result text through the preset large model, and taking the new result text as a current query result corresponding to the target query statement; by storing the logical relationship of the keywords in the query result, the application greatly reduces the occupation of the storage space, improves the query speed when repeatedly querying, and provides great convenience for repeated query of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data query technology, and in particular to a method, device and medium for obtaining query results based on a large model. Background Technology

[0002] Current large-model-based dialogue systems typically employ real-time generation mechanisms, generating response content independently for each user query. However, this mechanism has certain drawbacks. For example, the same query may generate semantically significantly different responses in different sessions. When a user wants to reproduce previously valuable but not stored query results, even with identical input prompts, the newly generated content may not meet the user's needs. Furthermore, existing systems generally lack effective long-term memory mechanisms. In scenarios such as device replacement or system restart, historical interaction records are completely lost, forcing users to re-initiate queries. However, due to model randomness and illusion effects, it is difficult to reproduce previously valuable content. While simply storing all interaction records in existing solutions can solve the problem, it leads to a linear increase in storage space, resulting in significant resource overhead, especially in high-concurrency scenarios, making it undesirable. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides a method, device, and medium for obtaining query results based on a large model. By storing the logical relationships of keywords in the query results, it greatly reduces the storage space occupied and improves the query speed during repeated queries. Furthermore, the selective long-term memory function provides great convenience for users' repeated queries.

[0004] According to a first aspect of the present invention, a method for obtaining query results based on a large model is provided, comprising the following steps: S100: Based on the preset large model, the target result text output according to the target query statement input by the user is used to extract several result keywords from the target result text and obtain the result keyword sequence: the result keyword sequence includes all the orders corresponding to each result keyword.

[0005] S200: Convert the result keyword sequence into target bitmap data of bitmap data structure, and store the target bitmap data and target query statement in a preset database.

[0006] S300: When it is determined that a target query statement is received again, the target bitmap data corresponding to the result keyword sequence associated with the target query statement is retrieved from the preset database, and the target bitmap data is converted into a result keyword sequence; wherein, the device identifier of the target query statement received again is different from that of the previous target query statement, but the account identifier is the same.

[0007] S400, based on the result keyword sequence, outputs new result text through a preset large model, and uses the new result text as the current query result corresponding to the target query statement.

[0008] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the above-described method for obtaining query results based on a large model.

[0009] According to a third aspect of the present invention, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0010] The present invention has at least the following beneficial effects: This invention provides a query result retrieval method based on a large model. First, based on a preset large model, the target result text output by the target query statement is used to obtain the result keyword sequence corresponding to the target result text. This sequence includes the order of occurrence of all keywords, reflecting the logical relationship between context keywords to a certain extent, and thus roughly summarizing the semantics of the target result text. Then, the result keyword sequence is converted into target bitmap data of a bitmap data structure and stored in a preset database in association with the target query statement. This method significantly saves storage space by storing the result keyword sequence instead of the target result text, and further reduces storage space usage and improves query speed by converting the result keyword sequence into a bitmap data structure. When a target query statement is received again, the associated target bitmap data is retrieved from the preset database and converted into the corresponding result keyword sequence. Finally, based on the result keyword sequence, the preset large model outputs new result text with high semantic similarity to the target result text. This allows users to obtain similar query results even on different devices with the same account or different accounts with the same device, as long as the same target query statement is entered. This optimizes the selective long-term memory function of the large model, enhances the user's personalized experience, and greatly facilitates repeated queries. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a method for obtaining query results based on a large model, as provided in an embodiment of the present invention. Detailed Implementation

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

[0014] This invention provides a method for obtaining query results based on a large model, such as... Figure 1 As shown, the method includes the following steps: S100: Based on a pre-defined large model, the target result text output according to the user's input target query statement is used to extract several result keywords from the target result text and obtain a result keyword sequence. The result keyword sequence includes all the orders corresponding to each result keyword; it can be understood that the order is obtained according to the order in which the result keywords appear in the target result text. For example, if the same result keyword appears three times, the three orders of the result keyword are recorded.

[0015] The keyword sequence obtained by the above method contains the order in which all keywords appear, which to some extent reflects the logical relationship between adjacent keywords, and thus roughly summarizes the semantic situation of the target result text. Furthermore, storing the keyword sequence instead of the target result text can greatly save storage space.

[0016] Further, the target result text is obtained through the following steps: S10, input the target query statement into the preset large model, and obtain the first analysis text and the first result text output by the preset large model; it can be understood that the preset large model is the large model used in the dialogue system.

[0017] Specifically, the first analysis text refers to the analysis content output by the pre-set large model based on the input target query statement.

[0018] Furthermore, the first result text refers to the result content output by the pre-defined large model based on the input target query statement.

[0019] S20, obtain several keyword clusters corresponding to the first analysis text, obtain the preset texts with the highest similarity to each keyword cluster from the preset text library, and use the obtained preset texts as key texts; it can be understood that: the preset text library is a library pre-built by a person skilled in the art according to the task requirements, which includes several standard texts for guiding the query. For example, when analyzing bidding companies and related companies, the standard texts for guiding the query can be the texts corresponding to official policy documents.

[0020] The extracted keyword clusters in the first analysis text can represent the general content direction of the first analysis text. By obtaining the similarity between the preset text and the keyword clusters, the accuracy and reliability of the first analysis text can be measured based on the level of similarity, thereby determining whether the obtained results are accurate. Furthermore, by dividing the text into multiple keyword clusters, it can be shown that the target query statement has multiple query directions, enabling a more comprehensive and accurate search for the guidance text corresponding to each query direction.

[0021] Specifically, the following steps are used to obtain several keyword clusters corresponding to the first analyzed text: S21: Obtain the keyword vector of each keyword extracted from the first analyzed text through the trained Word2Vec model, and calculate the semantic correlation between any two keyword vectors using cosine similarity; this can be understood as: using the calculation result of the cosine similarity between two keyword vectors as the semantic correlation between the two keyword vectors.

[0022] S22, obtain the ratio of the character distance between any two keywords in the first analysis text to the total number of characters in the first analysis text, and normalize the reciprocals of all ratios to between 0 and 1 to obtain the distance correlation between any two keywords; it can be understood that the smaller the character distance between two keywords, the greater the corresponding distance correlation.

[0023] S23. The target relevance between any two keywords is calculated by weighting the semantic relevance between any two keyword vectors, the distance relevance between any two keywords, and the preset relevance weights corresponding to the semantic relevance and distance relevance, respectively. Those skilled in the art can set the preset relevance weights according to actual needs, which will not be elaborated here.

[0024] Specifically, the target relevance S between any two keywords meets the following condition: S = W1 × S1 + W2 × S2, where S1 is the semantic relevance between any two keyword vectors, S2 is the distance relevance between any two keyword vectors, and W1 and W2 are the preset relevance weights corresponding to the semantic relevance and distance relevance, respectively.

[0025] S24, based on the target relevance between any two keywords, an adaptive clustering model is used to cluster several keywords to obtain several keyword clusters corresponding to the first analysis text. In another implementation, a k-means clustering model can also be used for clustering, where k is a preset value representing the number of tasks obtained by the large model from the target query statement.

[0026] As mentioned above, when obtaining keyword clusters, not only semantic relevance is considered, but also the character distance in the text. The target relevance between two keywords calculated through these two dimensions is more accurate, thereby improving the clustering accuracy of keyword clusters.

[0027] S30: When the similarity of the key text corresponding to the highest similarity is greater than a preset similarity threshold, the first result text is taken as the target result text; otherwise, based on the target query statement, the first analysis text, and the key text corresponding to the highest similarity, the second analysis text and the second result text are obtained through a preset large model. Those skilled in the art can set the preset similarity threshold according to actual needs, which will not be elaborated here.

[0028] In this process, when the maximum similarity is relatively high, it indicates that the analysis content of the first analyzed text is accurate, and the corresponding result is also reliable. Therefore, the first result text is directly used as the target result text. However, when the maximum similarity is still relatively low, it indicates that the accuracy of the analysis content of the first analyzed text is insufficient. Therefore, a query needs to be performed again. The first analyzed text and the corresponding key text with the highest similarity are automatically introduced as query content. As the query background, a search is performed again in the background, providing more query information and making the search result text more reliable, reducing the illusion of large models in text analysis.

[0029] In one implementation, the following steps are included after step S30: S31, when the similarity of the key text with the highest similarity is not greater than the preset similarity threshold, determine whether the difference between the preset similarity threshold and the similarity of the key text with the highest similarity is less than the preset difference threshold.

[0030] S32, if the difference between the preset similarity threshold and the similarity of the corresponding key text with the highest similarity is less than the preset difference threshold, then continue to execute step S40.

[0031] In another embodiment, after step S30 and before step S50, the following steps are also included: S001, when the similarity of the key text with the highest similarity is not greater than the preset similarity threshold, determine whether the difference between the preset similarity threshold and the similarity of the key text with the highest similarity is less than the preset difference threshold.

[0032] S002, if the difference between the preset similarity threshold and the similarity of the corresponding highest similarity key text is not less than the preset difference threshold, merge the 1-k analysis texts as the new first analysis text, merge the 1-k corresponding highest similarity key texts as the new corresponding highest similarity key texts, and take the kth result text as the new first result text, then return to step S20 until the target result text is obtained or the number of iterations reaches the preset iteration number threshold; this can be understood as: when the difference between the preset similarity threshold and the similarity of the corresponding highest similarity key text is less than the preset difference threshold during the iteration process, proceed to step S32.

[0033] Specifically, k represents the total number of all analyzed texts obtained.

[0034] The above considers the difference between the maximum similarity and the preset similarity threshold. When the difference is small, the query is repeated according to the original query method. That is, each time the background query is performed, the previous analysis text and the corresponding key text with the highest similarity are added. When the difference is large, it indicates that the previous analysis results are limited and not accurate enough. Therefore, all analysis texts and all corresponding key texts with the highest similarity are superimposed as query content, increasing a large amount of query key information, making the query results more comprehensive and the analysis more accurate, and further reducing the illusion generated by large models in text search.

[0035] S40, the second analysis text and the second result text are respectively used as the new first analysis text and the first result text, and the process returns to step S20 until the target result text is obtained or the number of iterations reaches the preset number of iterations threshold.

[0036] As mentioned above, when the number of iterations is too large, a large amount of query content will be generated, which will lead to a decrease in response speed, the obtained information will be too long and it will be impossible to find accurate and effective information. It will also cause a decrease in query accuracy. Therefore, the number of iterations is limited to ensure that there is enough query information input, while also ensuring the accuracy and reliability of query results to a large extent.

[0037] Furthermore, the preset iteration threshold is obtained through the following steps: S01, the number of iterations to be optimized is calculated based on the number of keywords in the original first analysis text, the ratio of the total number of characters of the keywords to the total number of characters of the original first analysis text, and the similarity of the key text with the highest similarity. The number of iterations to be optimized is inversely proportional to the number of keywords, the ratio of the number of characters, and the similarity.

[0038] Specifically, the number of iterations K to be optimized meets the following conditions: K = λ1 / R1 + λ2 / R2 + λ3 / R3, where R1 is the normalized value corresponding to the number of keywords, ranging from 0 to 1; R2 is the ratio of the number of characters; R3 is the similarity; and λ1, λ2, and λ3 are the preset weights of the number of keywords, the ratio of the number of characters, and the similarity, respectively. In specific implementation, the number of keywords can be normalized according to the activation function.

[0039] S02, the number of iterations to be optimized is rounded down to obtain a preset iteration threshold. In specific implementations, those skilled in the art may use rounding up or rounding down according to actual needs.

[0040] As mentioned above, since a larger number of keywords, a higher ratio of character counts, and a higher similarity indicate more key information in the query statement, it is easier to find accurate and reliable result text. Therefore, a smaller iteration threshold is set, and vice versa. The iteration threshold calculated by the above formula is more reasonable and optimizes the iteration process.

[0041] S50: If the target result text is not obtained when the number of iterations reaches the preset iteration threshold, the latest obtained result text is used as the target result text.

[0042] As mentioned above, if the number of iterations has reached the preset iteration threshold and a reliable target result text has not been obtained, it indicates that the content being queried is significantly different from the guidance text in the preset text library. Even if the iteration continues, it will be difficult to find a result that meets the requirements. Furthermore, too many iterations will cause a further decrease in response speed and query accuracy. Therefore, the iteration is stopped, and the latest result text is used as the target result text, which to a certain extent ensures the reliability of the result text.

[0043] S200: Convert the result keyword sequence into target bitmap data of bitmap data structure, and store the target bitmap data and target query statement in a preset database.

[0044] Specifically, in step S200, converting the result keyword sequence into target bitmap data of a bitmap data structure includes the following steps: S201, assign a unique integer index to each result keyword according to the order of each result keyword in the result keyword sequence; this can be understood as: the integer indices assigned in sequence according to the order of the result keywords are 0, 1, 2, etc.

[0045] S202, create an initial bit array based on the largest value among the integer indices corresponding to several result keywords. For example, when the largest value is 9, since memory allocation must be an integer multiple of bytes, 2 bytes, or 16 bits, are needed to mark the indices of all result keywords.

[0046] S203, for each result keyword, the corresponding bit position in the bit array is set to 1 according to the integer index of the result keyword, so as to obtain the target bitmap data corresponding to the result keyword sequence.

[0047] As mentioned above, storing all query results would result in a huge amount of storage, which would be difficult for the system to maintain. By using the above storage method, the result keyword sequence is stored instead of the target result text, which greatly saves storage space. Furthermore, the result keyword sequence is converted into a bitmap data structure for storage, which further reduces the storage space occupied and has extremely fast query speed.

[0048] S300, when it is determined that the target query statement is received again, the target bitmap data corresponding to the result keyword sequence associated with the target query statement is retrieved from the preset database, and the target bitmap data is converted into the result keyword sequence; it can be understood that: receiving the target query statement again means that the query statement received again is exactly the same as the target query statement or only differs from meaningless words and / or meaningless punctuation.

[0049] In one implementation, the device identifier for receiving the target query statement again is different from that for the previous time, but the account identifier is the same; this can be understood as: the query dialog box has been changed.

[0050] As described above, by storing the result keyword sequence, the approximate semantics and logical content of the result text corresponding to the target query statement can be preserved, realizing the selective long-term memory function of the large model. When a user wants to get the results of a previous query, but changes devices due to limitations, they can still get new result text similar to the historical query results based on the re-entered target query statement. This ensures user data privacy to a certain extent, provides great convenience for users' queries, and enhances the user experience.

[0051] In another implementation, the following steps are also included: If the target query statement received again has the same device identifier as the target query statement received previously, but a different account identifier, then based on the received target query statement, the target bitmap data corresponding to the result keyword sequence associated with the target query statement is retrieved from the preset database, and the target bitmap data is converted into the result keyword sequence; this can be understood as: in this implementation, the searcher has been changed.

[0052] In this implementation, for scenarios involving the same device but different accounts, the current searcher and the user of that device are considered to be closely related searchers, such as those in charge of the same project. When a user wants to obtain the results of a previous query, but the device user is not present and it is inconvenient to disclose their account, even if the account has been changed, a new result text similar to the historical query results can still be obtained after entering the target query statement. This storage method expands the scope of application scenarios, enhances the user experience, and has a positive effect on improving the user's work efficiency.

[0053] Furthermore, step S300 also includes the following steps: S301, determine the time interval between the currently received target query statement and the most recently received target query statement; this can be understood as: the most recently received target query statement refers to the target query statement received under the premise that the device identifier is different but the account identifier is the same, or the device identifier is the same but the account identifier is different.

[0054] S302, if the time interval is not greater than a preset duration, the step described above retrieves the target bitmap data corresponding to the result keyword sequence associated with the target query statement from the preset database, and converts the target bitmap data into a result keyword sequence. Those skilled in the art can set the preset duration according to actual needs, for example, setting a specific duration based on the update speed of the query domain; the faster the update speed, the shorter the preset duration.

[0055] S303, If the time interval is longer than the preset duration, send a prompt to the currently logged-in account asking whether to reference historical query results.

[0056] S304, if the received feedback result is yes, execute the step described above to find the target bitmap data corresponding to the result keyword sequence associated with the target query statement from the preset database, and convert the target bitmap data into the result keyword sequence; otherwise, re-analyze the target query statement through the preset large model and output the current query result corresponding to the target query statement.

[0057] As mentioned above, considering the timely updating nature of information, the dimension of the time interval between two target query results is introduced. When the time interval is short, the above method can be used, that is, the query results can be obtained based on the keyword sequence of historical results. However, when the time interval is long, the query results obtained based on the keyword sequence of historical results may be incomplete or inaccurate. Therefore, the user decides whether to search again to obtain the query results required by the user.

[0058] S400, based on the result keyword sequence, outputs new result text through a preset large model, and uses the new result text as the current query result corresponding to the target query statement; it can be understood that the preset large model re-analyzes the result keyword sequence and outputs new result text.

[0059] As described above, when the same target query is entered, the large model with long-term memory function obtained in the above manner can find the historical result keyword sequence corresponding to the target query. Based on the result keyword sequence, semantic analysis and text filling are performed to obtain new result text with high semantic similarity. This allows users to get similar query results even if they are on different devices with the same account or different accounts with the same device, as long as they enter the same target query. This realizes the function of selective long-term memory, enhances the user's personalized experience, and effectively improves the user's query speed by obtaining the result text based on the result keyword sequence.

[0060] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.

[0061] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0062] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims

1. A method for obtaining query results based on a large model, characterized in that, The method includes the following steps: S100, based on the preset large model, the target result text output according to the target query statement input by the user is used to extract several result keywords from the target result text and obtain the result keyword sequence: the result keyword sequence includes all the orders corresponding to each result keyword; S200, convert the result keyword sequence into target bitmap data of bitmap data structure, and associate the target bitmap data with the target query statement and store it in the preset database; S300: When it is determined that a target query statement is received again, the target bitmap data corresponding to the result keyword sequence associated with the target query statement is retrieved from the preset database, and the target bitmap data is converted into a result keyword sequence; wherein, the device identifier of the target query statement received again is different from that of the previous target query statement received, but the account identifier is the same. S400, based on the result keyword sequence, outputs new result text through a preset large model, and uses the new result text as the current query result corresponding to the target query statement.

2. The method for obtaining query results based on a large model according to claim 1, characterized in that, In step S200, converting the result keyword sequence into target bitmap data of a bitmap data structure includes the following steps: S201, Assign a unique integer index to each result keyword according to the order of each result keyword in the result keyword sequence; S202, create an initial bit array based on the maximum value among the integer indices corresponding to several result keywords; S203, for each result keyword, the corresponding bit position in the bit array is set to 1 according to the integer index of the result keyword, so as to obtain the target bitmap data corresponding to the result keyword sequence.

3. The method for obtaining query results based on a large model according to claim 1, characterized in that, The S300 procedure also includes the following steps: If the target query statement received again has the same device identifier as the target query statement received previously, but a different account identifier, then based on the received target query statement, the target bitmap data corresponding to the result keyword sequence associated with the target query statement is retrieved from the preset database, and the target bitmap data is converted into the result keyword sequence.

4. The method for obtaining query results based on a large model according to claim 1 or 3, characterized in that, The S300 procedure also includes the following steps: S301, determine the time interval between the currently received target query statement and the most recently received target query statement; S302, if the time interval is not greater than the preset duration, execute the step described above to find the target bitmap data corresponding to the result keyword sequence associated with the target query statement from the preset database, and convert the target bitmap data into the result keyword sequence; S303, If the time interval is greater than the preset duration, send a prompt to the currently logged-in account asking whether to reference historical query results; S304, if the received feedback result is yes, execute the step described above to find the target bitmap data corresponding to the result keyword sequence associated with the target query statement from the preset database, and convert the target bitmap data into the result keyword sequence; otherwise, re-analyze the target query statement through the preset large model and output the current query result corresponding to the target query statement.

5. The method for obtaining query results based on a large model according to claim 1, characterized in that, Obtain the target result text by following these steps: S10, Input the target query statement into the preset large model, and obtain the first analysis text and the first result text output by the preset large model; S20, obtain several keyword clusters corresponding to the first analysis text, obtain the preset texts with the highest similarity to each keyword cluster from the preset text library, and use the obtained preset texts as key texts; S30, when the similarity of the key text corresponding to the highest similarity is greater than the preset similarity threshold, the first result text is taken as the target result text; Conversely, based on the target query, the first analysis text, and the corresponding key text with the highest similarity, the second analysis text and the second result text are obtained through a pre-set large model; S40, the second analysis text and the second result text are respectively used as the new first analysis text and the first result text, and the process returns to step S20 until the target result text is obtained or the number of iterations reaches the preset number of iterations threshold. S50: If the target result text is not obtained when the number of iterations reaches the preset iteration threshold, the latest obtained result text is used as the target result text.

6. The method for obtaining query results based on a large model according to claim 5, characterized in that, In step S20, several keyword clusters corresponding to the first analyzed text are obtained through the following steps: S21, obtain the keyword vector of each keyword extracted from the first analysis text through the trained Word2Vec model, and calculate the semantic correlation between any two keyword vectors through cosine similarity. S22, obtain the ratio of the character distance between any two keywords in the first analysis text to the total number of characters in the first analysis text, and normalize the reciprocal of all ratios to between 0 and 1 to obtain the distance correlation between any two keywords; S23. The target relevance between any two keywords is calculated by weighted summing based on the semantic relevance between any two keyword vectors, the distance relevance between any two keywords, and the preset relevance weights corresponding to the semantic relevance and the distance relevance respectively. S24. Based on the target correlation between any two keywords, several keywords are clustered using an adaptive clustering model to obtain several keyword clusters corresponding to the first analysis text.

7. The method for obtaining query results based on a large model according to claim 5, characterized in that, The preset iteration threshold is obtained through the following steps: S01, the number of iterations to be optimized is calculated based on the number of keywords in the original first analysis text, the ratio of the total number of characters of the keywords to the total number of characters of the original first analysis text, and the similarity of the key text with the highest similarity; the number of iterations to be optimized is inversely proportional to the number of keywords, the ratio of the number of characters, and the similarity. S02, round down the number of iterations to be optimized to obtain the preset iteration threshold.

8. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the query result retrieval method based on a large model as described in any one of claims 1-7.

9. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 8.

Citation Information

Patent Citations

  • Database construction method and device and storage medium

    CN117332034A

  • Retrieval enhancement generation method and retrieval enhancement generation system

    CN120336467A