Data information search method and device based on large model enhancement, equipment and medium
Through the data information search method based on large-scale enhanced, the target text optimization model and result evaluation model are used to solve the problem of insufficient personalization and accuracy in intelligent search technology, and high-quality search results of internal electronic archives in the enterprise are achieved.
Patent Information
- Application Number
- CN202510418223.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-11
AI Technical Summary
Existing intelligent search technologies fail to fully consider the data complexity and high dynamicity of vertical fields, resulting in insufficient search results in personalization and retrieval accuracy.
The data information search method based on large model enhancement is adopted, and the search text information and object description information of the search object are obtained, and the search key information is determined using the pre-trained target text optimization model, and vector and entity searches are performed in the data index library, and the results are sorted in combination with the target result evaluation model to provide personalized and accurate search results.
It improves the search accuracy and personalization of the electronic archives field within the enterprise, provides high-quality search results, can better understand user intentions and perform intelligent search optimization.
Smart Images

Figure CN120296157A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent search, and particularly to a data information search method, device, equipment and medium based on large model enhancement. Background Art
[0002] Intelligent search technology aims to quickly retrieve in a database or network by identifying and understanding the intention in the text input by the user, so as to return the search results ideal for the user. The quality of the search results directly affects the user's search experience.
[0003] Traditional internal data search methods generally analyze the search statement input by the user, tokenize it, and then evaluate the relevance between these keywords and the information stored in the database to provide the most matching search results.
[0004] However, the existing intelligent search technology has not fully considered the data complexity and high dynamics in the vertical domain, which results in deficiencies in personalization, customization and retrieval accuracy of the search results. Summary of the Invention
[0005] The present invention provides a data information search method, device, equipment and medium based on large model enhancement, which optimizes the search in a hybrid retrieval manner, and can provide more accurate and personalized intelligent retrieval on the basis of better understanding the user's intention during the search.
[0006] According to one aspect of the present invention, a data information search method based on large model enhancement is provided. The method includes:
[0007] Obtain the search text information input by the search object, and determine the object description information corresponding to the search object; wherein, the object description information is the historical search feature of the search object;
[0008] According to the search text information, the object description information and the target text optimization model obtained by pre-training, determine the search key information corresponding to the search text information; wherein, the description of the search information in the search key information is more detailed than the search text information;
[0009] Determine the search vector information corresponding to the search key information, search in the pre-constructed data index library to obtain a vector search result, and search in the data index library according to the search vector information according to the search key information to obtain an entity search result;
[0010] Respectively input the vector search results and the entity search results into the target result evaluation model corresponding to the search object, obtain the result evaluation information output by the target result evaluation model, and perform sorting processing on the vector search results and the entity search results according to the result evaluation information to obtain the target search results.
[0011] According to another aspect of the present invention, there is provided a data information search device enhanced based on a large model. The device includes:
[0012] A search text information acquisition module, configured to acquire the search text information input by the search object and determine the object description information corresponding to the search object; wherein, the object description information is the historical search feature of the search object;
[0013] A search key information determination module, configured to determine the search key information corresponding to the search text information according to the search text information, the object description information, and a pre-trained target text optimization model; wherein, the description of the search information in the search key information is more detailed than the search text information;
[0014] An initial search result determination module, configured to determine the search vector information corresponding to the search key information, search in a pre-constructed data index library to obtain vector search results, and, according to the search vector information, search in the data index library according to the search key information to obtain entity search results;
[0015] A target search result determination module, configured to respectively input the vector search results and the entity search results into the target result evaluation model corresponding to the search object, obtain the result evaluation information output by the target result evaluation model, and perform sorting processing on the vector search results and the entity search results according to the result evaluation information to obtain the target search results.
[0016] According to another aspect of the present invention, there is provided an electronic device, the electronic device includes:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data information search method based on a large model enhanced according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the data information search method based on large model enhancement according to any embodiment of the present invention when executed.
[0021] The technical solution of the embodiment of the present invention obtains the search text information input by the search object and determines the object description information corresponding to the search object. According to the search text information, the object description information, and a pre-trained target text optimization model, the search key information corresponding to the search text information is determined. The search vector information corresponding to the search key information is determined, and a search is performed in a pre-constructed data index library to obtain a vector search result. Moreover, according to the search vector information, a search is performed in the data index library according to the search key information to obtain an entity search result. The vector search result and the entity search result are respectively input into the target result evaluation model corresponding to the search object to determine the result evaluation information corresponding to the search text information, and according to the result evaluation information, the target search result is determined, which solves the problem of insufficient personalization and search accuracy in the field of enterprise internal electronic files. The technical solution of the present invention is particularly valuable for application scenarios that provide high-quality search results. The technical solution of the present invention is particularly valuable for application scenarios that provide high-quality search results. When searching, the large model is used for intention recognition and user input enhancement, which can better understand the basis of user intentions, optimize the search in a hybrid retrieval manner, and at the same time combine the target result evaluation model to provide more accurate and personalized intelligent retrieval.
[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0024] Figure 1 is a flowchart of a data information search method based on large model enhancement according to Embodiment 1 of the present invention;
[0025] Figure 2 is a flowchart of a data information search method based on large model enhancement according to Embodiment 2 of the present invention;
[0026] Figure 3 It is a structural diagram of a data information search device enhanced based on a large model according to Embodiment 3 of the present invention;
[0027] Figure 4 It is a schematic structural diagram of an electronic device for implementing the data information search method enhanced based on a large model according to the embodiment of the present invention. Detailed implementation manners
[0028] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 It is a flowchart of a data information search method enhanced based on a large model provided by Embodiment 1 of the present invention. This embodiment is applicable to situations where high-quality search results need to be provided, especially applicable to the situation of intelligent search in an internal local database. This method can be executed by a data information search device enhanced based on a large model. The data information search device enhanced based on a large model can be implemented in the form of hardware and / or software, and the data information search device enhanced based on a large model can be configured in an electronic device. As Figure 1 shown, the method includes:
[0032] S101. Obtain the search text information input by the search object, and determine the object description information corresponding to the search object.
[0033] It should be noted that the technical solution of the present invention aims to provide a method for personalized and intelligent search for internal enterprise electronic files, and applicable scenarios include, but are not limited to, intelligent search for department performance data by department managers, intelligent search for recruitment resumes by enterprise recruiters, and intelligent search for goods information by business salespersons.
[0034] Among them, the search object can be an object that needs to perform intelligent search, such as a department manager, an enterprise recruiter, or a business salesperson, etc. The search text information can refer to the search text content input by the search object in the search system. The object description information is the historical search feature of the search object, and the object description information can be obtained by extracting according to the historical search data of the search object.
[0035] Specifically, usually in a Web application, the search text information input by the search object in the search box is obtained through an HTML form and PHP (or other server-side languages).
[0036] S102. Determine the search key information corresponding to the search text information according to the search text information, the object description information, and a pre-trained target text optimization model.
[0037] Among them, the object description information of the search object can refer to the description information of the search object's search habits. The target text optimization model can be an optimization model obtained by training based on a preset neural network model. The target text optimization model can be used to perform text optimization processing on the search text information. Among the obtained search key information, the detailed degree of the description of the search information is higher than that of the search text information. The search key information can be an optimized text statement extracted for the search text information, or multiple extracted keywords.
[0038] It should be noted that the target text optimization model can use a GPU server to train the qwen2.5-7b-Instruct large model to obtain the target text optimization model, which can better and more accurately rewrite the search text information of the search object. For example, replacing words in the search text information with synonyms, changing the word order, sentence structure, adding the search object's recent work priorities, requirements, etc. It consists of two parts: dataset construction and LoRA fine-tuning. The LoRA fine-tuning formula is as follows. Add an additional matrix ΔW, and use low-rank decomposition to represent ΔW, recorded as B, A, where Keep the W0 parameter of the model unchanged, and only train B and A. The forward propagation formula is:
[0039] h = W0X + ΔWX = W0X + BAX;
[0040] Among them, W0 represents the original weights of the large model, also known as the pre-trained weight matrix. ΔW represents the low-rank decomposition matrix used to update the weights of the large model. B represents a matrix with d rows and r columns, A represents a matrix with r rows and k columns, h represents the output data. X represents the input data.
[0041] Exemplarily, determining the search key information corresponding to the search text information according to the search text information, the object description information, and the target text optimization model obtained by pre-training includes:
[0042] Inputting the search text information and the object description information into the target text optimization model, so that the target text optimization model performs text optimization processing on the search text information with reference to the object description information;
[0043] Obtaining the search key information corresponding to the search text information according to the output of the target text optimization model, where the search key information includes at least one search keyword.
[0044] Specifically, inputting the search text information and the object description information into the target text optimization model, so that the target text optimization model performs text optimization processing on the search text information with reference to the object description information, and the search key information corresponding to the search text information can be obtained by receiving the output of the target text optimization model.
[0045] Exemplarily, in the scenario of intelligent search of recruitment resumes by enterprise recruiters, if the search text information is: "Operation and Maintenance Engineer", and the object description information is "Male, having searched for operation and maintenance positions many times recently, and the work focus is to recruit intermediate-level operation and maintenance engineers for the financial industry", then after the target text optimization model performs text optimization processing, the search key information can be "Recruiting for the financial industry, intermediate operation and maintenance engineer, skill requirements are: system management, network management, automation, service monitoring", so as to provide a more comprehensive and personalized intelligent search service.
[0046] S103. Determine the search vector information corresponding to the search key information, search in the pre-constructed data index library to obtain the vector search result, and search in the data index library according to the search key information according to the search vector information to obtain the entity search result.
[0047] It should be noted that the entity search result can refer to the search result containing the search key information, and the vector search result can refer to the search result matching the vector of the search key information.
[0048] Exemplarily, determine the search vector information corresponding to the search key information, and search in the pre-constructed data index library to obtain the vector search result, including:
[0049] Based on the pre-trained target text vector model, encode the search key information to obtain a search text vector; search in the pre-constructed data index library to obtain a vector search result that matches the search text vector.
[0050] Among them, the target text vector model can be obtained by fine-tuning on the basis of the RetroMAE pre-trained model. The basic principle is to regard the semantic relevance task as a binary classification task, and the vector uses BCE (binary cross-entropy loss function) as the loss function. The BCE loss function is used in the training of the vector retrieval model. In addition, compared with the triplet loss, the BCE loss function can enable the model to train multiple positive and negative samples of a model at the same time.
[0051]
[0052] Among them, BCE(p,y) represents the loss value, which is the value that needs to be minimized during the model training process. N represents the number of samples, that is, the total number of samples in the training dataset. y represents the actual label of the i-th sample, taking values 0 or 1. p represents the predicted probability of the i-th sample, that is, the probability value output by the model, with a value range of 0 to 1. The training data can be the relevant data provided by the search object, and the vector model after fine-tuning is saved.
[0053] For the preprocessing or construction of the database index library of enterprise electronic files, specifically;
[0054] The data index library can refer to a local database. The data information of the data index library can be sorted and collected through the enterprise's internal knowledge data, including internal personnel systems, administrative systems, development specifications, regulatory systems, internal training documents, resume data, or other files, etc.
[0055] After uploading the collected documents or obtaining document data from the database, use the preprocessing code to parse or read the document content, and then segment it by blocks and paragraphs. Segmenting the enterprise's internal knowledge data documents, for different segmentation blocks belonging to the same paragraph, add marks to ensure that there will be no missing paragraphs in the recalled data. At the same time, mark the text blocks according to the category to which the document belongs, such as personnel, administration, development, etc., to obtain the preprocessing result. For example:
[0056] “{Text block: "This is part of the data in Paragraph A", "Paragraph": A, "Category": Personnel System}”
[0057] "{Text block: "This is the second part of the data in Paragraph A", "Paragraph": A, "Category": Personnel System}".
[0058] Encode the segmented text blocks using a vector model. By using a vector model to encode the segmented text blocks, vectors that can represent the semantic information of the text are generated. Store the encoded vector data using a vector database (vector databases such as faiss, milvus, es, etc.). Using a vector library for storage can better accelerate the speed of vector retrieval.
[0059] Specifically, directly perform entity search in the data index library according to the search key information, so as to obtain the entity search result. Vectorize the search key information through the target text vector model, and then perform a search process in the data index library according to the vectorization result, so as to obtain the vector search result.
[0060] Exemplarily, determining the vector search result that matches the search text vector in the data index library includes: determining the search category corresponding to the search text vector. Determine the sub-index library corresponding to the search category in the data index library, and determine the vector search result that matches the search text vector in the sub-index library.
[0061] Among them, the search category can be divided according to the actual situation. In the technical solution of the embodiment of the present invention, the search category can at least include personnel category, administrative category, training documents, etc.
[0062] Specifically, determine the search category corresponding to the search text vector. The specific method for determining the search category is not limited in the present invention. Preferably, the target text optimization model (large model) can be used to determine the specific category to which the search text vector or search key information belongs. Determine the sub-index library corresponding to the search category in the data index library. Match the search text vector with the index text vectors in the sub-index library, so as to determine the vector search result from the index text information.
[0063] S104. Respectively input the vector search result and the entity search result into the target result evaluation model corresponding to the search object, obtain the result evaluation information output by the target result evaluation model, and perform a sorting process on the vector search result and the entity search result according to the result evaluation information to obtain the target search result.
[0064] Among them, the target search result can refer to the search result after evaluating and filtering the vector search result and the entity search result. The target result evaluation model can be an evaluation model trained based on the description information of the search object and the pre-collected user click data. In the case where the system lacks user click data initially, a random selection mechanism can be adopted.
[0065] It should be noted that a single target result evaluation model can be applicable to only a unique search object, or it can be that a single target result evaluation model can be applicable to all search objects. The specific applicable manner can be set according to the actual situation, and the present invention does not limit this. Preferably, the present invention adopts the technical solution that a single target result evaluation model is applicable to all search objects.
[0066] Among them, the target result evaluation model can be obtained by training according to the object description information of the search object. The target result evaluation model is used to score and evaluate the initial search result, and is used to predict the satisfaction score of the search object for the initial search result. The result evaluation information can be used to represent the predicted satisfaction score of the search object for the initial search result.
[0067] Specifically, the vector search result and the entity search result are input into the target result evaluation model together with the search object input for result evaluation processing. According to the output of the target result evaluation model, the result evaluation information corresponding to each search result can be obtained. Then, according to the result evaluation information, screening processing is performed, and the target search result corresponding to the search text information can be obtained.
[0068] Exemplarily, sorting the vector search result and the entity search result according to the result evaluation information to obtain the target search result includes:
[0069] Sorting the vector search result and the entity search result according to the result evaluation information to obtain the sorted search results to be screened; determining the target search result from the search results to be screened based on a preset screening rule.
[0070] Among them, the preset screening rule can be set according to actual experience. For example, the preset top several search results of the search results to be screened.
[0071] Specifically, each vector search result, the entity search result, and the specific user information are input into the target result evaluation model for result evaluation, and according to the output of the target result evaluation model, the result evaluation information corresponding to each search result is obtained. Sorting the vector search result and the entity search result according to the result evaluation information to obtain the sorted search results to be screened. Then, according to the preset screening rule, a more personalized target search result is determined from the search results to be screened.
[0072] Exemplarily, the initial search result can be: R v1 ,R v2 ...R vn ,R k1 ,R k2 ...R kn , combined with the target result evaluation model for result evaluation, the formula for result evaluation is as follows:
[0073] Score = (F user ) T ·F r ;
[0074] Among them, Score represents the calculated score, and the value range is between 0 and 1. F user represents the search object. Fr represents the search content, such as resume data. T represents the vector transpose.
[0075] The technical solution of the embodiment of the present invention obtains the search text information input by the search object and determines the object description information corresponding to the search object. According to the search text information, the object description information, and the target text optimization model obtained by pre-training, the search key information corresponding to the search text information is determined. The search vector information corresponding to the search key information is determined, and a search is performed in the pre-constructed data index library to obtain a vector search result, and, according to the search vector information, a search is performed in the data index library according to the search key information to obtain an entity search result. The vector search result and the entity search result are respectively input into the target result evaluation model corresponding to the search object to determine the result evaluation information corresponding to the search text information, and according to the result evaluation information, the target search result is determined, which solves the problem of insufficient personalization and search accuracy in the field of enterprise internal electronic files. The technical solution of the present invention is particularly valuable for application scenarios that provide high-quality search results. The technical solution of the present invention is particularly valuable for application scenarios that provide high-quality search results. When searching, the large model is used for intention recognition and user input enhancement, which can better understand the user's intention on the basis of hybrid retrieval for search optimization, and at the same time, combined with the target result evaluation model, more accurate and personalized intelligent retrieval is provided.
[0076] Based on the above embodiments, the determining of the initial search result in the pre-constructed data index library according to the search key information and the pre-trained target text vector model includes:
[0077] According to the search key information, search data information including the search key information is determined in the data index library, and the search data information is determined as the entity search result;
[0078] Based on the target text vector model, encode the search key information to obtain a search text vector, and determine a vector search result matching the search text vector in the data index library;
[0079] Combine the entity search result and the vector search result to obtain an initial search result.
[0080] Exemplarily, a keyword model can be used to extract entities from the search key information, and the extracted entity search results are marked as {R k1 ,R k2 ...R kn}. Encode the search key information using the target text vector model to obtain a search text vector. Match the corresponding vector search result in the data index library through the search text vector, and combine the entity search result and the vector search result to obtain an initial search result. The present invention optimizes the search through a hybrid retrieval method, and can better understand the user's intention during the search, and provide a more accurate and personalized intelligent retrieval.
[0081] Exemplarily, the search text vector can be represented by the following formula:
[0082] Q vec =Φ enc (Q e );
[0083] where Φ enc represents the target text vector model. Qe represents the search key information. Q vec represents the search text vector obtained after transforming the text data, such as [0.113, 0.441, 0.4413,..., 0.1333].
[0084] Exemplarily, determining the vector search result matching the search text vector in the data index library includes:
[0085] Based on the target text vector model, encode the index text information in the data index library to obtain an index text vector; match the index text vector with the search text vector to determine the text similarity information corresponding to each index text information; based on the text similarity information and a preset similarity threshold, determine the vector search result from each index text information.
[0086] Specifically, the index text information in the data index library can be encoded in the same way as the search text vector is determined to obtain the index text vector. The index text vector is matched with the search text vector to obtain the text similarity information corresponding to each index text information. The index text information with the text similarity information greater than or equal to the preset similarity threshold is determined as the vector search result.
[0087] Exemplarily, the process of determining the index text vector can be as follows:
[0088] X vec = Φ enc ([u1,…,u y );
[0089] Φ enc represents a vector model. u1,…,u y represents a large amount of data, such as 100,000 resume data. X vec represents the index text vector obtained after transforming the full amount of text data.
[0090] Exemplarily, determining the text similarity information corresponding to each index text information can be as follows:
[0091]
[0092] Where d represents distance, representing the degree of similarity. Cos represents cosine calculation, representing the dot product of vectors. ||x|| represents the modulus of vector x.
[0093] On the other hand, the technical solution of the embodiment of the present invention can use a vector retrieval engine for vector retrieval. The retrieval uses similarity for querying, sorts the search text vectors from high to low according to the similarity score, and maps the sorting of the index text information. Furthermore, a preset number of index text information is determined as the vector search result in the sorting of the index text information. Using a vector engine (such as faiss, milvus, etc.) can speed up the vector retrieval speed and obtain more accurate vector search results.
[0094] Embodiment 2
[0095] Figure 2 is a flowchart of a data information search method based on large model enhancement provided by the second embodiment of the present invention. On the basis of the above embodiments, the training process of the target result evaluation model is further refined. As Figure 2 shown, the method includes:
[0096] S201. Obtain the positive sample data and negative sample data corresponding to the search object.
[0097] Specifically, pre - constructed positive sample data and negative sample data are collected. It should be noted that positive sample data can refer to the data information that the search object truly has, and negative sample data can refer to the data information that the search object does not have.
[0098] Exemplarily, obtaining the positive sample data and negative sample data corresponding to the search object includes:
[0099] Obtaining the historical search results obtained by the search object according to the search description information, and determining the data with user operation behaviors (such as clicking, viewing details, liking, collecting, etc.) in the historical search results as positive sample data. Based on a preset screening mechanism, other data information except the historical search results is determined as negative sample data. For example, in the scenario of search information, according to the search description information, multiple exposure information (which can be understood as search result entries) can be obtained. The exposure information clicked by the search object is determined as positive sample data, and the exposure information not clicked by the search object is determined as negative sample data.
[0100] Among them, the search description information is the self - search introduction information of the search object, and the search description information includes search preference information, search interaction information, search habit information, etc.
[0101] Specifically, to determine the search description information provided by the search object, it can be provided by the search object, and can include collecting the data to be retrieved within the system (such as resume descriptions, financial product information, file data, etc.) for different application scenarios (such as resume search, product search, file retrieval), and the historical interaction behavior data generated between the user and the system entity (such as the search conditions of recruiters, the search history of documents, the personal search habit words of users, etc.). The data type can be mainly text data, including data descriptions, user inputs, user clicks (search results, links), etc.
[0102] Specifically, according to the search description information, the historical search results of the search object are searched and obtained. Further, the historical search results can be pre - processed. At the same time, a preset screening mechanism (such as random screening) can be used to screen negative sample data from other data information except the historical search results or select the unclicked exposure data as negative sample data (this data is used for the training of the target evaluation model).
[0103] Exemplarily, each piece of data (positive sample data or negative sample data) found is represented as: (q i , v j , label), where q i represents the user input data, v jIndicates the search results. "label" represents whether the search object is clicked, with a value of 0 or 1. Among them, the samples with "label" equal to 1 are represented as positive sample data; the samples with "label" equal to 0 are represented as negative sample data. The negative sample data collection method can be randomly sampling the data where the search object is not clicked in the exposure data. Exemplarily, the overall sample data is represented as Composed of one positive sample data and n negative sample data (the data collected here is used for the training of the vector model).
[0104] It should be noted that since the behavior of the search object has a certain trend and pattern, it is necessary to collect data within a certain period to capture the search focus of the search object in the near future. Preferably, the default setting for the span period is 7 days.
[0105] S202. Use the positive sample data, the negative sample data, and a pre-established neural network model to determine the output of the neural network model.
[0106] Among them, the output of the neural network model can refer to the sample similarity between each positive sample data and the negative sample data. The pre-established neural network model can be trained using the DSSM model (Deep Structured Semantic Models). Since the lengths of the positive sample data and the negative sample data may be long, a bi-LSTM (Bidirectional Long Short-Term Memory Networks) architecture is selected as the feature extraction module, and max-pooling is performed on all output vectors of the bidirectional LSTM as the features of the input data of the model.
[0107] Specifically, input the positive sample data and the negative sample data into the pre-established neural network model so that the neural network model calculates the sample similarity between the positive sample data and the negative sample data respectively, thereby obtaining each sample similarity.
[0108] S203. Based on a preset loss function, determine the hinge loss value of each sample data according to the output of the model.
[0109] It should be noted that the preset loss function can be the hinge loss function. The hinge loss function can be as follows:
[0110]
[0111] Among them, Represents the hinge loss value, with a decimal value. "max" means taking 0 or M +
[0112] cos(q, D + ) - cos(q, D- ) The maximum of the two. M represents the anchor point, which is used to control the minimum distance difference required between the two types of samples. cos represents taking the cosine value to calculate the distance between samples. q represents the anchor point sample. D + represents the positive sample, which is a sample belonging to the same category as the anchor point sample. D - represents the negative sample, which is a sample belonging to a different category from the anchor point sample.
[0113] Specifically, use the positive sample data, the negative sample data, and a pre-established neural network model to determine the output of the neural network model; based on a preset loss function, determine the hinge loss value of each sample data according to the model output.
[0114] S204. Adjust the network parameters in the neural network model according to the maximum hinge loss value.
[0115] Specifically, determine the maximum hinge loss value and perform backpropagation to adjust the parameters of the neural network model.
[0116] S205. When the end training condition is reached, determine the trained neural network model as the target result evaluation model.
[0117] It should be noted that the end training condition includes that the hinge loss value shows no trend of continuous decline after a certain number of times, or the number of model iterations reaches a preset number.
[0118] S206. Obtain the search text information input by the search object, and determine the object description information corresponding to the search object.
[0119] S207. According to the search text information, the object description information, and a pre-trained target text optimization model, determine the search key information corresponding to the search text information.
[0120] S208. Determine the search vector information corresponding to the search key information, search in a pre-constructed data index library to obtain a vector search result, and, according to the search vector information, search in the data index library according to the search key information to obtain an entity search result.
[0121] S209. Input the vector search result and the entity search result into the target result evaluation model corresponding to the search object respectively, obtain the result evaluation information output by the target result evaluation model, and perform sorting processing on the vector search result and the entity search result according to the result evaluation information to obtain the target search result.
[0122] In the technical solution of the embodiment of the present invention, training the neural network model according to positive sample data and negative sample data can help the target result evaluation model learn more effective evaluation representations, thereby improving the accuracy of the evaluation result and making it more in line with the personalized actual search results of the search object.
[0123] Embodiment III
[0124] Figure 3 It is a schematic structural diagram of a data information search device based on large model enhancement provided by Embodiment III of the present invention. As Figure 3 shown, the device includes:
[0125] A search text information acquisition module 301, configured to acquire the search text information input by the search object and determine the object description information corresponding to the search object; wherein, the object description information is the historical search feature of the search object;
[0126] A search key information determination module 302, configured to determine the search key information corresponding to the search text information according to the search text information, the object description information, and a pre-trained target text optimization model; wherein, the description of the search information in the search key information is more detailed than the search text information;
[0127] An initial search result determination module 303, configured to determine the search vector information corresponding to the search key information, search in a pre-constructed data index library to obtain a vector search result, and, according to the search vector information, search in the data index library according to the search key information to obtain an entity search result;
[0128] A target search result determination module 304, configured to respectively input the vector search result and the entity search result into the target result evaluation model corresponding to the search object, obtain the result evaluation information output by the target result evaluation model, and sort the vector search result and the entity search result according to the result evaluation information to obtain a target search result.
[0129] The technical solution of the embodiment of the present invention obtains the search text information input by the search object and determines the object description information corresponding to the search object. According to the search text information, the object description information, and the target text optimization model obtained by pre-training, the search key information corresponding to the search text information is determined. The search vector information corresponding to the search key information is determined, and a search is performed in the pre-constructed data index library to obtain a vector search result. Moreover, according to the search vector information, a search is performed in the data index library based on the search key information to obtain an entity search result. The vector search result and the entity search result are respectively input into the target result evaluation model corresponding to the search object to determine the result evaluation information corresponding to the search text information, and based on the result evaluation information, the target search result is determined, which solves the problem of insufficient personalization and search accuracy in the field of enterprise internal electronic files. The technical solution of the present invention is particularly valuable for application scenarios that provide high-quality search results. The technical solution of the present invention is particularly valuable for application scenarios that provide high-quality search results. When searching, it uses a large model for intention recognition and user input enhancement, can better understand the basis of user intentions, optimizes the search in a hybrid retrieval manner, and at the same time combines the target result evaluation model to provide more accurate and personalized intelligent retrieval.
[0130] Optionally, the search key information determination module 302 is specifically configured to:
[0131] Input the search text information and the object description information into the target text optimization model, so that the target text optimization model performs text optimization processing on the search text information with reference to the object description information;
[0132] According to the output of the target text optimization model, obtain the search key information corresponding to the search text information, where the search key information includes at least one search keyword.
[0133] Optionally, the initial search result determination module 303 includes:
[0134] A vector encoding unit, configured to encode the search key information based on the target text vector model obtained by pre-training to obtain a search text vector;
[0135] A vector search unit, configured to perform a search in the pre-constructed data index library to obtain a vector search result that matches the search text vector.
[0136] Optionally, the vector search unit is specifically configured to:
[0137] Determine the search category corresponding to the search text vector, where the search category includes at least personnel category, administrative category, and training documents;
[0138] Determine a sub-index library corresponding to the search category in the data index library, and determine a vector search result that matches the search text vector in the sub-index library.
[0139] Optionally, the target search result determination module 304 is specifically configured to:
[0140] According to the result evaluation information, sort the vector search result and the entity search result to obtain a sorted search result to be filtered;
[0141] Based on a preset filtering rule, determine a target search result from the search results to be filtered. Optionally, the device further includes a result evaluation model training module.
[0142] Among them, the evaluation model training module includes:
[0143] A sample data acquisition unit for acquiring positive sample data and negative sample data corresponding to the search object;
[0144] A sample input unit for inputting the positive sample data, the negative sample data and a pre-established neural network model.
[0145] A hinge loss value determination unit for determining a hinge loss value of each sample data and the corresponding label based on a preset loss function according to the sample similarity;
[0146] A network parameter adjustment unit for adjusting network parameters in the neural network model by using a backpropagation algorithm according to the maximum hinge loss value;
[0147] An evaluation model determination unit for determining the trained neural network model as a target result evaluation model when the end training condition is reached.
[0148] Optionally, the sample data acquisition unit is specifically configured to:
[0149] Obtain historical search results obtained by the search object according to search description information, and determine the historical search results as positive sample data, where the search description information is the self-search introduction information of the search object, and the search description information includes search preference information, search interaction information, and search habit information;
[0150] Based on a preset filtering mechanism, determine other data information except the historical search results as negative sample data.
[0151] The data information search device based on large model enhancement provided by the embodiments of the present invention can execute the data information search method based on large model enhancement provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0152] Embodiment 4
[0153] Figure 4 Fig. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0154] As Figure 4 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0155] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0156] The processor 11 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data information search method enhanced based on a large model.
[0157] In some embodiments, the data information search method enhanced based on a large model can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data information search method enhanced based on a large model described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the data information search method enhanced based on a large model by any other suitable means (e.g., by means of firmware).
[0158] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, the one or more computer programs being executable and / or interpretable on a programmable system including at least one programmable processor, the programmable processor being a special or general-purpose programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0159] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0160] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0161] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0162] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of the communication network include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0163] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0164] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0165] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A data information search method enhanced based on a large model, characterized in that Including: Obtain the search text information input by the search object, and determine the object description information corresponding to the search object; wherein, the object description information is the historical search feature of the search object; According to the search text information, the object description information, and the target text optimization model obtained by pre-training, determine the search key information corresponding to the search text information; wherein, the description of the search information in the search key information is more detailed than the search text information; Determine the search vector information corresponding to the search key information, search in the pre-constructed data index library to obtain the vector search result, and, according to the search key information, search in the data index library to obtain the entity search result; Input the vector search result and the entity search result into the target result evaluation model corresponding to the search object respectively, obtain the result evaluation information output by the target result evaluation model, and sort the vector search result and the entity search result according to the result evaluation information to obtain the target search result.
2. The method according to claim 1, wherein The step of determining the search key information corresponding to the search text information according to the search text information, the object description information, and the target text optimization model obtained by pre-training includes: Input the search text information and the object description information into the target text optimization model, so that the target text optimization model performs text optimization processing on the search text information with reference to the object description information; According to the output of the target text optimization model, obtain the search key information corresponding to the search text information, wherein the search key information includes at least one search keyword.
3. The method according to claim 1, wherein The step of determining the search vector information corresponding to the search key information, searching in the pre-constructed data index library to obtain the vector search result includes: Based on the target text vector model obtained by pre-training, encode the search key information to obtain the search text vector; Search in the pre-constructed data index library to obtain the vector search result that matches the search text vector.
4. The method according to claim 3, characterized in that, Determining the vector search result that matches the search text vector in the data index library includes: Determine the search category corresponding to the search text vector, wherein the search category includes at least personnel category, administrative category, and training documents; Determine the sub-index library corresponding to the search category in the data index library, and determine the vector search result that matches the search text vector in the sub-index library.
5. The method according to claim 1, wherein The step of sorting the vector search result and the entity search result according to the result evaluation information to obtain the target search result includes: Sort the vector search result and the entity search result according to the result evaluation information to obtain the sorted search results to be screened; Based on the preset screening rules, determine the target search result from the search results to be screened.
6. The method according to claim 1, wherein The process of training the target result evaluation model includes: Obtain the positive sample data and negative sample data corresponding to the search object; Determine the output of the neural network model using the positive sample data, the negative sample data, and a pre-established neural network model; based on a preset loss function, determine the hinge loss value of each sample data according to the output of the model; adjust the network parameters in the neural network model; When the end training condition is reached, determine the trained neural network model as the target result evaluation model.
7. The method according to claim 6, wherein Obtain the positive sample data and negative sample data corresponding to the search object, including: Obtain the historical search results obtained by the search object according to the search description information, and determine the historical search results as the positive sample data, where the search description information is the self-search habit introduction information of the search object, and the search description information includes search preference information, search interaction information, and search habit information; Based on a preset screening mechanism, determine other data information except the historical search results as the negative sample data.
8. A data information search device enhanced based on a large model, characterized in that, Include: A search text information acquisition module, configured to acquire the search text information input by the search object and determine the object description information corresponding to the search object; where the object description information is the historical search feature of the search object; A search key information determination module, configured to determine the search key information corresponding to the search text information according to the search text information, the object description information, and a pre-trained target text optimization model; where the description of the search information in the search key information is more detailed than the search text information; An initial search result determination module, configured to determine the search vector information corresponding to the search key information, search in a pre-constructed data index library to obtain a vector search result, and, according to the search vector information, search in the data index library according to the search key information to obtain an entity search result; A target search result determination module, configured to input the vector search result and the entity search result into the target result evaluation model corresponding to the search object respectively, obtain the result evaluation information output by the target result evaluation model, and perform sorting processing on the vector search result and the entity search result according to the result evaluation information to obtain the target search result.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; where, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data information search method based on large model enhancement according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to implement the data information search method based on large model enhancement according to any one of claims 1-7 when executed.
Citation Information
Cited By
Search system updating method and device based on large language model, equipment and storage medium
CN121116353A