Service information retrieval method and device and storage medium

By combining the large language model and the text embedding model, the information to be retrieved is converted into a search feature vector and matched with the service feature database, the problem of low efficiency and inaccurate service information retrieval in the prior art is solved, and more efficient and accurate service information retrieval is achieved.

CN119884473APending Publication Date: 2025-04-25CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411945516.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing service information retrieval methods are inefficient and inaccurate enough, making it difficult to quickly find target services, affecting user experience and platform usage efficiency.

Method used

By obtaining the information to be retrieved, inputting it into the preset large language model to obtain standard information, and then inputting the standard information into the text embedding model for feature conversion, obtaining the search feature vector, and matching it with the service feature database to obtain the target service information.

Benefits of technology

It improves the accuracy and efficiency of service information retrieval, can more accurately understand and process natural language queries, and quickly identify service information that is most relevant to user queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884473A_ABST
    Figure CN119884473A_ABST
Patent Text Reader

Abstract

The invention provides a service information retrieval method and device and a storage medium, and relates to the field of information retrieval. The method comprises the following steps: acquiring to-be-retrieved information; inputting the to-be-retrieved information into a preset large language model to obtain standard information; inputting the standard information into a preset text embedding model for feature conversion to obtain a retrieval feature vector; and matching the retrieval feature vector with a preset service feature database to obtain target service information. By combining the natural language processing capability of a large language model and the feature extraction capability of a text embedding model, to-be-retrieved information is converted into numeric retrieval feature vectors which can be used for calculating similarity, so that the to-be-retrieved information can be subsequently and efficiently matched with vectors in a service feature database; therefore, the service information most relevant to the user query is identified. By using the combination of the large language model and the text embedding model, the natural language query can be more accurately understood and processed, and the retrieval accuracy and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information retrieval, and in particular to a service information retrieval method, device and storage medium. Background Art

[0002] With the development of industrial Internet, traditional industries have begun to digitize and informatize their business processes in the hope of bringing new growth points. In this process, a large number of industry platforms have been born. Industry platforms encapsulate business and data into open services for various upper-level applications to call. Industry platforms encapsulate business and data into open services, which is an important trend in the current digital transformation and industry modernization upgrade.

[0003] As more and more businesses are encapsulated as services, the service list on the platform is getting longer and longer. Due to the growth of the business service list, the traditional field query and list display methods can no longer meet user needs. The traditional field query and list display methods are inefficient when processing large amounts of data, and it is difficult to quickly find the target service. In order to solve the limitations of field query, some platforms have begun to support searching for services by keywords. Searching for services by keywords solves the needs of some users. Since users cannot accurately use the creator's description when searching, the search hit rate decreases, which not only reduces the user experience, but also affects the platform's usage efficiency and business innovation speed. Summary of the invention

[0004] The present application provides a service information retrieval method, device and storage medium to solve the technical problems that the existing service information retrieval method is inefficient and inaccurate.

[0005] In a first aspect, the present application provides a service information retrieval method, comprising:

[0006] Get the information to be retrieved;

[0007] Inputting the information to be retrieved into a preset large language model to obtain standard information, wherein the standard information includes a plurality of service information to be retrieved, and the structure of the service information to be retrieved corresponds to the built-in content structure of the large language model;

[0008] The retrieval feature vector is obtained by inputting the standard information into the preset text embedding model for feature conversion;

[0009] The retrieval feature vector is matched with a preset service feature database to obtain target service information.

[0010] In one possible design, it also includes:

[0011] Acquire multiple pieces of service information, wherein the service information includes a service name, a service description, and service parameters;

[0012] A service feature database is established according to the service information and the preset word embedding model.

[0013] In a possible design, establishing a service feature database according to the service information and a preset word embedding model includes:

[0014] Generate a service set by standardizing the service information, wherein the service set includes a plurality of standard information;

[0015] Inputting the standard information in the service set into the preset word embedding model to obtain a service feature vector corresponding to each piece of service information;

[0016] Each piece of service information is stored in association with the service name, standard information, and service feature vector to obtain a service feature database.

[0017] In one possible design, the processing of the service information to generate standard information includes:

[0018] Obtaining a plurality of data fields by performing field identification on the service information;

[0019] Identify each of the data fields to obtain a corresponding identification character;

[0020] Extracting data information corresponding to the data field from the service information;

[0021] Associating the identification character with the data information according to the data field to obtain a key-value pair;

[0022] The key-value pair is matched with a preset template to obtain standard information.

[0023] In one possible design, it also includes:

[0024] Acquire new service information from an external data source according to a preset time interval;

[0025] Generate a new service set by standardizing the new service information, wherein the new service set includes a plurality of new standard information;

[0026] Inputting the newly added standard information in the newly added service set into the preset word embedding model to obtain a newly added service feature vector corresponding to each piece of newly added service information;

[0027] Each piece of newly added service information is associated with the service name, standard information, and service feature vector and stored in the service feature database.

[0028] In one possible design, matching the search feature vector with the service feature database includes:

[0029] Comparing the search feature vector with the service feature vector in the service feature database, and calculating the similarity between the search feature vector and the service feature vector;

[0030] Sort the service feature vectors according to the similarity to obtain a service sequence;

[0031] A preset number of service information with the highest similarity is selected from the service feature database according to the service sequence to obtain target service information.

[0032] In one possible design, it also includes:

[0033] Acquire a training data set, a verification data set, a pre-trained model and a target template, wherein the training data set and the verification data set include multiple groups of natural language service descriptions and their corresponding structured texts;

[0034] The pre-trained model is trained according to the training data set and the target template to obtain a primary language model, wherein the primary language model is used to convert a natural language service description into a structured text matching the target template;

[0035] Verifying the output result of the primary language model using the verification data set to obtain a verification result;

[0036] The primary language model is adjusted according to the verification result to obtain a large language model.

[0037] In a second aspect, the present application provides a service information retrieval device, comprising:

[0038] An acquisition module, used to acquire information to be retrieved;

[0039] A processing module, configured to input the information to be retrieved into a preset large language model to obtain standard information, wherein the standard information includes a plurality of service information to be retrieved, and the structure of the service information to be retrieved corresponds to the built-in content structure of the large language model;

[0040] A conversion module is used to obtain a retrieval feature vector by inputting the standard information into the preset text embedding model for feature conversion.

[0041] The matching module is used to match the search feature vector with a preset service feature database to obtain target service information.

[0042] In a possible design, a building module is also included, specifically used for:

[0043] Acquire multiple pieces of service information, wherein the service information includes a service name, a service description, and service parameters;

[0044] A service feature database is established according to the service information and the preset word embedding model.

[0045] In one possible design, modules are established specifically for:

[0046] Generate a service set by standardizing the service information, wherein the service set includes a plurality of standard information;

[0047] Inputting the standard information in the service set into the preset word embedding model to obtain a service feature vector corresponding to each piece of service information;

[0048] Each piece of service information is stored in association with the service name, standard information, and service feature vector to obtain a service feature database.

[0049] In one possible design, modules are established specifically for:

[0050] Obtaining a plurality of data fields by performing field identification on the service information;

[0051] Identify each of the data fields to obtain a corresponding identification character;

[0052] Extracting data information corresponding to the data field from the service information;

[0053] Associating the identification character with the data information according to the data field to obtain a key-value pair;

[0054] The key-value pair is matched with a preset template to obtain standard information.

[0055] In one possible design, the building blocks are also used to:

[0056] Acquire new service information from an external data source according to a preset time interval;

[0057] Generate a new service set by standardizing the new service information, wherein the new service set includes a plurality of new standard information;

[0058] Inputting the newly added standard information in the newly added service set into the preset word embedding model to obtain a newly added service feature vector corresponding to each piece of newly added service information;

[0059] Each piece of newly added service information is associated with the service name, standard information, and service feature vector and stored in the service feature database.

[0060] In a possible design, the processing module is further configured to:

[0061] Acquire a training data set, a verification data set, a pre-trained model and a target template, wherein the training data set and the verification data set include multiple groups of natural language service descriptions and their corresponding structured texts;

[0062] The pre-trained model is trained according to the training data set and the target template to obtain a primary language model, wherein the primary language model is used to convert a natural language service description into a structured text matching the target template;

[0063] Verifying the output result of the primary language model using the verification data set to obtain a verification result;

[0064] The primary language model is adjusted according to the verification result to obtain a large language model.

[0065] In a possible design, the matching module is specifically used to:

[0066] Comparing the search feature vector with the service feature vector in the service feature database, and calculating the similarity between the search feature vector and the service feature vector;

[0067] Sort the service feature vectors according to the similarity to obtain a service sequence;

[0068] A preset number of service information with the highest similarity is selected from the service feature database according to the service sequence to obtain target service information.

[0069] In a third aspect, the present application provides a service information retrieval device, comprising: a processor, and a memory communicatively connected to the processor;

[0070] Memory stores computer-executable instructions;

[0071] The processor executes the computer-executable instructions stored in the memory, so that the path query device accessing the network resource executes any one of the service information retrieval methods in the first aspect.

[0072] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the service information retrieval method as described in any one of the first aspects.

[0073] The service information retrieval method, device and storage medium provided in the present application obtain information to be retrieved; input the information to be retrieved into a preset large language model to obtain standard information, the standard information includes a variety of service information to be retrieved, and the structure of the service information to be retrieved corresponds to the built-in content structure of the large language model; input the standard information into a preset text embedding model for feature conversion to obtain a retrieval feature vector; match the retrieval feature vector with a preset service feature database to obtain the target service information. By combining the natural language processing capabilities of the large language model and the feature extraction capabilities of the text embedding model, the information to be retrieved is converted into a numerical retrieval feature vector that can be used to calculate similarity, so that it can be efficiently matched with the vectors in the service feature database later, thereby identifying the service information most relevant to the user query. By using a combination of a large language model and a text embedding model, natural language queries can be understood and processed more accurately, improving the accuracy and efficiency of retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] 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.

[0075] Figure 1 This is a flowchart of the service information retrieval method provided in the embodiment of the present application. Figure 1 ;

[0076] Figure 2 This is a flowchart of the service information retrieval method provided in the embodiment of the present application. Figure 2 ;

[0077] Figure 3 This is a flowchart of the service information retrieval method provided in the embodiment of the present application. Figure 3 ;

[0078] Figure 4 This is a flowchart of the service information retrieval method provided in the embodiment of the present application. Figure 4 ;

[0079] Figure 5 This is a flowchart of the service information retrieval method provided in the embodiment of the present application. Figure 5 ;

[0080] Figure 6 is a structural diagram of a service information retrieval device provided in an embodiment of the present application;

[0081] Figure 7 It is a schematic diagram of the hardware structure of the service information retrieval device provided in the embodiment of the present application.

[0082] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0083] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0084] With the development of industrial Internet, traditional industries are gradually digitizing and informatizing their business processes, hoping to bring new growth points. In this process, a large number of industry platforms have been born. Industry platforms encapsulate business and data into open services for various upper-level applications to call. Industry platforms encapsulate business and data into open services, which is an important trend in the current digital transformation and industry modernization upgrade.

[0085] As more and more businesses are encapsulated as services, the service list on the platform is getting longer and longer. It is difficult for users to quickly find the services they need when faced with the service list, which leads to inefficient search methods and easy loss of users. As the number of services increases, platform administrators need to spend more time and energy to maintain and manage these services. At the same time, service updates, offline operations, etc. have become more complex and cumbersome. In a rapidly changing market environment, platforms need to continuously launch new services to meet market demand. Traditional methods are difficult to respond to such changes quickly, which may cause the platform to miss market opportunities.

[0086] As more and more businesses are encapsulated into services, the traditional field query plus list display method can no longer meet the needs of modern enterprises. Therefore, it is necessary to explore more efficient and intelligent ways to manage these services to improve user experience, meet personalized needs, reduce management complexity, adapt to rapidly changing business needs, and make full use of data resources.

[0087] In the existing technology, due to the growth of the business service list, the traditional field query and list display methods can no longer meet user needs. The traditional field query and list display methods are inefficient when processing large amounts of data, and it is difficult to quickly find the target service. In order to solve the limitations of field query, some platforms have begun to support searching for services by keywords. Searching for services by keywords solves the needs of some users. Since users cannot accurately use the creator's description when searching, the search hit rate decreases, which not only reduces the user experience, but also affects the platform's usage efficiency and business innovation speed.

[0088] The service information retrieval method provided in this application is intended to solve the above technical problems in the prior art.

[0089] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0090] Figure 1 A flowchart of a service information retrieval method according to an embodiment of the present invention is shown in FIG. Figure 1 ,like Figure 1 As shown, this embodiment provides a service information retrieval method, which specifically includes the following steps:

[0091] Step S101: Obtain information to be retrieved.

[0092] Specifically, the user terminal receives information to be searched that is input by the user, and the information to be searched is a natural language description or a keyword related to the service that the user wants to find.

[0093] Step S102: input the information to be retrieved into a preset large language model to obtain standard information, where the standard information includes a variety of service information to be retrieved, and the structure of the service information to be retrieved corresponds to the built-in content structure of the large language model.

[0094] Specifically, the information to be retrieved provided by the user is input into the preset large language model. The large language model has a strong natural language understanding ability and can parse and understand the input natural language text. Through processing, the large language model converts the information to be retrieved into standard information. Standard information is a structured representation after model processing, which contains the service information to be retrieved. The structure of the information corresponds to the built-in content structure of the large language model to ensure the consistency and processability of the information.

[0095] Step S103: obtaining a retrieval feature vector by inputting the standard information into a preset text embedding model for feature conversion.

[0096] Specifically, the text embedding model can convert text information into a numerical retrieval feature vector. The feature conversion process encodes the semantic information of the text into a vector form, so that different text information can be compared and analyzed in the vector space. Through processing, the information to be retrieved can be converted into a format that can be compared with the service features in the database.

[0097] Step S104: Match the search feature vector with a preset service feature database to obtain target service information.

[0098] Specifically, one or a preset number of service information that is most relevant to the information to be retrieved can be identified through matching, and sent to the user end as target service information.

[0099] The service information retrieval method provided by the embodiment of the present invention converts the information to be retrieved into a numerical retrieval feature vector that can be used to calculate similarity by combining the natural language processing capability of the large language model and the feature extraction capability of the text embedding model, so that it can be efficiently matched with the vectors in the service feature database in the future, thereby identifying the service information most relevant to the user query. By using the combination of the large language model and the text embedding model, natural language queries can be understood and processed more accurately, improving the accuracy and efficiency of retrieval.

[0100] Establishing a service feature database and analyzing and matching user needs can effectively improve the accuracy and efficiency of service information retrieval. In this way, users can obtain service information that matches their needs more quickly.

[0101] Figure 2 Schematic diagram of the service information retrieval method provided in the embodiment of the present application Figure 2 .like Figure 2 As shown, this embodiment describes in detail the process of establishing the service feature database in the above embodiment, and the specific implementation method of the process includes the following steps:

[0102] Step S201: Acquire multiple pieces of service information, where the service information includes a service name, a service description, and service parameters.

[0103] Specifically, by analyzing the service list on the platform, various types of services are sorted and summarized to obtain multiple service information. Each service information includes a service name, service description and service parameters. The service name, service description and service parameters constitute the basic description of the service.

[0104] Step S202: Establish a service feature database based on service information and a preset word embedding model.

[0105] Specifically, the word embedding model can convert text information into numerical vectors, which can be used to calculate similarity and other analyses. The collected service information is processed using the preset word embedding model, and the processed information is stored in the service feature database to form a structured data set for subsequent retrieval and matching.

[0106] Figure 3 Schematic diagram of the service information retrieval method provided in the embodiment of the present application Figure 3 .like Figure 3 As shown, this embodiment describes in detail the process of establishing a service feature database according to the service information and the preset word embedding model in the above embodiment. The specific implementation method of the process includes the following steps:

[0107] Step S301: Generate a service set by standardizing service information, where the service set includes multiple pieces of standard information.

[0108] Specifically, the original service information is converted into a standardized information set through processing. Standardization processing ensures the consistency and integrity of the data, laying the foundation for subsequent feature vector generation and database establishment. The standardized information set converts service information from different sources and formats into standardized information, which can be uniformly compared and analyzed.

[0109] Step S302: input the standard information in the service set into the preset word embedding model to obtain a service feature vector corresponding to each piece of service information.

[0110] Specifically, the word embedding model is an existing machine learning model that can convert text information into numerical feature vectors. The feature vectors capture the key characteristics of service information, such as service categories, functions, parameters, etc., so that different service information can be compared and analyzed in the vector space.

[0111] Step S303: store each piece of service information in association with the service name, standard information, and service feature vector to obtain a service feature database.

[0112] Specifically, the associative storage forms a service feature database. Each record in the database contains the basic description of the service (name and standard information) and its representation in the vector space (feature vector), so that in the subsequent process, similarity matching can be quickly performed on service descriptions in multiple dimensions according to user needs to find the service information that best meets user needs.

[0113] In some optional implementations, the above step S301 includes:

[0114] Step a1, obtaining multiple data fields by performing field identification on the service information.

[0115] Specifically, the service information is parsed to identify multiple data fields therein, which may include key information such as service name, service description, service parameters, etc. Field identification can be used to decompose the service information into smaller, manageable parts.

[0116] Step a2: Identify each data field to obtain a corresponding identification character.

[0117] Specifically, each identified data field is identified to generate a corresponding identification character, which may be an abbreviation of the field or other unique identifier, for use in data extraction and association in subsequent steps.

[0118] Step a3: extracting data information corresponding to the data field from the service information.

[0119] Specifically, separate specific field values ​​from the original text. For example, extract specific service parameters or price information from the service description.

[0120] Step a4, associating the identification character and the data information according to the data field to obtain a key-value pair.

[0121] Specifically, the extracted data information is associated with the corresponding identification characters to form a key-value pair, wherein the key is the identification character and the value is the extracted data information. The association makes the data structured, which is convenient for subsequent data processing and matching.

[0122] Step a5, matching the key-value pair with the preset template to obtain standard information.

[0123] Specifically, the preset template defines the format and structure of standardized information. By matching with the template, it can be ensured that all service information conforms to a unified format, thereby generating a standardized service set for easy storage and retrieval.

[0124] In some optional embodiments, it also includes:

[0125] Step b1, obtaining new service information from an external data source according to a preset time interval.

[0126] Specifically, the data source may be a database, an API interface, or other service information provider that updates in real time. New service information is automatically obtained from the external data source at a preset time interval to ensure that the service information is updated.

[0127] Step b2: Generate a new service set by standardizing the new service information, where the new service set includes a plurality of new standard information.

[0128] Specifically, the newly added service information needs to undergo the same standardization process as the initial service information, including field identification, identification character assignment, data extraction, and key-value pair association, ultimately generating a collection containing multiple newly added standard information.

[0129] Step b3: input the newly added standard information in the newly added service set into a preset word embedding model to obtain a newly added service feature vector corresponding to each piece of newly added service information.

[0130] Specifically, the standard information in the newly added service set is input into a preset word embedding model to generate a feature vector corresponding to each piece of newly added service information. These feature vectors will be used in subsequent retrieval and matching processes.

[0131] Step b4: associate each newly added service information with the corresponding service name, standard information, and service feature vector and store them in the service feature database.

[0132] Specifically, the service name, standard information and service feature vector of each newly added service information are associated, and this information is stored in the existing service feature database to ensure that the service information in the database is up to date and can be used for retrieval and matching at any time. Regularly updating service information to the service feature database ensures that the service feature database can be dynamically updated as external data changes, thereby maintaining the accuracy and timeliness of the service feature database.

[0133] The embodiment of the present invention not only stores basic information of services by establishing a service feature database, but also provides a numerical representation for each service that can be used to calculate similarity. The structured database provides a basis for subsequent retrieval and matching processes, effectively improving the hit rate and efficiency of user queries.

[0134] Figure 4 Schematic diagram of the service information retrieval method provided in the embodiment of the present application Figure 4 .like Figure 4 As shown, this embodiment describes in detail the process of establishing the large language model preset in the above embodiment, and the specific implementation method of the process includes the following steps:

[0135] Step S401: Acquire a training data set, a verification data set, a pre-trained model and a target template, wherein the training data set and the verification data set include multiple groups of natural language service descriptions and their corresponding structured texts.

[0136] Specifically, the training dataset and validation dataset contain multiple sets of natural language service descriptions and their corresponding structured texts; natural language service descriptions can be. Pre-trained models are models that have been preliminarily trained on large-scale text data, such as BERT, GPT, etc. The target template defines the format and structure of the structured text and is the target format of the model output.

[0137] Step S402: Train the pre-trained model according to the training data set and the target template to obtain a primary language model, where the primary language model is used to convert the natural language service description into a structured text that matches the target template.

[0138] Specifically, the pre-trained model is adjusted using the training data set and the target template. The adjustment process is to further train the pre-trained model based on a specific task, and a primary language model is obtained through this process. The primary language model can convert the input natural language service description into structured text that matches the target template.

[0139] The specific training process is as follows:

[0140] The natural language service description is analyzed to obtain semantic association information and service association information.

[0141] The prompt words are extracted through semantic association information and service association information, the extracted prompt words are encoded, and the encoded prompt words are input into the pre-trained model. The encoding process is to convert the prompt words into a format that the pre-trained model can understand, such as BERT, GPT and other models, which can convert prompt words into word embedding or vector representation. The pre-trained model provides a word embedding layer that can convert the input text or vocabulary into a fixed-size vector.

[0142] Specifically, the prompt word is a word or phrase that can represent the core content of the text; the selection of the prompt word should be able to effectively map the natural language description to the target structured format.

[0143] The extracted prompt words are associated with the content structure of the target template. Specifically, the target template defines the format of the structured text, including fields, hierarchical structures, and data types. The association process ensures that the prompt words can be correctly mapped to the corresponding positions in the template.

[0144] The standard service information based on natural language is converted into structured text that conforms to the content structure of the target template through prompt words. Specifically, the standard service information based on natural language is converted into structured text according to the content structure of the target template by using prompt words. Structured text is a formatted data representation that is easy to store, retrieve and process, including clear fields and data types, making the information clearer and more consistent.

[0145] Through the above training process, the preliminary language model obtained can convert complex natural language service descriptions into a standardized format, which not only improves the availability and consistency of information, but also lays the foundation for subsequent automatic processing and analysis. The combination of prompt words and template structure ensures the accuracy and efficiency of the conversion process.

[0146] Step S403: Verify the output result of the primary language model using the verification data set to obtain a verification result.

[0147] Specifically, the verification process is to check the performance of the primary language model and ensure that the primary language model can correctly convert natural language service descriptions into structured text. By comparing the structured text output by the model with the reference structured text provided in the verification dataset, the accuracy and precision indicators of the model are calculated, and the verification results are obtained to analyze the accuracy and reliability of the primary language model.

[0148] Step S404: adjusting the primary language model according to the verification result to obtain a large language model.

[0149] Specifically, when the verification result does not meet the preset accuracy threshold, the model parameters of the primary language model are adjusted and optimized according to the verification result to obtain the final large language model. By adjusting to improve the accuracy and generalization ability of the model, it can better process natural language service descriptions and generate structured text that conforms to the target template.

[0150] The embodiment of the present invention effectively understands and processes natural language input by establishing a large language model and converts it into a structured output format, thereby ensuring that user queries can be accurately parsed and matched with a service feature database.

[0151] Figure 5 Schematic diagram of the service information retrieval method provided in the embodiment of the present application Figure 5 .like Figure 5 As shown, this embodiment describes in detail the process of matching the search feature vector with the service feature database in the above embodiment, and the specific implementation of the process includes the following steps:

[0152] Step S501: Compare the search feature vector with the service feature vector in the service feature database, and calculate the similarity between the search feature vector and the service feature vector.

[0153] Specifically, the retrieval feature vector generated by the user query is compared with each service feature vector in the service feature database. The comparison is achieved by calculating the similarity between the vectors. The similarity calculation method can select cosine similarity, Euclidean distance or other measurement methods. The similarity value reflects the proximity of two vectors in the vector space. The higher the value, the more similar the two vectors are.

[0154] Step S502: Sort the service feature vectors according to similarity to obtain a service sequence.

[0155] Specifically, all service feature vectors are sorted according to the calculated similarity values, and the sorting results form a service sequence, in which the service feature vectors are arranged from high to low according to the similarity with the search feature vector. Sorting helps to quickly identify which service information is most relevant to the user's query.

[0156] Step S503: selecting a preset number of service information with the highest similarity from the service feature database according to the service sequence to obtain target service information.

[0157] Specifically, a preset number of service information with the highest similarity is selected from the sorted service sequence. The preset number can be adjusted according to platform requirements or user preferences. The selected service information is the target service information. The target service information is the result most relevant to the user query and will be fed back to the user by sending it to the client.

[0158] An example based on the cosine similarity algorithm is as follows: traverse all service information r_n in the service feature database R, and return the top-k most similar r_n according to the preset number of requirements k. The specific steps are as follows:

[0159] (1) In r_n, v_n is a multidimensional vector, which can be represented as a directed line segment in high-dimensional space.

[0160] (2) v_search is a vector of the same dimension as v_n, and can also be represented as a directed line segment in a high-dimensional space.

[0161] (3) The angle between the two line segments reflects the similarity of the two vectors. By calculating the cosine value of the angle, the similarity of all v_n and v_search can be calculated as follows:

[0162]

[0163] (4) Compare all similarities cos(θ) and select the k records with the largest cos(θ), which are the k most similar service information rn.

[0164] The embodiment of the present invention can efficiently filter out the items most relevant to the user query from a large amount of service information through similarity analysis. The matching process utilizes the representation capability of feature vectors and the accuracy of similarity calculation to ensure that users can obtain accurate and effective retrieval results.

[0165] Figure 6 The structure diagram of the service information retrieval device provided by the embodiment of the present invention is shown in FIG. Figure 6 As shown, the service information retrieval device 60 includes: an acquisition module 601 , a processing module 602 , a conversion module 603 , and a matching module 604 .

[0166] in

[0167] The acquisition module 601 is used to acquire the information to be retrieved;

[0168] Processing module 602, used for inputting the information to be retrieved into a preset large language model to obtain standard information, where the standard information includes a plurality of service information to be retrieved, and the structure of the service information to be retrieved corresponds to the built-in content structure of the large language model;

[0169] The conversion module 603 is used to obtain a retrieval feature vector by inputting the standard information into a preset text embedding model for feature conversion.

[0170] The matching module 604 is used to match the search feature vector with a preset service feature database to obtain target service information.

[0171] In a possible design, a building module is also included, specifically used for:

[0172] Obtain multiple service information, including service name, service description and service parameters;

[0173] A service feature database is established based on service information and preset word embedding models.

[0174] In one possible design, modules are established specifically for:

[0175] Generate a service set by standardizing the service information, where the service set includes multiple pieces of standard information;

[0176] Input the standard information in the service set into the preset word embedding model to obtain a service feature vector corresponding to each piece of service information;

[0177] Each piece of service information is associated and stored with the corresponding service name, standard information, and service feature vector to obtain a service feature database.

[0178] In one possible design, modules are established specifically for:

[0179] Multiple data fields are obtained by performing field recognition on the service information;

[0180] Identify each data field to obtain a corresponding identification character;

[0181] Extracting data information corresponding to the data field from the service information;

[0182] According to the data field, the identification character and the data information are associated to obtain a key-value pair;

[0183] Match the key-value pairs with the preset template to obtain standard information.

[0184] In one possible design, the building blocks are also used to:

[0185] Acquire new service information from an external data source according to a preset time interval;

[0186] Generate a new service set by standardizing the new service information, where the new service set includes multiple new standard information;

[0187] Inputting the newly added standard information in the newly added service set into the preset word embedding model to obtain a newly added service feature vector corresponding to each piece of newly added service information;

[0188] Each newly added service information is associated with the service name, standard information, and service feature vector and stored in the service feature database.

[0189] In a possible design, the processing module is further configured to:

[0190] Obtain training data sets, validation data sets, pre-trained models, and target templates. The training data sets and validation data sets include multiple sets of natural language service descriptions and their corresponding structured texts.

[0191] The pre-trained model is trained according to the training data set and the target template to obtain a primary language model, which is used to convert the natural language service description into structured text that matches the target template;

[0192] Verify the output results of the primary language model through the verification data set to obtain the verification results;

[0193] The primary language model is adjusted according to the verification results to obtain a large language model.

[0194] In a possible design, the matching module is specifically used to:

[0195] Compare the retrieval feature vector with the service feature vector in the service feature database, and calculate the similarity between the retrieval feature vector and the service feature vector;

[0196] Sort the service feature vectors according to the similarity to obtain the service sequence;

[0197] A preset number of service information with the highest similarity is selected from a service feature database according to the service sequence to obtain target service information.

[0198] The service information retrieval device provided in this embodiment can be used to execute the above-mentioned service information retrieval method. Its implementation principle and technical effects are similar, and this embodiment will not be repeated here.

[0199] Figure 7 A schematic diagram of the hardware structure of a service information retrieval device provided in an embodiment of the present invention, such as Figure 7 As shown, the service information retrieval device 70 includes: at least one processor 701 and a memory 702. Optionally, the service information retrieval device 70 also includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.

[0200] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the above service information retrieval method.

[0201] The communication component 703 can exchange data with the server.

[0202] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0203] In the above Figure 7 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0204] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0205] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0206] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned service information retrieval method is implemented.

[0207] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0208] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0209] The division of the above units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

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

[0211] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0212] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0213] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0214] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A service information retrieval method, characterized in that: include: Get the information to be retrieved; Inputting the information to be retrieved into a preset large language model to obtain standard information, wherein the standard information includes a plurality of service information to be retrieved, and the structure of the service information to be retrieved corresponds to the built-in content structure of the large language model; The retrieval feature vector is obtained by inputting the standard information into the preset text embedding model for feature conversion; The retrieval feature vector is matched with a preset service feature database to obtain target service information.

2. The method according to claim 1, characterized in that: Also includes: Acquire multiple pieces of service information, wherein the service information includes a service name, a service description, and service parameters; A service feature database is established according to the service information and the preset word embedding model.

3. The method according to claim 2, characterized in that The establishing of a service feature database according to the service information and the preset word embedding model comprises: Generate a service set by standardizing the service information, wherein the service set includes a plurality of standard information; Inputting the standard information in the service set into the preset word embedding model to obtain a service feature vector corresponding to each piece of service information; Each piece of service information is stored in association with the service name, standard information, and service feature vector to obtain a service feature database.

4. The method according to claim 3, characterized in that The service information is processed to generate standard information, including: Obtaining a plurality of data fields by performing field identification on the service information; Identify each of the data fields to obtain a corresponding identification character; Extracting data information corresponding to the data field from the service information; Associating the identification character with the data information according to the data field to obtain a key-value pair; The key-value pair is matched with a preset template to obtain standard information.

5. The method according to claim 3, characterized in that: Also includes: Acquire new service information from an external data source according to a preset time interval; Generate a new service set by standardizing the new service information, wherein the new service set includes a plurality of new standard information; Inputting the newly added standard information in the newly added service set into the preset word embedding model to obtain a newly added service feature vector corresponding to each piece of newly added service information; Each piece of newly added service information is associated with the service name, standard information, and service feature vector and stored in the service feature database.

6. The method according to claim 1, characterized in that Also includes: Acquire a training data set, a verification data set, a pre-trained model and a target template, wherein the training data set and the verification data set include multiple groups of natural language service descriptions and their corresponding structured texts; The pre-trained model is trained according to the training data set and the target template to obtain a primary language model, wherein the primary language model is used to convert a natural language service description into a structured text matching the target template; Verifying the output result of the primary language model using the verification data set to obtain a verification result; The primary language model is adjusted according to the verification result to obtain a large language model.

7. The method according to claim 1, characterized in that Matching the search feature vector with the service feature database includes: Comparing the search feature vector with the service feature vector in the service feature database, and calculating the similarity between the search feature vector and the service feature vector; Sort the service feature vectors according to the similarity to obtain a service sequence; A preset number of service information with the highest similarity is selected from the service feature database according to the service sequence to obtain target service information.

8. A service information retrieval device, characterized in that: include: An acquisition module, used to acquire information to be retrieved; A processing module, used for inputting the information to be retrieved into a preset large language model to obtain standard information, wherein the standard information includes a plurality of service information to be retrieved, and the structure of the service information to be retrieved corresponds to the built-in content structure of the large language model; A conversion module is used to obtain a retrieval feature vector by inputting the standard information into the preset text embedding model for feature conversion. The matching module is used to match the search feature vector with a preset service feature database to obtain target service information.

9. A service information retrieval device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Cited By

  • Container number identification compensation system, individual identification and storage method and device

    CN120088765A

  • Service order matching method and device, equipment and medium

    CN120687563A