Scheme recommendation method and device, electronic equipment and computer program product

By generating general solutions and combining user problems, we search recommended solutions from the solution database, the shortcomings in semantic understanding of traditional technical solutions are solved, and the accuracy of search results is significantly improved.

CN120104780APending Publication Date: 2025-06-06LINGYANG IND INTERNET (ZHEJIANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510056668.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Traditional technical solutions lack in-depth semantic understanding when dealing with problems, resulting in inaccurate search results.

Method used

Improve the accuracy of search results by generating a universal solution for user problems and combining user problems with a universal solution to retrieve recommended solutions from the solution database.

Benefits of technology

By combining the questions and answers for contextual understanding, the semantic richness of the query statement can be improved, thereby significantly improving the accuracy of the search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104780A_ABST
    Figure CN120104780A_ABST
Patent Text Reader

Abstract

The invention provides a scheme recommendation method and device, electronic equipment and a computer program product, and the method can generate a general solution for a user problem based on the obtained user problem, and then retrieves a recommendation solution corresponding to the user problem from a scheme database according to the user problem and the general solution; wherein the scheme database is used for storing a plurality of preset solutions. Through the setting, the query statement is not limited to the question, but can be combined with the question and the answer to perform context understanding, so that the semantic richness of the query statement is improved, and the accuracy of a retrieval result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of solution recommendation, and in particular to a solution recommendation method, device, electronic device and computer program product. Background Art

[0002] When dealing with problems, traditional technical solutions are usually limited by the problem itself and lack in-depth semantic understanding, resulting in inaccurate search results. Therefore, how to improve the accuracy of search results has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0003] In view of this, the present application proposes a solution recommendation method, which can improve the accuracy of search results.

[0004] The technical solutions proposed in this application are as follows:

[0005] In a first aspect, an embodiment of the present application provides a solution recommendation method, comprising:

[0006] Based on the acquired user problems, generate a general solution for the user problems;

[0007] According to the user problem and the general solution, a recommended solution corresponding to the user problem is retrieved from a solution database; wherein the solution database is used to store a plurality of preset solutions.

[0008] Furthermore, in the above method, generating a general solution to the user problem based on the acquired user problem includes:

[0009] The user question is input into a pre-trained question-answering model so that the question-answering model generates a general solution to the user question.

[0010] Furthermore, in the above method, the step of retrieving a recommended solution corresponding to the user problem from a solution database according to the user problem and the general solution includes:

[0011] Splicing the user problem and the general solution to obtain a spliced ​​document;

[0012] One or more solutions with the highest similarity to the spliced ​​document are retrieved from the solution database as recommended solutions corresponding to the user problem.

[0013] Furthermore, in the above method, retrieving from the solution database one or more solutions with the highest similarity to the spliced ​​document as recommended solutions corresponding to the user problem includes:

[0014] Calculating respectively a first similarity and a second similarity between the concatenated document and each solution in the solution database; wherein the first similarity is determined based on a vectorized search, and the second similarity is determined based on a full-text search;

[0015] The similarity between the spliced ​​document and each solution in the solution database is determined according to the first similarity and the second similarity, and one or more solutions in the solution database with the highest similarity to the spliced ​​document are determined as recommended solutions corresponding to the user problem.

[0016] Furthermore, in the above method, the step of calculating the first similarity between the concatenated document and each solution in the solution database includes:

[0017] Using a large language model, converting the concatenated document into a query vector;

[0018] The cosine similarity between the query vector and the solution vector corresponding to each solution in the solution database is calculated as the first similarity; wherein each solution in the solution database is converted into a solution vector using the large language model.

[0019] Furthermore, in the above method, the step of calculating the second similarity between the concatenated document and each solution in the solution database includes:

[0020] Determine a query keyword of the concatenated document, and calculate the occurrence frequency of the query keyword in each solution in the solution database;

[0021] According to the occurrence frequency of the query keyword in each solution in the solution database, a second similarity between the concatenated document and each solution in the solution database is determined.

[0022] Furthermore, in the above method, the step of calculating the occurrence frequency of the query keyword in each solution in the solution database includes:

[0023] Screening the solution database to obtain a target solution associated with the query keyword;

[0024] The occurrence frequency of the query keyword in each target solution in the solution database is calculated.

[0025] Furthermore, in the method described above, the recommended solution includes a solution for solving the user problem, and / or recommendation information of a product required for the solution to solve the user problem, and the product recommendation information includes sales information of the product.

[0026] In a second aspect, an embodiment of the present application provides a solution recommendation device, including:

[0027] A generation module, used to generate a general solution to the user problem based on the acquired user problem;

[0028] A retrieval module is used to retrieve a recommended solution corresponding to the user problem from a solution database based on the user problem and the general solution; wherein the solution database is used to store multiple preset solutions.

[0029] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0030] A memory and a processor; wherein the memory is used to store programs; and the processor is used to implement any of the methods described above by running the programs in the memory.

[0031] In a fourth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the computer program implements any one of the above methods. Optionally, the computer program can be stored in a readable storage medium of a computer device or in the cloud; the processor of the computer device reads the computer program from the readable storage medium or the cloud.

[0032] The solution recommendation method proposed in this application can generate a general solution for the user problem based on the acquired user problem, and then retrieve the recommended solution corresponding to the user problem from the solution database based on the user problem and the general solution; wherein the solution database is used to store multiple preset solutions. With this setting, the query statement is no longer limited to the question itself, but can be combined with the question and the answer for contextual understanding, thereby improving the semantic richness of the query statement and thus improving the accuracy of the retrieval results. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0034] Figure 1 It is a schematic diagram of an application scenario of a solution recommendation method provided in an embodiment of the present application.

[0035] Figure 2 It is a flowchart of a solution recommendation method provided in an embodiment of the present application.

[0036] Figure 3 It is a schematic diagram of a flow chart of calculating the second similarity provided in an embodiment of the present application.

[0037] Figure 4 It is a structural schematic diagram of a solution recommendation device provided in an embodiment of the present application.

[0038] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] When dealing with a problem, the traditional technical solution is to search for a solution to the problem based on the problem raised. However, this method is often limited by the problem itself and cannot provide in-depth semantic understanding, resulting in inaccurate search results and poor stability. Therefore, how to improve the accuracy of search results has become a technical problem that needs to be solved urgently by those skilled in the art.

[0041] Based on this, the present application proposes a solution recommendation method, device, electronic device and computer program product. The technical solution searches for solutions based on user problems and general solutions, thereby achieving the effect of improving the accuracy of retrieval results.

[0042] This will be specifically described by the following examples.

[0043] Figure 1 The feasible application scenarios of the solution recommendation method are shown, such as Figure 1 In the scenario shown, a client and a server are set up.

[0044] The client can be an electronic device with network access capability. Specifically, for example, the client can be a desktop computer, a tablet computer, a laptop computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a television, etc. Among them, the smart wearable device includes but is not limited to a smart bracelet, a smart watch, a smart glasses, a smart helmet, a smart necklace, etc. Alternatively, the client can also be software that can run in an electronic device.

[0045] The server can be an electronic device with certain computing and processing capabilities. It can have a network communication module, a processor, and a memory, etc. Of course, the server can also refer to software running in an electronic device. The server can also be a distributed server, which can be a system with multiple processors, memories, network communication modules, etc. operating in collaboration. Alternatively, the server can also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server can also be a new technical means that can realize the corresponding functions of the implementation method of the specification. For example, it can be a new form of "server" based on quantum computing.

[0046] The client and the server can communicate through the target network. The target network can be any type of network. For example, the target network can be a network that can be subdivided into multiple subnetworks. The target network or the multiple subnetworks contained in the target network can be at least one of a cellular mobile network (such as 2G, 3G, 4G or 5G), ZIGBEE, WIFI, Bluetooth, or any combination of at least one of these networks and other networks.

[0047] In the above feasible application scenario, the client obtains the user's question and sends it to the server; based on the obtained user question, the server generates a general solution for the user's question, retrieves the recommended solution corresponding to the user's question from the solution database according to the user's question and the general solution, and sends the recommended solution to the client; the client displays the recommended solution to the user. With this setting, the query statement is no longer limited to the question itself, but can be combined with the question and the answer for contextual understanding, which improves the semantic richness of the query statement and thus improves the accuracy of the retrieval results.

[0048] Furthermore, the embodiment of the present application proposes a solution recommendation method, which can be executed by an electronic device, which can be any device with data and instruction processing functions, for example, a notebook computer, a tablet computer, a desktop computer, a mobile device (for example, a mobile phone, a personal digital assistant, a dedicated messaging device) and other types of user terminals or a combination of any two or more of these electronic devices, or a server, for example, the server in the above embodiment. Figure 2 As shown, the method includes:

[0049] S101. Generate a general solution to the user problem based on the acquired user problem.

[0050] The above-mentioned user problems refer to the problems that need to be solved in this embodiment; the general solution refers to one or more general solutions that can solve the user problems.

[0051] For example, if the user's question is "Our products are prone to bumps and scratches during transportation. Is there any good solution?", the general solution to this user's question is "1. Choose thick cartons or wooden boxes for packaging, and use foam, pearl cotton, anti-collision pads, and right-angle corner protectors for auxiliary packaging and blocking to prevent the goods from shaking and colliding during transportation. 2. Choose suitable containers. Special containers must be used to ship products. 3. Shockproof packaging can avoid vibrations or collisions caused by transportation diagrams, and can reduce mechanical damage to goods caused by transportation."

[0052] In this embodiment, a user question is obtained, and then a general solution to the user question is generated. The user question can be input into a large language model (LLM) to ask the LLM questions based on the user question, and the answer returned by the LLM is used as a general solution to the user question; the user question can also be searched based on a search engine, and the searched answer is used as a general solution to the user question, which is not limited in this embodiment.

[0053] S102: According to the user's problem and the general solution, a recommended solution corresponding to the user's problem is retrieved from a solution database.

[0054] The solution database is used to store a plurality of preset solutions. That is, in the embodiment of the present application, solutions are prepared in advance and are stored in the solution database.

[0055] In the embodiment of the present application, the user question and the general solution are used as query statements, and the recommended solution corresponding to the user question is retrieved from the solution database. In this embodiment, the user question and the general solution are used as query statements, and the context is understood by combining the question and the answer. Compared with the prior art that only uses the user question as the query statement, the semantic richness of the query statement can be improved, thereby improving the accuracy of the retrieval results.

[0056] In some embodiments, the recommended solutions corresponding to the user problem are retrieved from the solution database by calculating vector similarity. Specifically, the solutions stored in the solution database can be converted into vector representations in advance, and after obtaining the user problem and the general solution corresponding to the user problem, the user problem and the general solution are spliced ​​together to obtain a spliced ​​document, and then the spliced ​​document is converted into a vector representation, and the vector similarity between the vector representation of the spliced ​​document and the vector representation of each solution in the solution data is calculated as the similarity between the spliced ​​document and each solution in the solution database, and then one or more solutions with the highest similarity are selected as the recommended solutions corresponding to the user problem.

[0057] In the above embodiment, a general solution to the user's problem can be generated based on the acquired user's problem, and then a recommended solution corresponding to the user's problem can be retrieved from the solution database based on the user's problem and the general solution; wherein the solution database is used to store multiple preset solutions. With such a setting, the query statement is no longer limited to the question itself, but can be combined with the question and the answer for contextual understanding, thereby improving the semantic richness of the query statement and thus improving the accuracy of the retrieval results.

[0058] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment generate a general solution for the user problem based on the acquired user problem, which may specifically include the following steps:

[0059] User questions are input into a pre-trained question-answering model so that the question-answering model generates general solutions to user questions.

[0060] In this embodiment, the question-answering model is used to obtain a general solution to the user's problem. Specifically, the user's problem can be input into the question-answering model so that the question-answering model processes the user's problem and outputs a general solution to the user's problem.

[0061] The above-mentioned question-answering model is LLM, which can specifically be iFlytek Spark Cognitive Big Model, Wenxin Yiyan, ChatGPT, etc., which is not limited in this embodiment.

[0062] In a specific embodiment, the general solution of user questions and question-answering model output is:

[0063] User question: Our products are easily bumped and scratched during transportation. Is there any good solution?

[0064] General solution: Hello! In order to prevent the product from being bumped or scratched during transportation, you can take the following measures:

[0065] 1. Choose thick cartons or wooden boxes for packaging, and use foam, pearl cotton, anti-collision pads, and right-angle corner protectors for auxiliary packaging and blocking to prevent the goods from shaking and colliding during transportation.

[0066] 2. Choose appropriate containers. Special containers must be used to ship products.

[0067] 3. Shockproof packaging can avoid vibration or collision during transportation and reduce mechanical damage to goods caused by transportation.

[0068] In the above embodiment, the question-answering model can be used to quickly and accurately generate a general solution to the user's question, which can not only reduce the time consumption of the entire processing process, but also improve the accuracy of the retrieval results.

[0069] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment retrieve a recommended solution corresponding to the user problem from a solution database according to the user problem and the general solution, which may specifically include the following steps:

[0070] The user problem and the general solution are spliced ​​together to obtain a spliced ​​document; one or more solutions with the highest similarity to the spliced ​​document are retrieved from the solution database as recommended solutions corresponding to the user problem.

[0071] Specifically, in order to facilitate retrieval, the user problem and the general solution can be spliced ​​to obtain a spliced ​​document. The spliced ​​document is then used as a query statement to retrieve from the solution database, and one or more solutions retrieved from the solution database with the highest similarity to the spliced ​​document are used as recommended solutions corresponding to the user problem.

[0072] In a specific embodiment, a solution retrieved from the solution database with the highest similarity to the spliced ​​document is used as a recommended solution corresponding to the user's problem. In other embodiments, N solutions retrieved from the solution database with the highest similarity to the spliced ​​document are used as recommended solutions corresponding to the user's problem. Where N is a positive integer greater than 1, and the value of N can be set according to actual conditions, and this embodiment does not limit it.

[0073] In the above embodiment, the user question and the general solution are spliced ​​to obtain a spliced ​​document, and then the spliced ​​document is retrieved from the solution database as a query statement, so that the query statement is no longer limited to the question itself, but can be combined with the question and the answer for contextual understanding, thereby improving the semantic richness of the query statement and further improving the accuracy of the retrieval results.

[0074] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment retrieve one or more solutions with the highest similarity to the spliced ​​document from the solution database as recommended solutions corresponding to the user's problem, which may specifically include the following steps:

[0075] Calculate the first similarity and the second similarity between the spliced ​​document and each solution in the solution database respectively; determine the similarity between the spliced ​​document and each solution in the solution database based on the first similarity and the second similarity, and determine one or more solutions in the solution database with the highest similarity to the spliced ​​document as recommended solutions corresponding to the user problem.

[0076] In an embodiment of the present application, the first similarity between the spliced ​​document and each solution in the solution database, and the second similarity between the spliced ​​document and each solution in the solution database are calculated, and then the similarity between the spliced ​​document and each solution in the solution database is determined based on the first similarity and the second similarity. For example, the sum of the first similarity and the second similarity between the spliced ​​document and each solution in the solution database can be used as the similarity between the spliced ​​document and the solution; the average of the first similarity and the second similarity between the spliced ​​document and each solution in the solution database can also be used as the similarity between the spliced ​​document and the solution, which is not limited in this embodiment. Then, one or more solutions in the solution database with the highest similarity to the spliced ​​document are determined as recommended solutions corresponding to the user's problem.

[0077] The first similarity mentioned above is determined based on vectorized search, and the second similarity is determined based on full-text search.

[0078] Vectorized search is mainly applied to high-dimensional vector data, such as images, document embeddings, etc. Its implementation involves the use of specialized similarity search algorithms, such as locality sensitive hashing or tree-based methods, to quickly retrieve similar vectors in high-dimensional vector space. The advantage of this method is its efficiency and scalability, and it is particularly suitable for similarity search of large-scale data sets.

[0079] Full-text search is mainly used for the retrieval and analysis of text data. By using technologies such as inverted index, it can efficiently process large-scale text data and support complex query and filtering operations. Its implementation method focuses more on the matching and relevance ranking of text keywords, making it widely used in scenarios such as text search and log analysis. Its advantages lie in its support for complex queries and the relevance ranking of search results.

[0080] In the embodiment of the present application, the search results of vectorized search and full-text search are combined to determine the similarity between the spliced ​​document and each solution in the solution database, so as to determine the recommended solution corresponding to the user's problem based on the similarity between the spliced ​​document and each solution in the solution database. This setting can combine the advantages of vectorized search and full-text search to obtain more comprehensive and accurate retrieval results.

[0081] As an optional implementation, another embodiment of the present application discloses that the step of calculating the first similarity between the concatenated document and each solution in the solution database in the above embodiment may specifically include:

[0082] The concatenated document is converted into a query vector by using a large language model; the cosine similarity between the query vector and the solution vector corresponding to each solution in the solution database is calculated as the first similarity; wherein each solution in the solution database is converted into a solution vector by using a large language model.

[0083] Specifically, the same large language model can be used to convert the concatenated document into a query vector, and convert each solution in the solution database into a solution vector.

[0084] In some embodiments, the solution database includes a pre-built vector database. The preset multiple solutions are generally structured data, and the preset multiple solutions can be pre-transferred to the large language model, for example, by calling the vectorization API interface of the large language model to transfer the preset multiple solutions to the large language model, and the large language model converts the preset multiple solutions into solution vectors, and then stores the solution vectors in the vector database. Exemplarily, the solution vector is a high-dimensional vector, and the vector database uses a Milvus vector database for storing and retrieving high-dimensional vectors.

[0085] After the concatenated document is obtained, the concatenated document is input into the large language model, and the large language model converts the concatenated document into a query vector. For example, the concatenated document is input into the large language model by calling the vectorization API interface of the large language model, and the large language model converts the concatenated document into a query vector.

[0086] Different large language models have different vectorization rules. In this embodiment, the same large language model is used to convert the concatenated documents into query vectors and convert each solution in the solution database into a solution vector, which can ensure the accuracy of the query results.

[0087] It should be noted that the big language model that converts the spliced ​​document into a query vector, converts each solution in the solution database into a solution vector, and the big language model that generates a general solution for the user problem can be the same big language model or different big language models, and this embodiment does not limit this.

[0088] Then, the cosine similarity between the query vector and the solution vectors corresponding to each solution in the solution database is calculated. If the query vector is A and the coordinates are (a1, a2, ..., an); the solution vector corresponding to any solution in the solution database is B and the coordinates are (b1, b2, ..., bn), then the calculation process of the cosine similarity similarity (θ) between A and B includes:

[0089]

[0090] in, represents the sum of the products of the corresponding components of vector A and vector B; represents the norm of vector A; Represents the norm of vector B.

[0091] The cosine similarity between the query vector and the solution vectors corresponding to each solution in the solution database is used as the first similarity.

[0092] In the above embodiment, the first similarity is determined through vectorized search, so that the advantages of vectorized search can be utilized to obtain more comprehensive and accurate search results.

[0093] As an optional implementation, Figure 3 As shown, in another embodiment of the present application, the step of calculating the second similarity between the concatenated document and each solution in the solution database in the above embodiment may specifically include:

[0094] S201, determining a query keyword of the spliced ​​document, and calculating the frequency of occurrence of the query keyword in each solution in the solution database;

[0095] S202: Determine a second similarity between the concatenated document and each solution in the solution database according to the frequency of occurrence of the query keyword in each solution in the solution database.

[0096] In this embodiment, the solution database includes a structured database constructed in advance. The above-mentioned multiple preset solutions are generally structured data, and the above-mentioned multiple preset solutions can be pre-transferred into the structured database. In some embodiments, Elasticsearch (ES) is used as a structured database. ES is a search engine specially designed for full-text search and analysis. It uses technologies such as inverted indexes, can efficiently perform full-text searches on text data, and supports complex query operations, including matching, fuzzy search, range filtering, etc. In this embodiment, the above-mentioned multiple preset solutions are pre-stored in ES.

[0097] Further, the query keywords of the concatenated documents are determined. In some embodiments, the query keywords of the concatenated documents are determined by KeyBERT. KeyBERT can automatically assign weights to keywords without manually adjusting weight parameters, and uses BERT embedding and simple cosine similarity to find the phrases in the document that are most similar to the document itself.

[0098] The specific steps of determining the query keywords of the spliced ​​document by KeyBERT are as follows: first, use KeyBERT to extract the spliced ​​document embedding to obtain a document-level vector representation; then extract word vectors for N-gram words / phrases; then use cosine similarity to find the words / phrases most similar to the document; finally, the most similar words can be identified as the words that best describe the entire document. In this way, keywords and scores can be obtained, and one or more keywords with the highest scores can be extracted as query keywords for the spliced ​​document. In some embodiments, the five keywords with the highest scores are extracted as query keywords for the spliced ​​document.

[0099] In some embodiments, according to the user questions and general solution examples provided in the above embodiments, the query keywords and scores obtained are shown in Table 1.

[0100] Keywords Keyword rating in reverse order transportation 0.80 product 0.70 Wooden box 0.60 plan 0.50 collision 0.40

[0101] Table 1

[0102] After determining the query keyword, the frequency of occurrence of the query keyword in each solution in the solution database is calculated. In some embodiments, the TFNORM / IDF algorithm is used to calculate the frequency of occurrence of the query keyword in each solution in the solution database.

[0103] TFNORM, or Term Frequency Norm, refers to the frequency of a single query keyword (term) appearing in any solution. Combined with the field length of the solution, the higher the number of term occurrences and the lower the field length of the solution, the higher the TFNORM score.

[0104] Calculation formula:

[0105] TFNORM(t in d)=(freq*(k1+1)) / (freq+k1*(1-b+b*fieldLength / avgFieldLength)).

[0106] Among them, freq represents the frequency of term in the solution; k1 is the first control parameter, which controls the rising speed of the term frequency result in the term frequency saturation. The default value is 1.2. The smaller the value, the faster the saturation changes, and the larger the value, the slower the saturation changes; b is the second control parameter, which controls the role of the field length normalization value. 0.0 will disable normalization, and 1.0 will enable full normalization. The default value is 0.75; fieldLength represents the field length of the solution; avgFieldLength represents the average field length of all solutions in the structured database.

[0107] This way we can get the frequency of term appearing in any solution.

[0108] IDF stands for inversed document frequency, which refers to the frequency with which a single term appears in all solutions. The higher the number of times a term appears, the lower the IDF score.

[0109] Calculation formula:

[0110] IDF(t) = log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)).

[0111] Among them, docCount represents the number of solutions in the structured database; docFreq represents the number of solutions containing the term.

[0112] This formula reduces the scores of terms with higher occurrence frequencies. For example, words such as "的" and "了" have higher occurrence frequencies in each solution, but they do not have much reference significance, so their scores are reduced.

[0113] In this way, the frequency of the term appearing in all solutions can be obtained.

[0114] More specifically, for any solution, calculate the product of the TFNORM and IDF of any query keyword that appears in the solution to obtain the score of any query keyword that appears in the solution, and then calculate the sum of the scores of all query keywords that appear in the solution, then the second similarity between the solution and the spliced document is obtained.

[0115] For example, the query keywords include x and y, the structured database includes the first solution and the second solution, the frequency of x appearing in the first solution is a1, the frequency of x appearing in the second solution is a2, and the frequency of x appearing in all solutions is a3; the frequency of y appearing in the first solution is b1, the frequency of y appearing in the second solution is b2, and the frequency of y appearing in all solutions is b3, then it can be obtained that:

[0116] The second similarity between the first solution and the spliced document is a1 × a3 + b1 × b3; the second similarity between the second solution and the spliced document is a2 × a3 + b2 × b3.

[0117] In the above embodiment, the second similarity is determined through full-text search, so as to be able to utilize the advantages of full-text search and obtain more comprehensive and accurate retrieval results.

[0118] As an alternative implementation, in another embodiment of the present application, it is disclosed that the steps of the above embodiment calculate the occurrence frequencies of query keywords in each solution in the solution database, which may specifically include the following steps:

[0119] Filter the solution database to obtain target solutions associated with the query keywords; calculate the occurrence frequencies of the query keywords in each target solution in the solution database.

[0120] In this embodiment, when calculating the frequency of occurrence of the query keyword in each solution in the solution database, the structured database may be screened first to obtain the target solution associated with the query keyword.

[0121] The Boolean Model can be used to quickly screen the structured database, filter out solutions that are not related to the query keywords, and retain the target solutions that are related to the query keywords. Specifically, the Boolean Model quickly eliminates solutions that do not meet the conditions by logically screening the query conditions. According to the rules such as must (must match), should (can match) and must_not (cannot match), it first finds the target solutions that meet the conditions through the inverted index, filters out irrelevant solutions, and then sends the target solutions that meet the conditions to the second similarity calculation.

[0122] This configuration avoids the need for complex second similarity calculations on all solutions through simple matching and filtering, thus significantly improving query efficiency.

[0123] As an optional implementation method, disclosed in another embodiment of the present application, the recommended solution of the above embodiment includes a solution for solving the user problem, and / or recommendation information of products required for the solution to solve the user problem, and the recommendation information of the product includes sales information of the product.

[0124] Specifically, the recommended solutions of the above embodiments include solutions for solving user problems; in order to further facilitate user use, product recommendations can also be made directly to users, that is, the recommended solutions of the above embodiments may also include recommendation information of products required for the solutions to solve user problems, wherein the product recommendation information includes product sales information, which may specifically be a product sales link, a product sales platform, product description information, etc., which is not limited in this embodiment.

[0125] In a specific embodiment, after obtaining the first similarity, one or more solutions with the highest first similarity to the spliced ​​document can be selected to obtain the recommended content of the first solution; after obtaining the second similarity, one or more solutions with the highest second similarity to the spliced ​​document can be selected to obtain the recommended content of the second solution.

[0126] Then, according to the first similarity and the second similarity, the first solution recommendation content and the second solution recommendation content are integrated, the sum of the first similarity and the second similarity corresponding to each solution in the first solution recommendation content and the second solution recommendation content is calculated, and one or more solutions with the highest sum of the first similarity and the second similarity are used as recommended solutions.

[0127] For example, after obtaining the first similarity, the five solutions with the highest first similarity to the spliced ​​document are taken to obtain the recommended content of the first solution; after obtaining the second similarity, the five solutions with the highest second similarity to the spliced ​​document can be taken to obtain the recommended content of the second solution. The five solutions with the highest first similarity and the corresponding first similarities are shown in Table 2, and the five solutions with the highest second similarity and the corresponding first similarities are shown in Table 3.

[0128] plan First similarity score in reverse order Plan A 0.88 Plan B 0.75 Plan C 0.65 Plan D 0.48 Plan E 0.45

[0129] Table 2

[0130] plan Second similarity score in reverse order Plan B 0.95 Plan A 0.75 Plan C 0.60 Plan D 0.50 Plan F 0.48

[0131] Table 3

[0132] The recommended contents of the first solution and the recommended contents of the second solution are integrated, as shown in Table 4.

[0133] plan First similarity Second similarity Plan A 0.88 0.75 Plan B 0.75 0.95 Plan C 0.65 0.60 Plan D 0.48 0.50 Plan E 0.45 Plan F 0.48

[0134] Table 4

[0135] Finally, the sum of the first similarity and the second similarity corresponding to each solution in the first solution recommendation content and the second solution recommendation content is calculated, and one or more solutions with the highest sum of the first similarity and the second similarity are used as recommended solutions, as shown in Table 5.

[0136] plan Total score Plan A 1.63 Plan B 1.70 Plan C 1.25 Plan D 0.98 Plan E 0.45 Plan F 0.48

[0137] Table 5

[0138] Therefore, the final scores are Plan B>Plan A>Plan C>Plan D>Plan F>Plan E. The first 5 plans are taken as recommended solutions, that is, the final recommended ranking is: Plan B, Plan A, Plan C, Plan D and Plan F.

[0139] Corresponding to the above solution recommendation method, the present application embodiment also discloses a solution recommendation device, see Figure 4 As shown, the device comprises:

[0140] A generation module 100 is used to generate a general solution to the user problem based on the acquired user problem;

[0141] The retrieval module 110 is used to retrieve the recommended solution corresponding to the user problem from the solution database according to the user problem and the general solution; wherein the solution database is used to store a plurality of preset solutions.

[0142] As an optional implementation method, another embodiment of the present application discloses that the generation module 100 of the above embodiment is specifically used to: input user questions into a pre-trained question-answering model so that the question-answering model generates a general solution to the user question.

[0143] As an optional implementation, another embodiment of the present application discloses that the search module 110 in the above embodiment is specifically used for:

[0144] The user problem and the general solution are spliced ​​together to obtain a spliced ​​document; one or more solutions with the highest similarity to the spliced ​​document are retrieved from the solution database as recommended solutions corresponding to the user problem.

[0145] As an optional implementation, another embodiment of the present application discloses that the search module 110 in the above embodiment is specifically used for:

[0146] The first similarity and the second similarity between the spliced ​​document and each solution in the solution database are calculated respectively; wherein the first similarity is determined based on the vectorized search, and the second similarity is determined based on the full-text search; based on the first similarity and the second similarity, the similarity between the spliced ​​document and each solution in the solution database is determined, and one or more solutions in the solution database with the highest similarity to the spliced ​​document are determined as recommended solutions corresponding to the user problem.

[0147] As an optional implementation, another embodiment of the present application discloses that the search module 110 in the above embodiment is specifically used for:

[0148] The concatenated document is converted into a query vector by using a large language model; the cosine similarity between the query vector and the solution vector corresponding to each solution in the solution database is calculated as the first similarity; wherein each solution in the solution database is converted into a solution vector by using a large language model.

[0149] As an optional implementation, another embodiment of the present application discloses that the search module 110 in the above embodiment is specifically used for:

[0150] Determine the query keywords of the spliced ​​document, calculate the frequency of occurrence of the query keywords in each solution in the solution database; and determine the second similarity between the spliced ​​document and each solution in the solution database based on the frequency of occurrence of the query keywords in each solution in the solution database.

[0151] As an optional implementation, another embodiment of the present application discloses that the search module 110 in the above embodiment is specifically used for:

[0152] The solution database is screened to obtain target solutions associated with the query keywords; and the occurrence frequency of the query keywords in each target solution in the solution database is calculated.

[0153] As an optional implementation method, disclosed in another embodiment of the present application, the recommended solution of the above embodiment includes a solution for solving the user problem, and / or recommendation information of products required for the solution to solve the user problem, and the recommendation information of the product includes sales information of the product.

[0154] Specifically, the device provided in this embodiment belongs to the same application concept as the method provided in the above embodiment of this application, can execute the method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For the technical details not fully described in this embodiment, please refer to the specific processing content of the method provided in the above embodiment of this application, which will not be repeated here.

[0155] The functions implemented by the above modules can be implemented by the same or different processors respectively, and the embodiments of the present application are not limited thereto.

[0156] It should be understood that the units in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by the configuration file, so as to realize the functions of some or all of the above units. All units of the above devices can be implemented in the form of a processor calling software, or in the form of hardware circuits, or in part by a processor calling software, and the remaining part is implemented in the form of hardware circuits.

[0157] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.

[0158] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0159] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0160] An embodiment of the present application further provides a control device, which includes a processor and an interface circuit. The processor in the control device is connected to an input-output component through the interface circuit of the control device.

[0161] The input-output component specifically refers to a hardware component that enables a user to input information and output information to the user, such as a microphone, keyboard, handwriting tablet, touch screen, display, speaker, printer, etc.

[0162] The above-mentioned interface circuit can be any interface circuit that can realize the data communication function, for example, it can be a USB interface circuit, a Type-C interface circuit, a serial port circuit, a PCIE circuit, etc.

[0163] The processor in the control device is a circuit with signal processing capability, which improves the accuracy of the search results by executing any of the solution recommendation methods introduced in the above embodiments. The specific implementation of the processor can refer to the above processor implementation, and the embodiments of this application are not strictly limited.

[0164] When the control device is applied to a device with a human-computer interaction function, the input and output components of the control device may be input components and output components on the device, such as a microphone, a keyboard, a handwriting tablet, a touch screen, a display, an audio player, etc. At the same time, the processor of the control device may be a CPU or GPU, etc. provided by the device, and the interface circuit of the control device may be an interface circuit between the information input component of the device and a processor such as a CPU or GPU.

[0165] Corresponding to the above-mentioned solution recommendation method, the embodiment of the present application also discloses an electronic device, see Figure 5 As shown, the electronic device includes:

[0166] Memory 200 and processor 210;

[0167] The memory 200 is connected to the processor 210 and is used to store programs;

[0168] The processor 210 is used to implement the solution recommendation method disclosed in any of the above embodiments by running the program stored in the memory 200.

[0169] Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .

[0170] The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are connected to each other via a bus.

[0171] A bus may include a pathway that transfers information between components of a computer system.

[0172] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0173] The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0174] The memory 200 stores a program for executing the technical solution of the present application, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes computer operation instructions. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0175] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0176] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0177] The communication interface 220 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0178] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement the various steps of the solution recommendation method provided in the above embodiments of the present application.

[0179] In addition to the above methods and devices, the embodiments of the present application may also be computer program products, which include computer programs. When the computer programs are executed by a processor, the solution recommendation method provided by any of the above embodiments of the present application may be executed. Optionally, the computer program may be stored in a readable storage medium or in the cloud of a computer device; the processor of the computer device reads the computer program from the readable storage medium or the cloud.

[0180] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0181] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK).

[0182] In addition, the embodiments of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes each step of the solution recommendation method provided in the above embodiments.

[0183] The computer readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0184] Specifically, the specific working contents of each part of the above-mentioned electronic device, computer program product and storage medium, as well as the specific processing contents when the computer program product or the computer program on the above-mentioned storage medium is executed by the processor, can all be found in the contents of the various embodiments of the above-mentioned scheme recommendation method, and will not be repeated here.

[0185] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.

[0186] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0187] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0188] The modules and sub-modules in the devices and terminals in the various embodiments of the present application can be combined, divided and deleted according to actual needs.

[0189] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0190] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0191] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0192] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0193] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0194] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0195] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A solution recommendation method, characterized in that: include: Based on the acquired user problems, generate a general solution for the user problems; According to the user problem and the general solution, a recommended solution corresponding to the user problem is retrieved from a solution database; wherein the solution database is used to store a plurality of preset solutions.

2. The method according to claim 1, characterized in that The generating a general solution to the user problem based on the acquired user problem includes: The user question is input into a pre-trained question-answering model so that the question-answering model generates a general solution to the user question.

3. The method according to claim 1, characterized in that The step of retrieving a recommended solution corresponding to the user problem from a solution database according to the user problem and the general solution includes: Splicing the user problem and the general solution to obtain a spliced ​​document; One or more solutions with the highest similarity to the spliced ​​document are retrieved from the solution database as recommended solutions corresponding to the user problem.

4. The method according to claim 3, characterized in that: The retrieving from the solution database one or more solutions with the highest similarity to the spliced ​​document as recommended solutions corresponding to the user problem includes: Calculating respectively a first similarity and a second similarity between the concatenated document and each solution in the solution database; wherein the first similarity is determined based on a vectorized search, and the second similarity is determined based on a full-text search; The similarity between the spliced ​​document and each solution in the solution database is determined according to the first similarity and the second similarity, and one or more solutions in the solution database with the highest similarity to the spliced ​​document are determined as recommended solutions corresponding to the user problem.

5. The method according to claim 4, characterized in that The step of calculating the first similarity between the concatenated document and each solution in the solution database comprises: Using a large language model, converting the concatenated document into a query vector; The cosine similarity between the query vector and the solution vector corresponding to each solution in the solution database is calculated as the first similarity; wherein each solution in the solution database is converted into a solution vector using the large language model.

6. The method according to claim 4, characterized in that The step of calculating the second similarity between the concatenated document and each solution in the solution database comprises: Determine a query keyword of the concatenated document, and calculate the occurrence frequency of the query keyword in each solution in the solution database; According to the occurrence frequency of the query keyword in each solution in the solution database, a second similarity between the concatenated document and each solution in the solution database is determined.

7. The method according to claim 6, characterized in that The calculating the occurrence frequency of the query keyword in each solution in the solution database includes: Screening the solution database to obtain a target solution associated with the query keyword; The occurrence frequency of the query keyword in each target solution in the solution database is calculated.

8. The method according to any one of claims 1 to 7, characterized in that The recommended solution includes a solution for solving the user's problem and / or recommendation information of a product required for the solution for solving the user's problem, and the product recommendation information includes sales information of the product.

9. A solution recommendation device, characterized in that: include: A generation module, used to generate a general solution to the user problem based on the acquired user problem; A retrieval module is used to retrieve a recommended solution corresponding to the user problem from a solution database based on the user problem and the general solution; wherein the solution database is used to store multiple preset solutions.

10. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to implement the method according to any one of claims 1 to 8 by running the program in the memory.

11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.