A case similarity recommendation system based on vector database

The vector database converts historical cases and text information input by users into vector data for matching and comparison, which solves the problem that the existing recommendation system cannot accurately extract feature attributes, achieves fast and accurate case recommendation, and improves the accuracy and accuracy of recommendations. efficiency.

CN118193857BActive Publication Date: 2024-09-10SUZHOU ENHE INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410625610.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-10
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

Existing recommendation systems based on relational databases cannot accurately extract the characteristic attributes in user needs, resulting in recommended information that is not similar to user needs and cannot meet user needs.

Method used

The vector database construction unit is used to convert historical case information into vector data, and the text information input by the user is obtained through the input text acquisition module, converted into vector data, and automatically retrieved and compared to find vector data with high similarity, and the corresponding source information is pushed data to the user.

Benefits of technology

Through the matching and comparison of vector data, we can quickly and accurately find the case information that is most similar to the user input text, which improves the accuracy and efficiency of recommendations and can better meet the needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118193857B
    Figure CN118193857B
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a case similarity recommendation system based on a vector database, comprising: a vector database construction unit, an input text acquisition module, an information data entry module, an input text conversion unit, an automatic retrieval comparison unit, a source data exploration module, a source data push module, and a push data display module; the vector database construction unit is used to collect some historical case information, and convert some historical case information into vector data, and then store the converted vector data. The collected historical case information is converted into vector data, and the text information input by the user is also converted into vector data. Since the closer the vector data is, the more similar the corresponding source data is, the input text vector data is matched and compared with the historical case vector data, so that the case information with the highest similarity to the input text information can be found quickly and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more specifically discloses a case similarity recommendation system based on a vector database. Background Art

[0002] With the development of computer and Internet technology, people will generate a lot of data in their daily production and life. Usually, the data is stored in the form of a database, which is convenient for processing and analyzing the data, so as to recommend information that meets their needs to people, thereby providing convenience for people's production and life. The current recommendation system is based on a relational database. After the specific characteristic attributes in people's needs are extracted by an algorithm, the information data similar to people's needs can be fed back to each user in combination with the prescribed query language. However, since a special algorithm is needed to extract the characteristic attributes in the needs in the recommendation process, similar information can be recommended to users. Since the characteristic attributes in the needs are sometimes implicit in the textual meaning of the needs, when extracting the characteristic attributes in the needs, the characteristic attributes of the user's needs cannot be accurately extracted, which easily leads to the fact that when similar information is pushed to users in the future, the similarity between the pushed information and the user's needs is not high, and the user's needs cannot be accurately met. Summary of the invention

[0003] The present invention mainly provides a case similarity recommendation system based on a vector database, which can solve the problem that the current recommendation system cannot accurately recommend information that meets the user's needs.

[0004] To solve the above technical problems, according to one aspect of the present invention, more specifically, a case similarity recommendation system based on a vector database comprises: a vector database construction unit, an input text acquisition module, an information data entry module, an input text conversion unit, an automatic retrieval comparison unit, a source data exploration module, a source data push module and a push data display module; wherein:

[0005] Vector database construction unit: used for collecting some historical case information, converting some historical case information into vector data, and then storing some converted vector data to complete the construction of vector database;

[0006] Input text acquisition module: used to obtain text information data input by the user;

[0007] Information data entry module: used to enter the text information data acquired by the input text acquisition module into the input text steering unit;

[0008] Input text conversion unit: used to convert the text information data input by the user into vector data;

[0009] Automatic retrieval and comparison unit: used to match and compare the vector data converted by the input text to the vector data in the vector database, so as to obtain the vector data in the vector database with high similarity;

[0010] Source data search module: used for searching source information data corresponding to the vector data according to the vector data in the vector database after the automatic search and comparison unit matches and compares the vector data in the vector database with high similarity to the input text vector data;

[0011] Source data push module: used to push the source information data found by the source data search module to the user terminal;

[0012] Push data display module: used to display the source information data on the user terminal device after the source data push module pushes the source information data to the user terminal.

[0013] Furthermore, the vector database construction unit includes: a historical case information collection module, a steering amount module and a vector data storage module;

[0014] Historical case information collection module: used to collect case brief text information of each historical case in a number of historical case information data;

[0015] Steering volume module: used to convert the case brief text information of each historical case collected by the historical case information collection module into vector data;

[0016] Vector data storage module: used to store the vector data converted by the steering module.

[0017] Furthermore, in the process of converting the case summary text information of each historical case into vector data, the steering module first divides the case summary text of each historical case into a number of words, and then calculates the element value of each word in the entire vector data: , where Vv is the element value of each word in the entire vector data, For each historical case, briefly describe the word in text k that is being compared with other words, For each historical case, briefly describe the text except for the words being compared. For each word other than , P(x) is the frequency of satisfying condition x, S is the total number of historical case summary texts, To contain the word being compared The total number of historical case summary texts; then the element values ​​of each word are combined to obtain the vector data of the historical case summary text.

[0018] Furthermore, the input text turning unit includes: a word division module, a word frequency statistics module and a vector data deriving module;

[0019] Word division module: used to divide the text information input by the user into several words;

[0020] Word frequency statistics module: used to count the frequency information of each word in the input text;

[0021] Vector data obtaining module: used to combine the word frequency information of each word counted by the word frequency statistics module to obtain the vector data of the input text.

[0022] Furthermore, when the input text conversion unit converts the input text into corresponding vector data, it first divides the input text into several words through the word division module, and then counts the frequency of each word through the word frequency statistics module:

[0023] , where wf is the frequency of each word, P(x) is the frequency of satisfying condition x, The word in the input text ip that is being compared with other words in the input text , For each word in the input text ip except the word being compared , Z is the total number of words in the input text; finally, the vector data of the input text can be obtained by combining the word frequencies wf of the individual words through the vector data acquisition module.

[0024] Furthermore, the automatic retrieval and comparison unit includes: an input text vector data acquisition module, a vector database data retrieval module, a vector data matching and comparison module, and a matching and comparison result feedback module;

[0025] Input text vector data acquisition module: used to obtain the vector data of the input text after conversion from the input text conversion unit;

[0026] Vector database data retrieval module: used to retrieve all vector data from the vector database constructed by the vector database construction unit;

[0027] Vector data matching and comparison module: used to match and compare the acquired input text vector data with each vector data retrieved from the vector database, so as to obtain the vector data in the vector database with high similarity;

[0028] Matching and comparison result feedback module: used to feed back the matching and comparison results obtained by the vector data matching and comparison module to the source data exploration module.

[0029] Furthermore, when performing matching and comparison, the vector data matching and comparison module matches and compares the input text vector data with each vector data in the vector database, if each element in the input text vector data satisfies the following conditions:

[0030] , then it is determined that the vector data v in the vector database is the vector data with high similarity to the input text vector data, and the source case data corresponding to the vector data v in the vector database is the case with high similarity to the input text requirement;

[0031] in, is the element value of each element n in the vector data of the input text ip, is the element value of each element n in each vector data v in the vector database, P(x) is the frequency of satisfying condition x, and zn is the total number of elements in the vector data of the input text ip.

[0032] Furthermore, when acquiring the text input by the user, the input text acquisition module can directly acquire the text information data input by the user; it can also convert the voice data into text information data through voice recognition technology after the user inputs the voice data, and then acquire the converted text information data; it can also acquire the text information data obtained by scanning.

[0033] The beneficial effect of the case similarity recommendation system based on the vector database of the present invention is as follows: by converting the collected historical case information into vector data, obtaining the text information input by the user at the same time, and converting the input text information into vector data, since the closer the vector data is, the more similar the corresponding source data is, the input text vector data is matched and compared with the historical case vector data, so that the case information with the highest similarity to the input text information can be found quickly and accurately, and recommended to the user. Since the vector data is digital type data, when the system processes the vector data, it only follows the conversion of the base without other complex conversion operations, and the processing efficiency is higher than the processing of the text data, so that the case with high similarity can be found quickly and recommended to the user. In addition, since only the vector data is analyzed and judged, and the feature data does not need to be extracted, it is only necessary to judge the similarity between the two vector data, so that the case with high similarity can be found accurately and recommended to the user. Compared with the current recommendation system, the recommendation system can quickly and accurately find the case with high similarity to the user's needs, and recommend it to the user, so that it can greatly meet the needs of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0035] Figure 1 This is a schematic diagram of the system principle. DETAILED DESCRIPTION

[0036] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0037] According to one aspect of the present invention, Figure 1 As shown, a case similarity recommendation system based on a vector database is provided. First, a vector database is constructed by a vector database construction unit: a case summary text information (or remark text information, or summary text information) of each historical case in a number of historical case information data is collected by a historical case information collection module. Then, a conversion module converts the collected case summary text information of each historical case into vector data through the following process: first, the case summary text of each historical case is divided into a number of words, and then the element value of each word in the entire vector data is calculated: , where Vv is the element value of each word in the entire vector data, For each historical case, briefly describe the word in text k that is being compared with other words, For each historical case, briefly describe the text except for the words being compared. For each word other than , P(x) is the frequency of satisfying condition x, S is the total number of historical case summary texts, To contain the word being compared The total number of historical case summary texts; then the element values ​​of each word are combined to obtain the vector data of the historical case summary text. The vector data of a historical case summary text is as follows: .

[0038] Finally, the vector data of several historical case summary texts are stored through the vector data storage module to complete the construction of the vector database.

[0039] When recommending cases with high similarity to users, first, the input text acquisition module obtains the user's input demand text information data, and the information data entry module enters the acquired demand text information data into the text conversion unit. After receiving the input text information data, the text conversion unit first divides the user's input text information into several words through the word division module, and then counts the frequency of each word in the input text through the word frequency statistics module: , where wf is the frequency of each word, P(x) is the frequency of satisfying condition x, The word in the input text ip that is being compared with other words in the input text , For each word in the input text ip except the word being compared , Z is the total number of words in the input text; finally, the vector data of the input text can be obtained by combining the word frequencies wf of the individual words through the vector data extraction module, as shown below: .

[0040] Then, the input text vector data acquisition module in the automatic retrieval comparison unit will obtain the converted vector data of the input text from the input text conversion unit. At the same time, all vector data are retrieved from the vector database constructed by the vector database construction unit through the vector database data retrieval module. Then, the input text vector data is matched and compared with the vector data in each retrieved vector database through the vector data matching and comparison module. If each element in the input text vector data meets the following conditions: , then the vector data v in the vector database is judged to be vector data with high similarity to the input text vector data, and the source case data corresponding to the vector data v in the vector database is judged to be a case with high similarity to the input text requirement, and the result is fed back to the source data exploration module through the matching comparison result feedback module; wherein, is the element value of each element n in the vector data of the input text ip, is the element value of each element n in each vector data v in the vector database, P(x) is the frequency of satisfying condition x, and zn is the total number of elements in the vector data of the input text ip.

[0041] The source data search module will find the source case information data corresponding to the vector data based on the vector data in the vector database fed back by the matching comparison results, and push the source case information data to the user's terminal device through the source data push module. Finally, through the push data display module, the recommended case information data with higher similarity can be displayed on the user's terminal device.

[0042] The electrical components that appear in this article are all electrical components that exist in reality.

[0043] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention also fall within the protection scope of the present invention.

Claims

1. A case similarity recommendation system based on vector database, characterized in that: include: Vector database construction unit, input text acquisition module, information data entry module, input text steering unit, automatic retrieval comparison unit, source data exploration module, source data push module and push data display module; wherein: Vector database construction unit: used for collecting some historical case information, converting some historical case information into vector data, and then storing some converted vector data to complete the construction of vector database; Input text acquisition module: used to obtain text information data input by the user; Information data entry module: used to enter the text information data acquired by the input text acquisition module into the input text steering unit; Input text conversion unit: used to convert the text information data input by the user into vector data; Automatic retrieval and comparison unit: used to match and compare the vector data converted by the input text turning unit with the vector data in the vector database, so as to obtain the vector data in the vector database with high similarity; the unit includes: input text vector data acquisition module, vector database data retrieval module, vector data matching and comparison module and matching and comparison result feedback module; input text vector data acquisition module: used to obtain the vector data converted by the input text from the input text turning unit; vector database data retrieval module: used to retrieve all vector data from the vector database constructed by the vector database construction unit; vector data matching and comparison module: used to match and compare the acquired input text vector data with each vector data retrieved from the vector database, so as to obtain the vector data in the vector database with high similarity; specifically: match and compare the input text vector data with each vector data in the vector database, if each element in the input text vector data satisfies the following conditions: , then the vector data v in the vector database is judged to be vector data with high similarity to the input text vector data, and the source case data corresponding to the vector data v in the vector database is judged to be a case with high similarity to the input text requirement; wherein, is the element value of each element n in the vector data of the input text ip, is the element value of each element n in each vector data v in the vector database, P(x) is the frequency of satisfying condition x, and zn is the total number of elements in the vector data of the input text ip; Matching and comparison result feedback module: used to feed back the matching and comparison result obtained by the vector data matching and comparison module to the source data exploration module; Source data search module: used for searching source information data corresponding to the vector data according to the vector data in the vector database after the automatic search and comparison unit matches and compares the vector data in the vector database with high similarity to the input text vector data; Source data push module: used to push the source information data found by the source data search module to the user terminal; Push data display module: used to display the source information data on the user terminal device after the source data push module pushes the source information data to the user terminal.

2. The case similarity recommendation system based on vector database according to claim 1, characterized in that: The vector database construction unit includes: a historical case information collection module, a steering quantity module and a vector data storage module; Historical case information collection module: used to collect case brief text information of each historical case in a number of historical case information data; Steering volume module: used to convert the case brief text information of each historical case collected by the historical case information collection module into vector data; Vector data storage module: used to store the vector data converted by the steering module.

3. The case similarity recommendation system based on vector database according to claim 2, characterized in that: In the process of converting the case summary text information of each historical case into vector data, the steering module first divides the case summary text of each historical case into a number of words, and then calculates the element value of each word in the entire vector data: , where Vv is the element value of each word in the entire vector data, For each historical case, briefly describe the word in text k that is being compared with other words, For each historical case, briefly describe the text except for the words being compared. For each word other than , P(x) is the frequency of satisfying condition x, S is the total number of historical case summary texts, To contain the word being compared The total number of historical case summary texts; then the element values ​​of each word are combined to obtain the vector data of the historical case summary text.

4. The case similarity recommendation system based on vector database according to claim 1, characterized in that: The input text turning unit includes: a word division module, a word frequency statistics module and a vector data deriving module; Word division module: used to divide the text information input by the user into several words; Word frequency statistics module: used to count the frequency information of each word in the input text; Vector data obtaining module: used to combine the word frequency information of each word counted by the word frequency statistics module to obtain the vector data of the input text.

5. The case similarity recommendation system based on vector database according to claim 4 is characterized in that: When the input text conversion unit converts the input text into corresponding vector data, it first divides the input text into several words through the word division module, and then counts the frequency of each word through the word frequency statistics module: , where wf is the frequency of each word, P(x) is the frequency of satisfying condition x, The word in the input text ip that is being compared with other words in the input text , For each word in the input text ip except the word being compared , Z is the total number of words in the input text; finally, the vector data of the input text can be obtained by combining the word frequencies wf of the individual words through the vector data acquisition module.

6. The case similarity recommendation system based on vector database according to claim 1, characterized in that: When acquiring the text input by the user, the input text acquisition module can directly acquire the text information data input by the user; or after the user inputs voice data by voice, the voice data can be converted into text information data by voice recognition technology, and then the converted text information data can be acquired; or the text information data obtained by scanning can be acquired.

Citation Information

Cited By

  • Dynamic arrangement of data chunks in storage

    US12748760B1