Process data retrieval method and device, electronic equipment, storage medium and product
By searching keywords in vectors and combining the search results of relational databases and vector databases, the MMR algorithm is used to solve the problem of limitations in the process data search results in the prior art, achieving higher accuracy and diversity in search results.
Patent Information
- Application Number
- CN202411652869.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing relational databases can only perform full-word matching or fuzzy matching in process data retrieval, resulting in limited search results and low accuracy of semantic search, making it difficult to retrieve information similar to keywords.
By vectorizing the search keywords and obtaining vectorized results from the pre-trained AI model, searching the matching results from the relational database and the vector database respectively, using the maximum boundary correlation algorithm (MMR) to derepeat and sort, and finally combining the two Results to improve retrieval accuracy.
The accuracy of process data retrieval is improved, and through the method of mixing searching relational databases and vector databases, more intelligent and diversified search results are provided, which is more accurate than semantic search methods.
Smart Images

Figure CN119166669A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data retrieval technology, and in particular to a process data retrieval method, device, electronic device, storage medium and product. Background Art
[0002] Business process data usually consists of multiple parts, including node information, node operators, node operation menus, process definitions and other data. These data are generally stored in relational databases. If you want to search for process data by keywords, relational databases can only achieve full-word matching or fuzzy matching, and the search results are limited.
[0003] In order to make the retrieval more intelligent and rich, semantic retrieval is currently added to the traditional relational database retrieval function. Semantic retrieval can retrieve words or information similar to keywords, so that even if the node names are different, the processes of similar nodes can be retrieved to improve the rationality of the analysis process. However, the accuracy of semantic retrieval is not high. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a process data retrieval method, device, electronic device, storage medium and product, which can improve the retrieval accuracy.
[0005] In order to achieve the above purpose, the technical solutions provided by the embodiments of the present application are as follows: In a first aspect, the present application provides a process data retrieval method, the method comprising: based on a search keyword, retrieving a first search result matching the search keyword from a relational database, the relational database being used to store process data corresponding to different process IDs; vectorizing the search keyword, and retrieving a second search result matching the vector of the search keyword from a vector database; wherein the vector database comprises a vector library table of process data corresponding to different process IDs, and / or a vector library table of process labels associated with the process ID; utilizing the process ID to deduplicate the first search result and the second search result, and determining a target search result after deduplication.
[0006] As an optional implementation provided in the present application, the search keywords are vectorized, including: inputting the search keywords into a pre-trained AI model for vectorization, and obtaining a vector of the search keywords output by the pre-trained AI model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
[0007] As an optional implementation provided by the implementation of the present application, before inputting the search keyword into the pre-trained AI model, it also includes: obtaining a business data test set with the same business field as the search keyword; inputting the business data test set into the pre-trained AI model to obtain a vector of the business data test set; judging whether the vector of the business data test set meets the preset requirements; in response to the vector of the business data test set meeting the preset requirements, executing the input of the search keyword into the pre-trained AI model.
[0008] As an optional implementation provided by the implementation of the present application, the second search result includes: a vector of process data with a similarity top_j with the vector of the search keyword, and / or a vector of process labels; after retrieving the second search result from the vector database according to the vectorized search keyword, the method also includes: based on the maximum margin correlation algorithm MMR, selecting the vector of process data with an MMR score top_p, and / or a vector of process labels from the second search result; wherein j and p are positive integers, and j is greater than p; using the process ID to deduplicate the vector of process data with an MMR score top_p, and / or the vector of process labels, and comprehensively sorting the deduplication results according to the similarity, selecting the vector with a similarity top_m as the new second search result, where m is a positive integer, to perform deduplication on the first search result and the second search result using the process ID, and determining the target search result after deduplication.
[0009] As an optional implementation provided by the present application, the target search results are sorted according to priority, wherein the priority of the first search result is greater than that of the second search result, and the greater the similarity among the search results, the higher the priority.
[0010] In a second aspect, the present application provides a process data retrieval device, the device comprising: A first search module is used to retrieve a first search result matching the search keyword from a relational database according to the search keyword, and the relational database is used to store process data corresponding to different process IDs; A second search module is used to vectorize the search keyword and retrieve a second search result that matches the vector of the search keyword from a vector database; wherein the vector database is used to store vectors of process data corresponding to different process IDs and / or vectors of process labels associated with the process IDs; The deduplication module is used to use the process ID to deduplicate the first search result and the second search result, and determine the target search result after deduplication.
[0011] As an optional implementation provided by the implementation of the present application, the device also includes a vectorization module, which is used to: input the search keyword into a pre-trained AI model for vectorization, and obtain the vector of the search keyword output by the pre-trained AI model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
[0012] As an optional implementation provided by the implementation of the present application, the device also includes a training module, which is used to: obtain a business data test set with the same business field as the search keyword; input the business data test set into the pre-trained AI model to obtain a vector of the business data test set; determine whether the vector of the business data test set meets the preset requirements; in response to the vector of the business data test set meeting the preset requirements, execute the input of the search keyword into the pre-trained AI model.
[0013] As an optional implementation provided by the implementation of the present application, the second search result includes: a vector of process data with a similarity top_j with the vector of the search keyword, and / or a vector of process labels; the second retrieval module is also used to: based on the maximum margin correlation algorithm MMR, select the vector of process data with an MMR score top_p, and / or a vector of process labels from the second search result; wherein j and p are positive integers, and j is greater than p; use the process ID to deduplicate the vector of process data with an MMR score top_p, and / or the vector of process labels, and comprehensively sort the deduplication results according to the similarity, select the vector with a similarity top_m as the new second search result, m is a positive integer, to execute the deduplication of the first search result and the second search result using the process ID, and determine the target search result after deduplication.
[0014] As an optional implementation provided by the present application, the target search results are sorted according to priority, wherein the priority of the first search result is greater than that of the second search result, and the greater the similarity among the search results, the higher the priority.
[0015] In a third aspect, the present application provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the process data retrieval method as described in the first aspect or any one of its optional embodiments is implemented.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the process data retrieval method as described in the first aspect or any optional embodiment thereof.
[0017] In a fifth aspect, the present application provides a computer program product, including: the computer program product includes a computer program, and when the computer program runs on a computer, the computer implements the process data retrieval method as described in the first aspect or any optional embodiment thereof.
[0018] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages: The disclosed embodiment provides a process data retrieval method, firstly, based on the retrieval keyword, a first search result matching the retrieval keyword is retrieved from a relational database storing process data corresponding to different process IDs; then, the retrieval keyword is vectorized, and a second search result matching the vector of the retrieval keyword is retrieved from a vector database, wherein the vector database stores a vector library table of process data corresponding to different process IDs, and / or a vector library table of process labels associated with different process IDs; then, the first search result and the second search result are deduplicated based on the process ID, and a target search result is determined after deduplication. In this way, by hybrid retrieval of a relational database and a pre-constructed vector database, the first search result and the second search result are obtained respectively, and the target search result is obtained by comprehensive processing of the two search results, which has a higher accuracy rate than the relational database retrieval method with semantic retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A flowchart of a process data retrieval method provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a process data retrieval device provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device described in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the technical terms required to be used in the embodiments or the prior art description are briefly introduced below: Maximal Marginal Relevance (MMR) is an algorithm used in fields such as information retrieval and text summarization. Its main purpose is to maximize the diversity of results while ensuring relevance. For example, in a text retrieval system, when a user enters a query, the system should not only return documents that are highly relevant to the query, but also avoid returning a group of documents with very similar content to provide richer information. MMR can be used to sort search results. In addition to considering the relevance of documents to user queries, diversity can also be used to improve user experience.
[0023] The common MMR formula can be expressed as:
[0024] Where D i is the document to be sorted, Q is the query, Rel(D i ,Q) is the relevance score between the document and the query, sim(D i ,D j ) is the similarity between the document and the selected document, and λ is a weight parameter used to balance relevance and diversity. The documents are sorted according to the scores calculated by this formula, and the documents with higher scores are ranked first.
[0025] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0027] In order to solve some or all of the technical problems existing in the related art, the embodiments of the present application provide a process data retrieval method, device, electronic device, storage medium and product, wherein the method first retrieves a first search result matching the search keyword from a relational database storing process data corresponding to different process IDs based on the search keyword; then the search keyword is vectorized, and a second search result matching the vector of the search keyword is retrieved from the vector database, wherein the vector database stores a vector library table of process data corresponding to different process IDs, and / or a vector library table of process labels associated with different process IDs; then the first search result and the second search result are deduplicated based on the process ID, and the target search result is determined after deduplication. In this way, by hybrid retrieval of the relational database and the pre-constructed vector database, the first search result and the second search result are obtained respectively, and the target search result is obtained by comprehensive processing of the two search results, which has a higher accuracy rate than the relational database retrieval method with semantic retrieval.
[0028] A process data retrieval method provided in the embodiments of the present application can be implemented by a process data retrieval device or an electronic device, and the electronic device includes but is not limited to a vehicle terminal, a server, a personal computer, a laptop computer, a tablet computer, a smart phone, etc. The operating system of the electronic device may include Android, a mobile operating system (iOS) developed by Apple, an operating system (Windows) developed by Microsoft Corporation of the United States, etc., and the embodiments of the present application are not limited to this. The electronic device can be run alone to implement the present application, or it can be connected to the network and implement the present application through interactive operations with other computer devices in the network. Among them, the network where the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN) network, etc.
[0029] It should be noted that the protection scope of the process data retrieval method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0030] like Figure 1 As shown, Figure 1 1 is a flow chart of a process data retrieval method according to an embodiment of the present application. The method can be executed by a process data retrieval device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method mainly includes the following steps S101 to S103: S101. According to a search keyword, obtain a first search result matching the search keyword from a relational database.
[0031] Among them, a relational database is a database based on a relational model, which includes structured process data, and the process data includes at least one of the following: node type, node name, node operator, node operation menu, node form field; node types include: start node, approval node, processing node, end node, etc. A relational database uses a two-dimensional table to store process data.
[0032] In the process of executing step S101, user input is first obtained, and a search keyword is extracted from the user input. The search keyword is used to search the relational database, specifically, full word matching or field fuzzy matching is performed to obtain first process data matching the search keyword, which can be recorded as first process data A. A preliminary search is performed using the relational database.
[0033] S102: vectorize the search keyword, and retrieve from a vector database a second search result that matches the vector of the search keyword.
[0034] Among them, the vector database (milvus) is a pre-built vector library table for storing process data corresponding to different process IDs, and / or a vector library table of process labels associated with process IDs; the vector library table of process data includes: at least one item in the node name vector library table, the node operator vector library table, and the node form field vector library table; the process label is used to describe the process definition.
[0035] There is a mapping relationship between the vector database and the relational database. Specifically, the vector of each process data in the vector database can be mapped to the process ID in the relational database.
[0036] In some embodiments, after the process configuration is completed, several different types of process labels are pre-configured to describe the definition of the process. The process label is vectorized to obtain a vector of the process label, which is independently stored in a vector library table of the vector database. This vector library table can be defined as a process label vector library table. Optionally, the vector of the process label is associated with the process ID, and the association between the two can also be stored in a relational database.
[0037] In some embodiments, constructing a vector database includes: designing a structure of the vector database; performing vectorization processing on process data to obtain a vector of the process data, and saving the vector corresponding to the process ID.
[0038] Optionally, the process data is vectorized based on the m3e-base model, which is used to convert text into vectors. Based on the m3e-base model, the node name, node operator, and node form field are vectorized to obtain the node name vector, node operator vector, and node form field vector, which are stored in different vector library tables to obtain the node name vector library table, node operator vector library table, and node form field vector library table. Each vector library table is relatively independent.
[0039] The above-mentioned embodiment pre-builds a vector database for process data retrieval, provides technical preparation for process data retrieval, and ensures the executability of the process data retrieval method of the present application.
[0040] In some embodiments, when executing step S102 to vectorize the search keywords, it includes: inputting the search keywords into a pre-trained AI model for vectorization to obtain a vector of the search keywords output by the pre-trained model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
[0041] In some embodiments, before inputting the search keyword into the pre-trained AI model, it also includes: obtaining a business data test set that is the same as the business field corresponding to the search keyword; inputting the business data test set into the pre-trained AI model to obtain a vector of the business data test set; determining whether the vector of the business data test set meets the preset requirements; in response to the vector of the business data set meeting the preset requirements, executing the input of the search keyword into the pre-trained AI model. Optionally, the vector of the business data test set output by the pre-trained AI model is used as a predicted value, and the business data test set includes a business data vector as a true value. The preset requirement is that the loss function value between the predicted value and the true value is less than or equal to the loss function threshold. The above embodiment tests the vector retrieval effect of the pre-trained AI model based on a business data test set that is the same as the business field corresponding to the search keyword.
[0042] On the basis of the above embodiment, if it is determined that the vector of the business data test set does not meet the preset requirements, the model parameters of the pre-trained AI model are adjusted; the business data training set is input into the pre-trained AI model after the model parameters are adjusted to obtain the vector of the new business data test set, and it is determined whether the vector of the new business data test meets the preset requirements; the above steps are repeated until the vector of the business data test set meets the preset requirements, and the pre-trained AI model at this time is determined; then the search keyword is input into the pre-trained AI model to obtain the vector of the search keyword. Thus, based on the business data test set with the same business field as the search keyword, the pre-trained AI model is trained and fine-tuned, and the vectorization results of the pre-trained AI model for a specific business field are optimized, which can improve the text similarity.
[0043] The above embodiment associates business data with a pre-trained AI model so that the output of the pre-trained AI model can be more in line with the specific business field.
[0044] The second search result obtained by executing step S102 includes: a vector of process data whose similarity with the vector of the search keyword is greater than a preset threshold, and / or a vector of process labels. The preset threshold is a pre-set similarity threshold, such as 400. The vector of process data includes: a node name vector, a node operator vector, and a node form field vector. The number of vectors of each type in the second search result can be multiple. Optionally, the second search result includes: a vector of process data whose similarity with the vector of the search keyword is top_j, and / or a vector of process labels, exemplarily j=1, 2, 3...10.
[0045] When executing step S102, different vector libraries may be searched using the vector of the search keyword to obtain the vector of the matching process data and the vector of the process label, including: searching the node name vector library using the vector of the search keyword to obtain the node name vector Bi matching the vector of the search keyword, i is a positive integer; searching the node operator vector library using the vector of the search keyword to obtain the node operator vector Ci matching the vector of the search keyword; searching the node form field vector library using the vector of the search keyword to obtain the node form field vector Di matching the vector of the search keyword; searching the process label vector library using the vector of the search keyword to obtain the process label vector Ei matching the vector of the search keyword. Exemplarily, i is greater than or equal to 10.
[0046] In some embodiments, a vector with similarity top_j is selected from the second search result, where j < i. Specifically, the second search result is sorted by similarity in descending order of similarity for the node name vector Bi, the node operator vector Ci, the node form field vector Di, and the process label vector Ei that match the search keyword, and the top j vectors are selected, where j = 1, 2, 3 ... 10, indicating that the top 10 vectors with similarity are selected from the second search result, and the node name vector Bj, the node operator vector Cj, the node form field vector Dj, and the process label vector Ej are obtained, where j = 1, 2, 3 ... 10.
[0047] On the basis of the above embodiment, the vectors with the MMR score top_p between the vectors of the search keywords are selected based on the maximum boundary correlation algorithm, p<j. For vectors with different types of similarity top_j, the vectors with similarity top_j are calculated using MMR to obtain the MMR score Score of each vector. Taking the node name vector Bj as an example, the node name vector Bj is similarly calculated using MMR to obtain the MMR score Score(Bj) of each vector. Similarly, the node operator vector Cj, the node form field vector Dj and the process label vector Ej are calculated using MMR to obtain the MMR score Score(Cj), Score(Dj), and Score(Ej) of each vector. Then, the vectors with the MMR score top_p are selected respectively, that is, the first p vectors are selected respectively according to the MMR score. For example, p=5, and the node name vector Bp, the node operator vector Cp, the node form field vector Dp and the process label vector Ep are obtained, where p=1, 2, 3...5.
[0048] The above embodiment uses MMR to filter search results, retains the diversity of search results, and avoids redundancy of search results.
[0049] In some embodiments, the second search results retrieved in step S102 are deduplicated based on the process ID, search results with the same process ID in the second search results are removed, new second search results are screened, and subsequent step S103 is executed.
[0050] Specifically, since the process ID is in string format, when performing deduplication based on the process ID, first create an empty array, loop through the process ID of the second search result, and determine whether the same process ID string exists in the array each time. If there is no same process ID string, add the process ID string to the array; if there is a same process ID string, skip the current loop and enter the next loop.
[0051] Optionally, the vectors with the MMR score top_p are deduplicated according to the process ID, and the deduplicated results can be comprehensively sorted according to the similarity score, and then the vector with the similarity top_q is selected as the new second search result, and step S103 is executed. The deduplicated result is still the result retrieved from the vector database, which is a similar semantic search. Each result corresponds to a similarity score. The higher the similarity score, the more similar it is to the vector of the search keyword. The similarity is used as the basis for re-screening, so as to obtain a vector with a higher similarity to the vector of the search keyword.
[0052] Specifically, the vectors of the aforementioned MMR score top_p (node name vector Bp, node operator vector Cp, node form field vector Dp and process label vector Ep, for example, p=1, 2, 3...5) are deduplicated according to the process ID to obtain the node name vector Bq, node operator vector Cq, node form field vector Dq and process label vector Eq, and then all vectors are comprehensively sorted according to the similarity score, and the similarity top_m is selected as the new second search result F. For example, m=10 indicates that the number of vectors contained in the second search result F is 10, which are the top ten vectors in similarity score. The above embodiment searches the vector database according to the vectorized search keywords to obtain the second search result, thereby expanding the search scope, and being able to obtain search results that are related to the search keywords and are more intelligent and diversified, which is conducive to improving the accuracy of process data retrieval.
[0053] S103: De-duplicate the first search result and the second search result by using the process ID, and determine the target search result after de-duplicate.
[0054] Specifically, the search results with the same process ID in the first search result and the second search result are removed to avoid duplication. The number of target search results can be one or more, depending on the number of the first search result and the second search result.
[0055] Optionally, the deduplication results of step S103 are sorted in order of priority to obtain the final target search results, which are returned to the user. The priority of the first search result is higher than the second search result, and the greater the similarity in the search results, the higher the priority.
[0056] It should be noted that the second search result is richer and smarter, but the first search result is more accurate than the second search result. Therefore, in the embodiment of the present application, the priority of the first search result is set to be higher than the second search result. This is an optimization on the basis of ensuring the accuracy of the search. In this way, the first search result and the second search result are deduplicated using the process ID, and the target search result determined after deduplication has high accuracy and a wider range.
[0057] In some embodiments, the process data retrieval method provided by the embodiments of the present disclosure includes the following steps S201 to S206: S201. According to a search keyword, obtain a first search result from a relational database.
[0058] The first search result is recorded as A.
[0059] S202: Perform vectorization processing on the search keyword input by the user based on the m3e-base model to obtain a vector of the search keyword.
[0060] The m3e-base model is a convergent model pre-trained based on sample process data.
[0061] S203: Retrieve a second search result from a vector database according to the vector of the search keyword.
[0062] Before step S203, a vector database is pre-built: first, several different types of process labels are pre-configured to describe the definition of the process, and the vectorized process labels are associated with the process ID and stored; based on the m3e-base model, the node name, node operator, and node form field are respectively vectorized and stored in different vector library tables. The vector library tables include: a node name vector library table, a node operator vector library table, a node form field vector library table, and a process label vector library table.
[0063] Specifically, the similarity between each data in the vector database and the vector of the search keyword is calculated, and for each vector database table, the top 10 vectors with larger similarity scores are selected to obtain the second search result.
[0064] The second search result obtained in step S203 includes: a node name vector Bj, a node operator vector Cj, a node form field vector Dj and a process label vector Ej, where j=1, 2, 3...10.
[0065] S204: Select the top 5 results with the highest MMR scores from the second search results based on the MMR.
[0066] Step S204 selects the top 5 MMR score results based on MMR from (node name vector Bj, node operator vector Cj, node form field vector Dj and process label vector Ej, j=1, 2, 3...10), including: node name vector Bp, node operator vector Cp, node form field vector Dp and process label vector Ep, where p=1, 2, 3...5.
[0067] S205: De-duplicate the top 5 similarity results according to the process ID, and then select the top 10 results with the largest similarity.
[0068] In step S205, the top 5 results are deduplicated according to the process ID to obtain the node name vector Bq, the node operator vector Cq, the node form field vector Dq and the process label vector Eq, and then the top 10 similarity results are selected from these vectors, which are recorded as result F.
[0069] S206: De-duplicate the first search result and the top 10 similarity results according to the process ID, and then sort them in order of priority to obtain the target search result. The priority of the first search result is higher than the top 10 similarity results; the number of target search results can be one or more.
[0070] In summary, the process data retrieval method provided in the present application first retrieves the first search result matching the search keyword from a relational database storing process data corresponding to different process IDs based on the search keyword; then the search keyword is vectorized, and a second search result matching the vector of the search keyword is retrieved from the vector database, wherein the vector database stores a vector library table of process data corresponding to different process IDs, and / or a vector library table of process labels associated with different process IDs; then the first search result and the second search result are deduplicated based on the process ID, and the target search result is determined after deduplication. In this way, the first search result and the second search result are obtained respectively by hybrid retrieval of the relational database and the pre-constructed vector database, and the target search result is obtained by comprehensive processing of the two search results, which has a higher accuracy rate than the relational database retrieval method with semantic retrieval.
[0071] like Figure 2 As shown, Figure 2 A schematic diagram of the structure of a process data retrieval device provided in an embodiment of the present application, the device comprising: A first search module 210 is used to retrieve a first search result matching the search keyword from a relational database according to the search keyword, and the relational database is used to store process data corresponding to different process IDs; The second search module 211 is used to vectorize the search keyword and retrieve a second search result that matches the vector of the search keyword from a vector database; wherein the vector database is used to store vectors of process data corresponding to different process IDs and / or vectors of process labels associated with process IDs; The deduplication module 212 is used to use the process ID to dedupe the first search result and the second search result, and determine the target search result after deduplication.
[0072] As an optional implementation provided by the implementation of the present application, the device also includes a vectorization module, which is used to: input the search keyword into a pre-trained AI model for vectorization, and obtain the vector of the search keyword output by the pre-trained AI model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
[0073] As an optional implementation provided by the implementation of the present application, the device also includes a training module, which is used to: obtain a business data test set that is the same as the business field corresponding to the search keyword; input the business data test set into a pre-trained AI model to obtain a vector of the business data test set; determine whether the vector of the business data test set meets preset requirements; in response to the vector of the business data test set meeting the preset requirements, execute the input of the search keyword into the pre-trained AI model.
[0074] As an optional implementation provided by the implementation of the present application, the second search result includes: a vector of process data with a similarity top_j with the vector of the search keyword, and / or a vector of process labels; the second retrieval module 211 is also used to: based on the maximum margin correlation algorithm MMR, select the vector of process data with an MMR score top_p, and / or a vector of process labels from the second search result; wherein j and p are positive integers, and j is greater than p; use the process ID to deduplicate the vector of process data with an MMR score top_p, and / or the vector of process labels, and comprehensively sort the deduplication results according to the similarity, select the vector with a similarity top_m as the new second search result, m is a positive integer, to execute the deduplication of the first search result and the second search result using the process ID, and determine the target search result after deduplication.
[0075] As an optional implementation provided by the present application, the target search results are sorted according to priority, wherein the priority of the first search result is greater than that of the second search result, and the greater the similarity among the search results, the higher the priority.
[0076] For the specific definition of the process data retrieval device, please refer to the definition of the process data retrieval method above, which will not be repeated here. Each module in the above process data retrieval device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0077] In one embodiment, the present application provides an electronic device, which may be a terminal, and its internal structure diagram may be as follows: Figure 3As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a process data retrieval method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0078] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. Specifically, the electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0079] In one embodiment, the process data retrieval device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 3 The memory of the electronic device may store various program modules constituting the process data retrieval device, for example, Figure 2 The first retrieval module 210, the second retrieval module 211 and the deduplication module 212 are shown. The computer program composed of various program modules enables the processor to execute the steps of the process data retrieval method of each embodiment of the present application described in this specification.
[0080] For example, Figure 3 The electronic device shown can be Figure 2In the process data retrieval device shown, the first retrieval module 210 executes, based on the retrieval keyword, to retrieve from the relational database a first search result that matches the retrieval keyword, and the relational database is used to store process data corresponding to different process IDs; the electronic device can execute vectorization of the retrieval keyword through the second retrieval module 211, and retrieve from the vector database a second search result that matches the vector of the retrieval keyword; wherein the vector database is used to store vectors of process data corresponding to different process IDs, and / or vectors of process labels associated with the process ID; the electronic device can execute deduplication module 212 to deduplicate the first search result and the second search result using the process ID, and determine the target search result after deduplication.
[0081] In one embodiment, the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: According to the search keyword, a first search result matching the search keyword is retrieved from a relational database, and the relational database is used to store process data corresponding to different process IDs; the search keyword is vectorized, and a second search result matching the vector of the search keyword is retrieved from the vector database; wherein the vector database includes a vector library table of process data corresponding to different process IDs, and / or a vector library table of process tags associated with the process ID; the first search result and the second search result are deduplicated using the process ID, and a target search result is determined after deduplication.
[0082] In one embodiment, when the processor executes the computer program, it also implements the following steps: vectorizing the search keywords, including: inputting the search keywords into a pre-trained AI model for vectorization, and obtaining a vector of the search keywords output by the pre-trained AI model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
[0083] In one embodiment, the processor also implements the following steps when executing the computer program: before inputting the search keyword into the pre-trained AI model, it also includes: obtaining a business data test set with the same business field as the search keyword; inputting the business data test set into the pre-trained AI model to obtain a vector of the business data test set; determining whether the vector of the business data test set meets the preset requirements; in response to the vector of the business data test set meeting the preset requirements, executing the input of the search keyword into the pre-trained AI model.
[0084] In one embodiment, the processor further implements the following steps when executing the computer program: the second search result includes: a vector of process data with a similarity top_j with the vector of the search keyword, and / or a vector of process labels; after retrieving the second search result from the vector database according to the vectorized search keyword, the method further includes: based on the maximum margin correlation algorithm MMR, selecting the vector of process data with an MMR score top_p and / or a vector of process labels from the second search result respectively; wherein j and p are positive integers, and j is greater than p; using the process ID to deduplicate the vector of process data with an MMR score top_p and / or the vector of process labels, and comprehensively sorting the deduplication results according to the similarity, selecting the vector with a similarity top_m as the new second search result, where m is a positive integer, to perform deduplication on the first search result and the second search result using the process ID, and determining the target search result after deduplication.
[0085] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the target search results are sorted according to priority, wherein the priority of the first search result is greater than the second search result, and the greater the similarity among the search results, the higher the priority.
[0086] When the processor in the electronic device provided by the present application executes a computer program, it first retrieves a first search result matching the search keyword from a relational database storing process data corresponding to different process IDs based on the search keyword; then, the search keyword is vectorized, and a second search result matching the vector of the search keyword is retrieved from the vector database, wherein the vector database stores a vector library table of process data corresponding to different process IDs, and / or a vector library table of process labels associated with different process IDs; then, the first search result and the second search result are deduplicated based on the process ID, and the target search result is determined after deduplication. In this way, by hybrid retrieval of the relational database and the pre-constructed vector database, the first search result and the second search result are obtained respectively, and the target search result is obtained by comprehensive processing of the two search results, which has a higher accuracy rate than the relational database retrieval method with semantic retrieval.
[0087] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by the computer program, the following steps are implemented: According to the search keyword, a first search result matching the search keyword is retrieved from a relational database, and the relational database is used to store process data corresponding to different process IDs; the search keyword is vectorized, and a second search result matching the vector of the search keyword is retrieved from the vector database; wherein the vector database includes a vector library table of process data corresponding to different process IDs, and / or a vector library table of process tags associated with the process ID; the first search result and the second search result are deduplicated using the process ID, and a target search result is determined after deduplication.
[0088] In one embodiment, when the computer program executes the computer program, the following steps are also implemented: vectorizing the search keywords, including: inputting the search keywords into a pre-trained AI model for vectorization, and obtaining a vector of the search keywords output by the pre-trained AI model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
[0089] In one embodiment, the computer program also implements the following steps when executing the computer program: before inputting the search keyword into the pre-trained AI model, it also includes: obtaining a business data test set with the same business field as the search keyword; inputting the business data test set into the pre-trained AI model to obtain a vector of the business data test set; determining whether the vector of the business data test set meets the preset requirements; in response to the vector of the business data test set meeting the preset requirements, executing the input of the search keyword into the pre-trained AI model.
[0090] In one embodiment, when the computer program executes the computer program, the following steps are also implemented: the second search result includes: a vector of process data with a similarity top_j with the vector of the search keyword, and / or a vector of process labels; after retrieving the second search result from the vector database according to the vectorized search keyword, the method also includes: based on the maximum margin correlation algorithm MMR, selecting the vector of process data with an MMR score top_p and / or a vector of process labels from the second search result; wherein j and p are positive integers, and j is greater than p; using the process ID to deduplicate the vector of process data with an MMR score top_p and / or the vector of process labels, and comprehensively sorting the deduplication results according to the similarity, selecting the vector with a similarity top_m as the new second search result, where m is a positive integer, to perform deduplication on the first search result and the second search result using the process ID, and determining the target search result after deduplication.
[0091] In one embodiment, when the computer program is executed, the following steps are also implemented: the target search results are sorted according to priority, wherein the priority of the first search result is greater than the second search result, and the greater the similarity among the search results, the higher the priority.
[0092] When the computer program in the computer-readable storage medium provided by the present application executes the computer program, first, according to the search keyword, a first search result matching the search keyword is retrieved from a relational database storing process data corresponding to different process IDs; then the search keyword is vectorized, and a second search result matching the vector of the search keyword is retrieved from the vector database, wherein the vector database stores a vector library table of process data corresponding to different process IDs, and / or a vector library table of process labels associated with different process IDs; then, the first search result and the second search result are deduplicated according to the process ID, and the target search result is determined after deduplication. In this way, by hybrid retrieval of the relational database and the pre-constructed vector database, the first search result and the second search result are obtained respectively, and the target search result is obtained by comprehensive processing of the two search results, which has a higher accuracy rate than the relational database retrieval method with semantic retrieval.
[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0094] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0095] In the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0096] In this application, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0097] In this application, computer-readable media includes permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0098] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0099] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A process data retrieval method, characterized in that: include: According to the search keyword, a first search result matching the search keyword is retrieved from a relational database, wherein the relational database is used to store process data corresponding to different process IDs; Vectorizing the search keyword, and retrieving a second search result matching the vector of the search keyword from a vector database; wherein the vector database includes a vector library table of the process data corresponding to different process IDs, and / or a vector library table of process tags associated with the process ID; The first search result and the second search result are deduplicated using the process ID, and a target search result is determined after deduplication.
2. The method according to claim 1, characterized in that The vectorizing the search keyword includes: The search keyword is input into a pre-trained AI model for vectorization to obtain a vector of the search keyword output by the pre-trained AI model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
3. The method according to claim 2, characterized in that Before inputting the search keyword into the pre-trained AI model, it also includes: Acquire a business data test set having the same business domain as that corresponding to the search keyword; Inputting the business data test set into the pre-trained AI model to obtain a vector of the business data test set; Determine whether the vector of the business data test set meets the preset requirements; In response to the vector of the business data test set satisfying the preset requirement, the step of inputting the search keyword into the pre-trained AI model is executed.
4. The method according to claim 1, characterized in that The second search result includes: a vector of process data having a similarity top_j with the vector of the search keyword, and / or a vector of process labels; After obtaining the second search result from the vector database according to the vectorized search keyword, the method further includes: Based on the maximum margin correlation algorithm MMR, respectively select the vector of process data with MMR score top_p and / or the vector of process labels from the second search results; wherein j and p are positive integers, and j is greater than p; The process ID is used to deduplicate the vector of the process data with the MMR score top_p and / or the vector of the process label, and the deduplication results are comprehensively sorted according to the similarity, and the vector with the similarity top_m is selected as the new second search result, where m is a positive integer, so as to perform deduplication on the first search result and the second search result using the process ID, and determine the target search result after deduplication.
5. The method according to claim 1, characterized in that The target search results are sorted according to priority, wherein the priority of the first search result is greater than that of the second search result, and the greater the similarity among the search results, the higher the priority.
6. A process data retrieval device, characterized in that: include: A first search module, configured to retrieve a first search result matching the search keyword from a relational database according to the search keyword, wherein the relational database is configured to store process data corresponding to different process IDs; A second search module is used to vectorize the search keyword and retrieve a second search result matching the vector of the search keyword from a vector database; wherein the vector database is used to store vectors of the process data corresponding to different process IDs and / or vectors of process labels associated with the process IDs; A deduplication module is used to use the process ID to deduplicate the first search result and the second search result, and determine the target search result after deduplication.
7. The device according to claim 6, characterized in that The device also includes a vectorization module, which is used to: input the search keyword into a pre-trained AI model for vectorization, and obtain the vector of the search keyword output by the pre-trained AI model; wherein the pre-trained AI model is a model that has been pre-trained and converged based on sample process data.
8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the process data retrieval method according to any one of claims 1 to 5 when executed by the processor.
9. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the process data retrieval method according to any one of claims 1 to 5 is implemented.
10. A computer program product, characterized in that include: The computer program product comprises a computer program, and when the computer program is executed on a computer, the computer is enabled to implement the process data retrieval method according to any one of claims 1 to 5.
Citation Information
Patent Citations
System for realizing process query processing by combining service data in cloud process platform, and method thereof
CN110717073A
Knowledge question-answering method based on big data and related products
CN117828048A
Private domain document question and answer method and device, electronic equipment and storage medium
CN118467699A
