Model training, resource recall, resource search method, device, equipment and medium

By training the label prediction model, predicting the characteristic tags of candidate resources, the problem in the existing technology that relying on text relevance is difficult to meet the diverse needs of users, achieving more flexible and complete resource recall and search, and improving user experience.

CN119782805APending Publication Date: 2025-04-08XINGIN INFORMATION TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411754226.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When existing conversational search services deal with user diversified needs, relying solely on text relevance is difficult to meet users' diverse needs, which has certain limitations.

Method used

By obtaining the training set used to train the label prediction model, including search information and recalling the features of the resource, a label prediction model with comprehensive vector features is trained to predict the characteristic tags of candidate resources, thereby recalling resources that meet the diverse needs of users.

Benefits of technology

Resources recalled according to users' diverse needs are realized, the flexibility and integrity of resource recall and search are improved, and the user experience is enriched.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782805A_ABST
    Figure CN119782805A_ABST
Patent Text Reader

Abstract

The present disclosure provides a model training, resource recall, resource search method, device, equipment and medium, which relates to the field of computer technology and can recall resources that meet the diverse needs of users. The model training method includes: obtaining a first training set; inputting the discrete features of the first training sample in the first training set into the linear layer of the label prediction model to obtain a first vector feature, and inputting the text features of the first training sample in the first training set into the correlation model of the label prediction model to obtain a second vector feature; concatenating the first vector feature and the second vector feature to obtain a comprehensive vector feature, and inputting the comprehensive vector feature into at least one prediction head of the label prediction model to obtain a first prediction label; training the label prediction model according to the first prediction label and the feature label to obtain a trained label prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a model training, resource recall, resource search method, device, equipment and medium. Background Art

[0002] With the rapid development of artificial intelligence technology, conversational search services based on artificial intelligence can further enhance users' information retrieval experience.

[0003] In a conversational search service, multiple candidate contents are usually determined through a search question, and the search question is answered based on the candidate contents with higher text relevance between the search question and the multiple candidate contents.

[0004] However, in different application scenarios, users may have different requirements for their search questions. If we only determine candidate content based on text relevance and answer the search questions, it may not meet the diverse needs of users and has certain limitations. Summary of the invention

[0005] The present disclosure provides a model training, resource recall, resource search method, device, equipment and medium, which can recall resources that meet the diverse needs of users.

[0006] In a first aspect, the present disclosure provides a model training method, comprising: obtaining a first training set for training a label prediction model; the first training set comprises multiple first training samples, discrete features of the first training samples, text features, and feature labels of at least one dimension; the first training sample comprises sample search information and sample recall resources recalled by the sample search information; the discrete features of the first training sample are input into a linear layer of the label prediction model to obtain a first vector feature, and the text features of the first training sample are input into a correlation model of the label prediction model to obtain a second vector feature; the first vector feature and the second vector feature are concatenated to obtain a comprehensive vector feature, and the comprehensive vector feature is input into at least one prediction head of the label prediction model to obtain a first prediction label; different prediction heads are used to predict feature labels of the first training sample in different dimensions; the label prediction model is trained according to the first prediction label and the feature label to obtain a trained label prediction model.

[0007] In a second aspect, the present disclosure also provides a resource recall method, including: obtaining search information, and multiple candidate resources corresponding to the search information; inputting the characteristics of the search information and the characteristics of the candidate resources into a label prediction model to obtain a characteristic label of at least one dimension of the candidate resources; the label prediction model is pre-trained according to the model training method provided in the first aspect; and determining the resources to be recalled by the search information based on the characteristic labels of at least one dimension of each of the multiple candidate resources.

[0008] In a third aspect, the present disclosure also provides a resource search method, including: obtaining search information and resources recalled by the search information; the resources recalled by the search information are resources recalled according to the resource recall method provided in the second aspect; inputting the search information and the resources recalled by the search information into a large language model to obtain answer resources corresponding to the search information; and outputting the answer resources.

[0009] In a fourth aspect, the present disclosure also provides a model training device, comprising: a communication unit and a processing unit; the communication unit is used to obtain a first training set for training a label prediction model; the first training set includes multiple first training samples, discrete features of the first training samples, text features, and feature labels of at least one dimension; the first training sample includes sample search information and sample recall resources recalled by the sample search information; the processing unit is used to input the discrete features of the first training sample into the linear layer of the label prediction model to obtain a first vector feature, and input the text features of the first training sample into the correlation model of the label prediction model to obtain a second vector feature; the processing unit is also used to concatenate the first vector feature and the second vector feature to obtain a comprehensive vector feature, and input the comprehensive vector feature into at least one prediction head of the label prediction model to obtain a first prediction label; different prediction heads are used to predict the feature labels of the first training sample in different dimensions; the processing unit is also used to train the label prediction model according to the first prediction label and the feature label to obtain a trained label prediction model.

[0010] In the fifth aspect, the present disclosure also provides a resource recall device, including: a communication unit and a processing unit; the communication unit is used to obtain search information and multiple candidate resources corresponding to the search information; the processing unit is used to input the characteristics of the search information and the characteristics of the candidate resources into a label prediction model to obtain a characteristic label of at least one dimension of the candidate resources; the label prediction model is pre-trained according to the model training method provided in the first aspect; the processing unit is also used to determine the resources for search information recall based on the characteristic labels of at least one dimension of each of the multiple candidate resources.

[0011] In the sixth aspect, the present disclosure also provides a resource search device, including: a communication unit and a processing unit; the communication unit is used to obtain search information and resources recalled by the search information; the resources recalled by the search information are resources recalled according to the resource recall method provided in the second aspect; the processing unit is used to input the search information and the resources recalled by the search information into a large language model to obtain answer resources corresponding to the search information; the communication unit is also used to output the answer resources.

[0012] In the seventh aspect, the present disclosure also provides an electronic device, comprising: a processor and a memory configured to store processor executable instructions; wherein the processor is configured to execute instructions to implement the model training method of the first aspect above, or the resource recall method provided in the second aspect, or the resource search method of the third aspect.

[0013] In an eighth aspect, the present disclosure further provides a non-volatile storage medium having a computer program stored thereon. When the computer program is read and executed, it implements the model training method of the first aspect, or the resource recall method provided in the second aspect, or the resource search method of the third aspect.

[0014] In a ninth aspect, the present disclosure also provides a computer program product, comprising instructions, which, when executed on an electronic device, enable the electronic device to implement the model training method of the first aspect, or the resource recall method provided in the second aspect, or the resource search method of the third aspect.

[0015] In the resource recall method and resource search method provided by the present disclosure, a label prediction model can be obtained by training based on the acquired first training set. The first training set includes multiple first training samples, discrete features of the first training samples, text features, and characteristic labels of at least one dimension; the first training samples include sample search information and sample recall resources recalled by the sample search information.

[0016] During the training process of the label prediction model, the discrete features of the first training sample can be input into the linear layer of the label prediction model to obtain the first vector features, and the text features of the first training sample can be input into the correlation model of the label prediction model to obtain the second vector features. Next, the first vector features and the second vector features can be concatenated to obtain a comprehensive vector feature, and the comprehensive vector feature can be input into at least one prediction head of the label prediction model (different prediction heads are used to predict the feature labels of the first training sample in different dimensions) to obtain a first predicted label. Subsequently, the label prediction model can be trained according to the first predicted label and the feature label to obtain a trained label prediction model.

[0017] Since the discrete features, text features, and characteristic labels of at least one dimension of the first training sample can be used as a training set when training the label prediction model, the trained label prediction model has the ability to predict the characteristic labels of at least one dimension of the resources recalled by the search information. In the subsequent resource recall scenario, the characteristic labels of at least one dimension of multiple candidate resources corresponding to the search information can be obtained through the label prediction model. In this way, based on the characteristic labels of at least one dimension of each of the multiple candidate resources, the resources that meet the diverse needs of users for the search information recall can be determined, and then the accurate resources for the search information search can be determined, which improves the flexibility and completeness of resource recall and resource search, and enriches the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0019] Figure 1 A schematic diagram of a communication system provided in an embodiment of the present disclosure;

[0020] Figure 2 A flowchart of a model training method provided in an embodiment of the present disclosure;

[0021] Figure 3 A flowchart of another model training method provided in an embodiment of the present disclosure;

[0022] Figure 4 A schematic diagram of a process of a resource recall method provided in an embodiment of the present disclosure;

[0023] Figure 5 A flowchart of another resource recall method provided in an embodiment of the present disclosure;

[0024] Figure 6 A flowchart of another resource recall method provided in an embodiment of the present disclosure;

[0025] Figure 7 A schematic diagram of a resource search method provided by an embodiment of the present disclosure;

[0026] Figure 8 A schematic diagram of an interface of a resource search method provided by an embodiment of the present disclosure;

[0027] Fig. 9 A schematic diagram of the structure of a model training device provided in an embodiment of the present disclosure;

[0028] Fig.10 A schematic diagram of the structure of a resource recall device provided in an embodiment of the present disclosure;

[0029] Fig.11A schematic diagram of the structure of a resource search device provided in an embodiment of the present disclosure;

[0030] Fig.12 A schematic block diagram of an electronic device provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0032] It is understood that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0033] It should also be understood that the term “comprising” indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or components.

[0034] The resource recall method provided in the embodiment of the present application can be applied to the conversation search business scenario. Specifically, when a user wants to obtain search results corresponding to a certain search information through the conversation search service, the electronic device can display a conversation page for conversation search. The user can enter the search information on the conversation page. The electronic device can respond to the user's search information, recall and sort the resources (also referred to as notes) related to the search information, and determine the search results based on the resource content of the top-ranked resources in the recalled resources, and display the content of the search results.

[0035] However, the general resource recall method is usually based on a binary text matching model to recall resources with high relevance to the search information text. However, in real business scenarios, users may have different requirements for search information (such as timeliness, authority, personalization, etc.).

[0036] For example, when the search information is "Can I enter a certain square now?", the search information is a question with a time-sensitive requirement, and the answer to the question (ie, the search result) will change with the time of asking the question.

[0037] As another example, when the search information is "How to treat a certain cancer?", the search information is a question with an authoritative requirement, that is, the user who enters the search information expects to get an authoritative search result, such as the search result comes from a doctor or related practitioners rather than an ordinary user.

[0038] As another example, when the search information is “What tops go with jeans?”, the search information is a question with personalized needs, that is, the answer to the search information needs to be related to the gender and habits of the user who inputs the search information.

[0039] In summary, if the general resource recall method only considers the text relevance between the search information and the recalled resources, it may not be able to meet the diverse needs of users and has certain limitations.

[0040] In view of the above problems, the present application proposes a model training method and a resource recall method, which can obtain a label prediction model based on the acquired first training set. The first training set includes multiple first training samples, discrete features of the first training samples, text features, and feature labels of at least one dimension; the first training samples include sample search information and sample recall resources recalled through the sample search information.

[0041] During the training process of the label prediction model, the discrete features of the first training sample can be input into the linear layer of the label prediction model to obtain the first vector features, and the text features of the first training sample can be input into the correlation model of the label prediction model to obtain the second vector features. Next, the first vector features and the second vector features can be concatenated to obtain a comprehensive vector feature, and the comprehensive vector feature can be input into at least one prediction head of the label prediction model (different prediction heads are used to predict the feature labels of the first training sample in different dimensions) to obtain a first predicted label. Subsequently, the label prediction model can be trained according to the first predicted label and the feature label to obtain a trained label prediction model.

[0042] Since the discrete features, text features, and characteristic labels of at least one dimension of the first training sample can be used as a training set when training the label prediction model, the trained label prediction model has the ability to predict the characteristic labels of at least one dimension of the resources recalled by the search information. In the subsequent resource recall scenario, the characteristic labels of at least one dimension of multiple candidate resources corresponding to the search information can be obtained through the label prediction model. In this way, based on the characteristic labels of at least one dimension of each of the multiple candidate resources, the resources that meet the diverse needs of users for the search information recall can be determined, and then the accurate resources for the search information search can be determined, which improves the flexibility and completeness of resource recall and resource search, and enriches the user experience.

[0043] The model training, resource recall, and resource search methods provided in the embodiments of the present application can be applied to Figure 1 The communication system shown. Figure 1 A schematic diagram of a communication system provided in an embodiment of the present disclosure, the communication system may include: at least one terminal 101 ( Figure 1 Taking one terminal 101 as an example), at least one server 102 ( Figure 1 Taking one server 102 as an example), at least one database ( Figure 1 Take 1 database 103 as an example for explanation), and network.

[0044] The terminal 101 held by the user can be connected to the server 102 and the database 103 of different applications through the network, and perform data exchange with the server 102 and the database 103 .

[0045] Optionally, when the system includes multiple terminals, multiple servers, multiple networks, and multiple databases, different terminals can be connected to each other through different networks, different servers, and different databases.

[0046] Alternatively, multiple databases may be coupled to different servers, and information related to the application may be continuously stored in the database when multiple users use the application.

[0047] The terminal 101 may be referred to as user equipment (UE), access terminal, subscriber unit (subscriber unit), user station, mobile station (MS), mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. The terminal in the embodiments of the present application can be a mobile phone, a cellular phone, a smart phone, a tablet computer, a wireless data card, a personal digital assistant (PDA), a wireless modem, a handset, a laptop computer, a machine type communication (MTC) terminal, a computer with a wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a smart home device (for example, a refrigerator, a television, an air conditioner, an electric meter, etc.), an intelligent robot, a robotic arm, a workshop equipment, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a vehicle-mounted terminal, a roadside unit with a terminal function, and a wireless terminal in a smart city. unit, RSU), etc., flying equipment (e.g., intelligent robot, hot air balloon, drone, airplane), etc. The terminal may also be other devices with terminal functions, for example, the terminal may also be a device that functions as a terminal in device to device (D2D) communication.

[0048] The above-mentioned server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (content delivery network, CDN), as well as big data and artificial intelligence platforms.

[0049] The above network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a fourth generation mobile communication technology (4G) network, a fifth generation mobile communication technology (5G) network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to a server, etc. For example, multiple users can be online through different terminals and connected and synchronized with each other through appropriate networks to support multiple users using the same application.

[0050] In an embodiment of the present application, the terminal 101 may display a conversation page for dialog search. The user may enter search information on the conversation page. The terminal 101 may send the search information to the server 102 in response to the user's input operation. The server 102 may obtain multiple candidate resources corresponding to the search information from the database 103, and determine the characteristic tags of at least one dimension of the candidate resources based on the characteristics of the search information and the characteristics of the candidate resources. Then, the resources recalled by the search information may be determined based on the characteristic tags of at least one dimension of each of the multiple candidate resources, and the answer resources of the search information may be determined based on the resources recalled by the search information. Subsequently, the server 102 may send the answer resource to the terminal 101 so that the terminal 101 displays the content of the answer resource in the conversation page.

[0051] The server 102 may pre-train a label prediction model and a large language model based on the first training set. The label prediction model is used to predict the characteristic label of at least one dimension of the candidate resource based on the characteristics of the search information and the characteristics of the candidate resource. The large language model is used to predict the answer resource of the search information based on the resources recalled by the search information.

[0052] In some embodiments, the training process of the above-mentioned tag prediction model and large language model can also be deployed on the terminal 101. That is, the terminal 101 can complete the model training, resource recall, and resource search methods provided in the embodiment of the present application without data interaction with the server 102. In other words, the embodiment of the present application does not limit the execution subject of the model training, resource recall, and resource search methods. It can be understood that Figure 1The communication system provided in the embodiment of the present application is only an example in the embodiment of the present application. The communication system and the corresponding scenarios described in the embodiment of the present application are for more clearly illustrating the technical solution provided in the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0053] For example, the above is only one implementation of the model training, resource recall, and resource search method provided in the embodiment of the present application. The steps performed by the above server 102 can also be performed on the terminal 101. Therefore, the following uses the electronic device as the execution subject to describe in detail the model training, resource recall, and resource search method provided in the embodiment of the present application.

[0054] Figure 2 A flow chart of a model training method provided in an embodiment of the present application is shown. Figure 2 As shown, the model training method includes: S201-S204.

[0055] S201. The electronic device obtains a first training set for training a label prediction model.

[0056] The first training set includes a plurality of first training samples, discrete features of the first training samples, text features, and characteristic labels of at least one dimension. The first training samples include sample search information and sample recall resources recalled through the sample search information.

[0057] For example, when the sample search information is “What tops go with jeans?”, the sample recall resources recalled through the sample search information may include text notes, video resources, or graphic resources, etc., about different jeans going with different tops.

[0058] In some embodiments, the text feature of the sample search information is the text content of the sample search information. Of course, when the sample search information is other types of resources (such as video resources, image resources, etc.), the sample search information may also include content features of the corresponding type (such as video features, image features, etc.).

[0059] In combination with the above example, the text features of the sample search information may be the text features in “What tops go with jeans?”, such as the number of words in the text, the semantics of the text, etc.

[0060] In some embodiments, the discrete features of the sample search information include: a timeliness indication parameter, where the timeliness indication parameter is used to indicate whether the search information has a timeliness requirement.

[0061] For example, when the sample search information is "Can I enter a certain square now?", the sample search information is a sample search information with a timeliness requirement. In this case, the discrete features of the sample search information include a timeliness indication parameter.

[0062] Optionally, the timeliness indication parameter can be represented by 0 or 1. 0 is used to indicate that the search information has no timeliness requirement, and 1 is used to indicate that the search information has a timeliness requirement.

[0063] In some embodiments, the timeliness indication parameter is obtained by:

[0064] The electronic device inputs the text features of the sample search information into a pre-trained deep neural network model to obtain effectiveness indication parameters.

[0065] Optionally, the above-mentioned deep neural network model can also be called a timeliness indication parameter prediction model, such as a deep neural network model such as an NVWA model.

[0066] Optionally, the above-mentioned deep neural network model can be deployed in an electronic device or in a device other than an electronic device. When deployed in a device other than an electronic device, the electronic device can obtain the timeliness indication parameter of the sample search information through the main search interface (an application programming interface (API)) between the electronic device and the device on which the above-mentioned deep neural network model is deployed.

[0067] In some embodiments, the text features of the sample recall resource include: title text features and content text features. The title text features are the text content of the title text of the sample recall resource, and the content text features are the specific text content of the sample recall resource. Of course, when the sample recall resource is a resource of other types (such as video resources, image resources, etc.), the sample recall resource may also include content features of the corresponding type (such as video features, image features, etc.).

[0068] In some embodiments, the discrete features of the sample recall resources include at least one of the following: the amount of resource information, the user interaction effect score (also known as the customer effect score, CES score, etc.), the relevance score with the sample search information (also known as the main search relevance score), the matching score with the user who inputs the sample search information, the resource content volume and the resource release time.

[0069] Among them, the user interaction effect score is used to indicate the popularity of the sample recall resource. This feature can characterize the authority of the sample recall resource and the relevance of the sample recall resource to the sample search information. The higher the user interaction effect score, the higher the relevance and authority of the sample recall resource.

[0070] Of course, this feature can also characterize other characteristics of the sample recall resource (such as personalization), which is not limited in the embodiments of the present application.

[0071] In some embodiments, the user interaction effect score is obtained in the following manner:

[0072] The electronic device obtains parameter values ​​of the interaction parameters for the sample recall resource, and performs weighted summation on the parameter values ​​of the interaction parameters to obtain a user interaction effect score.

[0073] Among them, the interaction parameters include at least one of the following: the number of likes, the number of favorites, the number of comments, the number of shares and the number of followers.

[0074] Optionally, the user interaction effect score may satisfy the following formula:

[0075] User interaction effect score = number of likes + number of favorites + 4*number of comments + 4*number of shares + 4*number of followers.

[0076] Optionally, the electronic device may normalize parameter values ​​of interaction parameters of different orders of magnitude to obtain parameter values ​​of interaction parameters of the same order of magnitude.

[0077] Of course, the electronic device may also set weights corresponding to parameter values ​​of different interaction parameters according to business requirements, which is not limited in this embodiment of the present application.

[0078] The matching score with the user who inputs the sample search information is used to indicate the matching degree between the sample recall resource and the user who inputs the sample search information. This feature can characterize the personalization of the sample recall resource. The higher the matching score with the user who inputs the sample search information, the higher the personalization score of the sample recall resource.

[0079] Of course, this feature can also characterize other characteristics of the sample recall resource, which is not limited in the embodiments of the present application.

[0080] For example, if the sample search information is "What tops go with jeans?", and the user who inputs the sample search information is a male, and the sample recall resources are sample recall resources for women's outfits, then the matching score between the sample recall resources and the user who inputs the sample search information is low. However, when the sample recall resources are sample recall resources for men's outfits, then the matching score between the sample recall resources and the user who inputs the sample search information is high.

[0081] Optionally, the matching score between the sample recall resource and the user who inputs the sample search information may be determined by a preset matching model.

[0082] Optionally, the preset matching model may be deployed in the electronic device. The electronic device may input the user who inputs the sample search information and the sample recall resource into the preset matching model to obtain a matching score between the sample recall resource and the user who inputs the sample search information.

[0083] Optionally, the preset matching model may be deployed in other devices independently deployed from the electronic device. The electronic device may obtain the matching score between the sample recall resource and the user who inputs the sample search information through the main search interface between the electronic device and the device where the preset matching model is deployed.

[0084] Optionally, the electronic device can also obtain the postrank score of the sample recall resource. The postrank score may include the degree of matching of the sample recall resource to the sample search information in different business scenarios. In business scenarios where the user association between the sample recall resource and the sample search information is high, the electronic device can directly use the postrank score as the matching score between the sample recall resource and the user who inputs the sample search information. In other scenarios, the electronic device can calculate the matching score between the sample recall resource and the user who inputs the sample search information based on the postrank score.

[0085] The resource content size is used to indicate the size of the resource content of the sample recall resource.

[0086] Exemplarily, when the sample recall resource is a text resource, the resource content amount may be the number of words in the text resource. When the sample recall resource is a video resource, the resource content amount may be the duration of the video resource.

[0087] The resource content volume can characterize the authority of the sample recall resource. The higher the resource content volume, the higher the authority of the sample recall resource. Of course, this feature can also characterize other characteristics of the sample recall resource, which is not limited in the embodiments of the present application.

[0088] Resource release time is used to indicate the time when the sample recall resource is released. This feature can characterize the timeliness of the sample recall resource. The closer the release time of the sample recall resource is to the current moment, the higher the timeliness of the sample recall resource.

[0089] Of course, this feature can also characterize other characteristics of the sample recall resource, which is not limited in the embodiments of the present application.

[0090] Resource information volume is used to represent the amount of key information in the resource content of sample recall resources.

[0091] Exemplarily, when the sample recall resource is a text resource, the amount of resource information may be the number of words of keywords related to the sample search information in the text resource.

[0092] The amount of resource information can also characterize the authority of the sample recall resource. The higher the amount of resource information, the higher the authority of the sample recall resource. Of course, this feature can also characterize other characteristics of the sample recall resource, which is not limited in the embodiments of the present application.

[0093] The relevance score is used to indicate the relevance between the sample search information and the sample recall resource. This feature can characterize the relevance of the sample recall resource. The higher the relevance score, the higher the relevance between the sample recall resource and the sample recall resource.

[0094] Of course, this feature can also characterize other characteristics of the sample recall resource, which is not limited in the embodiments of the present application.

[0095] In some embodiments, in order to meet the diverse needs of users, the electronic device can obtain the characteristic labels of the first training sample in the above-mentioned dimensions when training the label prediction model. That is, the characteristic labels of at least one dimension of the first training sample can include at least one of the following: relevance label, authority label, personalized label and timeliness label.

[0096] Among them, the relevance label is used to characterize the relevance between the sample recall resource and the sample search information. The authority label is used to characterize the authority of the sample recall resource. The personalized label is used to characterize the matching degree between the sample recall resource and the user who inputs the sample search information. The timeliness label is used to characterize the timeliness of the sample recall resource.

[0097] That is to say, when the characteristic label of the first training sample includes the authoritative label of the sample recall resource, the label prediction model can predict the authoritative label of the recalled resource, and the same applies to other characteristic labels.

[0098] In some embodiments, the electronic device may obtain the first training set from a database storing training sets for model training.

[0099] S202: The electronic device inputs the discrete features of the first training sample into the linear layer of the label prediction model to obtain a first vector feature, and inputs the text features of the first training sample into the correlation model of the label prediction model to obtain a second vector feature.

[0100] Specifically, the label prediction model may include a linear layer and a correlation model. The linear layer is used to determine the vector features of the discrete features, and the correlation model is used to determine the vector features of the text features. In this case, the electronic device can input the discrete features of the first training sample into the linear layer of the label prediction model to obtain the first vector features, and input the text features of the first training sample into the correlation model of the label prediction model to obtain the second vector features, so as to perform label prediction based on the first vector features and the second vector features.

[0101] The first vector feature is used to characterize the characteristics of the sample recall resource in at least one dimension, and the second vector feature is used to characterize the correlation between the text features of the sample search information and the text features of the sample recall resource.

[0102] In some embodiments, since the discrete features of the sample search information and the discrete features of the sample recall resources may not be features of the same order of magnitude (for example, the order of magnitude of the resource content may be in the thousands, while the timeliness indication parameter may be in the single digit), the electronic device may first discretize some of the discrete features. In this case, the electronic device inputs the discrete features of the first training sample into the linear layer of the label prediction model to obtain the first vector feature, specifically including:

[0103] The electronic device discretizes the discrete features of the first training sample by bucketing to obtain discrete features of the same order of magnitude, and inputs the discrete features of the same order of magnitude into the linear layer of the label prediction model to obtain the first vector features.

[0104] Optionally, the electronic device may discretize the discrete features of the first training sample into buckets based on a data bucketing technique.

[0105] It should be noted that after determining the order of magnitude requirement for bucket discretization, since some features may already meet the order of magnitude requirement, the electronic device only needs to discretize the discrete features that do not meet the order of magnitude requirement.

[0106] Exemplarily, it is assumed that the order of magnitude required for bucket discretization is in the single digit. In this case, the electronic device can discretize the user interaction effect score, the matching score with the user who inputs the search information, the amount of resource content, and the resource release time. Since the amount of resource information, the timeliness indication parameter, and the relevance score are usually in the single digit, the electronic device does not need to discretize the amount of resource information, the timeliness indication parameter, and the relevance score.

[0107] After discretizing some of the discrete features, the electronic device can input the processed some of the discrete features and the unprocessed discrete features into multiple linear layers of the label prediction model to obtain the first vector features.

[0108] In one achievable manner, the text features of the sample recall resource may include title text features and content text features. Therefore, when the electronic device determines the second vector feature, it may also determine the first sub-feature and the second sub-feature, and determine the second vector feature based on the first sub-feature and the second sub-feature.

[0109] The first sub-feature is used to indicate the correlation between the text feature of the sample search information and the title text feature of the sample recall resource, and the second sub-feature is used to indicate the correlation between the text feature of the sample search information and the content text feature of the sample recall resource.

[0110] Optionally, the electronic device may determine the first sub-feature and the second sub-feature based on a general feature extraction technology, which is not limited in the embodiments of the present application.

[0111] Optionally, the electronic device may determine the second vector feature based on the first sub-feature and the second sub-feature based on a general feature concatenation (concat) technology, which is not limited in the embodiment of the present application.

[0112] In this way, the second vector feature obtained by the first sub-feature and the second sub-feature can more accurately represent the degree of correlation between the text feature of the sample search information and the text feature of the sample recall resource.

[0113] S203: The electronic device concatenates the first vector feature and the second vector feature to obtain a comprehensive vector feature, and inputs the comprehensive vector feature into at least one prediction head of a label prediction model to obtain a first predicted label.

[0114] Different prediction heads are used to predict feature labels of the first training sample in different dimensions.

[0115] Specifically, after obtaining the first vector feature and the second vector feature, the electronic device may concatenate the first vector feature and the second vector feature to obtain a comprehensive vector feature, that is, a model input vector of at least one prediction head.

[0116] Optionally, each prediction head can be composed of a linear layer and a sigmoid activation function.

[0117] In an embodiment of the present application, the prediction head of the label prediction model may include: a prediction head for predicting a relevance label, a prediction head for predicting an authority label, a prediction head for predicting a personalized label, and at least one of a prediction head for predicting a timeliness label. That is, at least one prediction head is used to predict a characteristic label of at least one of the following dimensions: a relevance label, an authority label, a personalized label, and a timeliness label. In this way, by predicting the characteristic labels of at least one of the above dimensions, a label prediction model that meets the diverse needs of users can be trained.

[0118] It should be noted that since the correlation between the sample recall resource and the sample search information is the basis of the recall, that is, the sample recall resource can only be recalled if it is related to the sample search information, at least one prediction head of the label prediction model usually includes a prediction head for predicting the correlation label. Other prediction heads can be flexibly configured according to business needs, and the embodiments of the present application are not limited to this. Of course, in different business scenarios, more prediction heads for predicting labels of other dimensions can also be configured, such as prediction heads for predicting entertainment labels, etc.

[0119] S204: The electronic device trains the label prediction model according to the first prediction label and the characteristic label to obtain a trained label prediction model.

[0120] Specifically, the electronic device can determine the loss values ​​of the first prediction label and the feature label based on the loss function corresponding to the label prediction model, and back-propagate the loss values ​​to update the parameters of each module in the label prediction model until the convergence conditions of the label prediction model are met to obtain a trained label prediction model.

[0121] The various modules in the above-mentioned label prediction model may include a linear layer for determining the first vector feature, a correlation model, and a linear layer in at least one prediction head, etc.

[0122] Optionally, the above-mentioned label prediction model can be a general deep neural network model, such as a multilayer perceptron (MLP) model.

[0123] In some embodiments, the correlation model in the tag prediction model can be pre-trained in the field and trained in text correlation in advance. In this case, the electronic device can set the learning rate of the correlation model to a smaller value (for example, to 2e-5). Since the linear layer in the above-mentioned tag prediction model is randomly initialized, the electronic device can set the learning rate of the linear layer to a larger value (for example, to 1e-4). In other words, during the training of the tag prediction model, the learning rate of the correlation model is less than the learning rate of the linear layer.

[0124] In some embodiments, Figure 3 As shown in Figure 1, the correlation model in the label prediction model is trained in the following way:

[0125] S301. The electronic device obtains a second training set.

[0126] The second training set includes a plurality of second training samples and availability labels of the second training samples. The second training samples include sample search information and sample recall resources recalled by the sample search information. The availability label is used to characterize the degree of correlation between the sample recall resources and the sample search information and the degree of availability of the sample recall resources for the sample search information.

[0127] Optionally, the second training sample and the first training sample may be the same sample data or different sample data, which is not limited in the embodiment of the present application.

[0128] Since the correlation model is used to predict the correlation between the sample recall resources and the sample search information, the second training set also includes the availability label of the second training sample.

[0129] Optionally, the availability label may be a binary label, that is, the sample search information is related to or not related to the sample recall resource.

[0130] Alternatively, in order to improve the accuracy of model prediction, the present application may rerank the general binary availability labels to obtain the following four types of availability labels:

[0131] The first type of availability label refers to the sample recall resource with a large amount of resource information, which can fully answer the question corresponding to the sample search information. For example, when the sample search information is "How much is the ticket price of Park A?", if the sample recall resource includes "The ticket price of Park A is 100 yuan / person", then the availability label of the sample recall resource is determined to be the first type of availability label.

[0132] The second type of availability tag refers to the resource information of the sample recall resource that is related to the sample search information, but cannot fully answer the question corresponding to the sample search information. For example, when the sample search information is "How much is the ticket price of chain park X?", if the sample recall resource includes "The ticket price of chain park X in city A is 100 yuan / person", but does not include the relevant information of the ticket price of chain park X in city B, then the availability tag of the sample recall resource is determined to be the second type of availability tag.

[0133] The third type of availability label refers to the resource information of the sample recall resource that is related to the sample search information, but cannot answer the question corresponding to the sample search information, that is, the content of the sample recall resource can only provide a reference for answering the question of the sample search information, but does not directly explain the answer, and additional information is needed to fully answer the question corresponding to the sample search information. For example, when the sample search information is "What is the ticket price of chain park X?", if the sample recall resource includes "the ticket price of chain park X is higher", but does not include the specific price of the ticket price of chain park X, then the availability label of the sample recall resource is determined to be the third type of availability label.

[0134] The fourth type of availability tag refers to the resource information of the sample recall resource that is completely unrelated to the sample search information. For example, when the sample search information is "How much is the ticket price for chain park X?", if the sample recall resource only includes "A new park has been built in city A", then the availability tag of the sample recall resource is determined to be the fourth type of availability tag.

[0135] Of course, in order to improve the accuracy of determining the resources recalled for search information, the above-mentioned availability tags can also be divided into fewer or more types of availability tags according to actual applications, such as five types of availability tags, six types of availability tags, etc. Different types of availability tags are used to represent different degrees of relevance between sample search information and sample recall resources and different degrees of availability of sample recall resources. The embodiments of the present application are not limited to this.

[0136] After determining each type of usability tag, the electronic device can set different usability scores for different types of usability tags, so as to calculate the loss value during the correlation model training. For example, the electronic device can set the usability score of the first type of usability tag to 3 points, the usability score of the second type of usability tag to 2 points, the usability score of the third type of usability tag to 1 point, and the usability score of the fourth type of usability tag to 0 points.

[0137] Optionally, the above correlation model can be a commonly used pre-trained language representation (Bidirectional Encoder Representations from Transformers, BERT) model. In the embodiment of the present application, the correlation model can be a Rubik's Cube Transformation (RBT) 3 model. Compared with other BERT models, the RBT3 model takes up less space and has a faster prediction speed.

[0138] In one achievable method, the open source weights of the general RBT3 model are usually obtained by pre-training the Masked Language Modeling (MLM) task through a training set of a general scenario (also referred to as a domain), which may not be applicable to the resource recall method provided in the embodiment of the present application. Therefore, the general RBT3 model may not be able to accurately obtain the second vector features of the search information and candidate resources.

[0139] In an embodiment of the present application, the electronic device can obtain training samples with the same training sample scenarios as the training label prediction model, and pre-train the RBT3 model (i.e., the correlation model) based on these training samples with the same scenarios to obtain a pre-trained RBT3 model (i.e., domain pre-training), which is the initial model of the correlation model.

[0140] Exemplarily, when the resource recall method provided in the embodiment of the present application is applied to application A, the electronic device can obtain training samples (i.e., training samples in the scenario of application A) from the database of application A. The training samples can be used to train the pre-trained RBT3 model, and can also be used to train the label prediction model, that is, the training samples of the label prediction model are the same as the training sample scenarios of the RBT3 model pre-training.

[0141] Optionally, when pre-training the RBT3 model, the electronic device can perform pre-training only through resources under the application A scenario without sample search information.

[0142] S302: The electronic device inputs the second training sample into the initial model of the correlation model to obtain a second prediction label.

[0143] S303: The electronic device trains an initial model of the correlation model according to the second prediction label and the availability label of the second training sample to obtain a correlation model.

[0144] In combination with the above example, after obtaining the pre-trained RBT3 model, the present application can further train the pre-trained RBT3 model (i.e., training of text relevance) through a second training set (including sample search information and sample recall resources) to obtain the RBT3 model.

[0145] In some embodiments, the electronic device trains the initial model of the correlation model according to the second prediction label and the availability label of the second training sample to obtain the correlation model, which specifically includes:

[0146] The electronic device determines the loss values ​​of the second prediction label and the availability label based on the loss function corresponding to the correlation model, and back-propagates the loss values ​​to update the model parameters in the label prediction model until the convergence conditions of the correlation model are met to obtain the correlation model.

[0147] Combined with the above example, assuming that the correlation model is the RBT3 model, the above loss function satisfies the following formula:

[0148] score_diff ij =sigmoid(score_predict i -score_predict j );

[0149]

[0150] Among them, score_predict i The score_predict represents the availability score predicted by the RBT3 model for the second training sample of the ith j represents the availability score predicted by the RBT3 model for the jth second training sample, score_real i represents the availability score (3 / 2 / 1 / 0) corresponding to the availability label of the i-th second training sample, score_real j represents the availability score (3 / 2 / 1 / 0) corresponding to the availability label of the jth second training sample, sign is the sign function, and N is the total number of training samples in the second training set.

[0151] From the above, it can be seen that when the embodiment of the present application trains the correlation model, the loss function used can determine the difference between the availability labels and the second prediction labels of two second training samples (i.e., the above-mentioned i-th training sample and the j-th training sample). It should be understood that when the difference between the availability labels and the second prediction labels of different second training samples is large, the distance between the samples should also be large. Correspondingly, when the difference is small, the distance between the samples should also be small. Based on such an idea, when the present application updates the model parameters based on the loss values ​​of the second prediction labels and the availability labels, it can train a correlation model with higher accuracy based on the loss values ​​corresponding to any two second training samples. Therefore, the embodiment of the present application can improve the prediction accuracy of the correlation model based on the above-mentioned loss function.

[0152] Figure 4 FIG. 1 is a flow chart of a resource recall method provided in an embodiment of the present application. Figure 4 As shown, the resource recall method includes: S401-S403.

[0153] S401: The electronic device obtains search information and a plurality of candidate resources corresponding to the search information.

[0154] In the business search scenario, when the electronic device is a terminal, the terminal can display a conversation page for dialog search. The user can enter search information on the conversation page. Then, the terminal can obtain multiple candidate resources corresponding to the search information from the server in response to the user's input operation.

[0155] When the electronic device is a server, the server may receive a search request from a requesting end (eg, a terminal). The search request may include search information. Then, the server may obtain multiple candidate resources in response to the search request.

[0156] The electronic device may obtain multiple candidate resources corresponding to the search information based on a general resource search method, for example, obtaining corresponding candidate resources from a resource storage database based on keywords of the search information.

[0157] For example, when the search information is "What tops go with jeans?", the electronic device can obtain corresponding multiple candidate resources from the resource storage database based on the two keywords "jeans" and "tops". The multiple candidate resources can include video resources or graphic resources of different jeans and different tops.

[0158] Optionally, the above-mentioned search information and candidate resources may be text-type information and resources, graphic-type information and resources, or voice-type information and resources, which is not limited in the embodiments of the present application.

[0159] S402: The electronic device inputs the features of the search information and the features of the candidate resources into a label prediction model to obtain a characteristic label of at least one dimension of the candidate resource.

[0160] Among them, the label prediction model is the above Figure 2 The model training method shown is pre-trained.

[0161] Optionally, the characteristic labels of at least one dimension of the candidate resources may include the characteristic labels of at least one dimension of the first training sample during model training, namely, a relevance label, an authority label, a personalization label, and a timeliness label.

[0162] Specifically, in order to meet the diverse needs of users, the electronic device needs to determine the resources for search information recall from multiple dimensions (i.e., dimensions that correspond one-to-one to the diverse needs of users). The premise for determining the resources for search information recall from multiple dimensions is that the electronic device needs to determine the labels of each candidate resource that meets the diverse needs of users. In this case, the electronic device can determine the characteristics of the search information and the characteristics of the candidate resources, and input the characteristics of the search information and the characteristics of the candidate resources into the label prediction model to obtain the characteristic label of at least one dimension of the candidate resource.

[0163] In some embodiments, since the search information usually needs to express its search requirements through text features, the features of the search information may include text features of the search information.

[0164] Optionally, the electronic device may obtain the text features of the search information based on a feature extraction algorithm, or may obtain the text features of the search information based on other general feature extraction techniques, which is not limited in the embodiments of the present application.

[0165] In some embodiments, the search information may further include a feature of whether it has a time-sensitive requirement. For example, when the search information is "Can I enter a certain square now?", the search information is a search information with a time-sensitive requirement. In this case, the feature of the search information may further include a discrete feature of the search information.

[0166] The discrete features of the search information include: a timeliness indication parameter, and the timeliness indication parameter is used to indicate whether the search information has a timeliness requirement.

[0167] In some embodiments, since the candidate resource needs to express its resource content through multiple dimensions, the features of the candidate resource include text features of the candidate resource and discrete features of the candidate resource.

[0168] The text features of the candidate resources can refer to the relevant description of the text features of the search information, which will not be repeated here.

[0169] The discrete features of candidate resources include at least one of the following: user interaction effect score (also known as customer effect score, CES score, etc.), matching score with the user who inputs the search information, resource content volume, resource release time, resource information volume, and relevance score (also known as main search relevance score).

[0170] For the detailed description of each of the above discrete features, please refer to the detailed description in S201, which will not be repeated here.

[0171] In one achievable method, after obtaining the features of the search information and the features of the candidate resources, the electronic device can also extract the feature semantics expressed by each feature based on the features of the search information and the features of the candidate resources, and obtain a characteristic label of at least one dimension of the candidate resource based on the extracted feature semantics.

[0172] Of course, the electronic device may also determine the characteristic label of at least one dimension of the candidate resource based on other label extraction technologies, based on the characteristics of the search information and the characteristics of the candidate resource, and the embodiments of the present application are not limited to this.

[0173] S403: The electronic device determines resources for search information recall based on characteristic tags of at least one dimension of each of the plurality of candidate resources.

[0174] Optionally, in the characteristic tags of at least one dimension mentioned above, the data format of each characteristic tag can be the data format of a label value, so that the electronic device can determine the resources for search information recall based on the label value of each characteristic tag in the characteristic tags of at least one dimension of multiple candidate resources.

[0175] In one achievable manner, the electronic device may sum the label values ​​of the characteristic labels of at least one dimension of the multiple candidate resources to obtain the availability score of each candidate resource, and sort the candidate resources in descending order according to the availability score of each candidate resource. Then, the electronic device may use the top K (TOP K) candidate resources after sorting as the resources for search information recall.

[0176] Wherein, K is a positive integer.

[0177] In another possible implementation, the business characteristic requirements for searching information may be different in different application scenarios. Therefore, the electronic device can set reasonable label weights for the label values ​​of each characteristic label in the characteristic labels of at least one dimension of multiple candidate resources, and perform weighted sum calculations on each characteristic label based on the label weights of each characteristic label in the characteristic labels of at least one dimension of the candidate resources to obtain an available score for the candidate resource. Subsequently, the electronic device can sort the candidate resources in descending order according to their available scores, and use the top K candidate resources after sorting as resources for recalling search information. In this case, if Figure 5 As shown, the method for an electronic device to determine a resource for searching information recall based on characteristic tags of at least one dimension of a plurality of candidate resources specifically includes:

[0178] S501. The electronic device obtains search information corresponding to the business characteristic requirements of the business scenario.

[0179] Among them, the business feature requirements are used to indicate the business features required by the business scenario.

[0180] For example, when the search information is search information with high timeliness (for example, is the park open today), the business characteristic requirement of the business scenario corresponding to the search information is a timeliness business requirement.

[0181] S502: The electronic device determines a label weight of a characteristic label corresponding to a service characteristic requirement.

[0182] The tag weight of the feature tag corresponding to the business feature requirement is greater than the tag weight of the feature tags of other dimensions. The feature tag corresponding to the business feature requirement and the feature tags of other dimensions are the feature tags in the feature tags of at least one dimension of the candidate resource.

[0183] Specifically, after obtaining the business characteristic requirements of the business scenario corresponding to the search information, in order to ensure that the resources finally determined to be recalled by the search information can meet the business characteristic requirements, the electronic device can set the label weight of the characteristic label corresponding to the business characteristic requirement to a higher value (for example, 0.6), and set the label weight of the characteristic label of other dimensions to a lower value (for example, 0.2). In this way, the business characteristic requirements of different business scenarios can be met through the label weights of different characteristic labels.

[0184] S503: The electronic device determines resources for search information recall based on characteristic tags of at least one dimension of the candidate resources and a tag weight corresponding to each characteristic tag.

[0185] Specifically, when determining the resources for the search information recall, the electronic device may first determine the availability score of the candidate resources based on the characteristic tags of at least one dimension of the candidate resources and the tag weight corresponding to each characteristic tag. Subsequently, the electronic device may determine the resources for the search information recall based on the availability scores of each of the multiple candidate resources.

[0186] Among them, the availability score is used to characterize the recall probability of the candidate resource.

[0187] Optionally, the data format of each characteristic tag in the characteristic tags of at least one dimension of the candidate resources may be the data format of a label value, so that the electronic device may determine the resources for search information recall based on the label value of each characteristic tag in the characteristic tags of at least one dimension of the candidate resources.

[0188] In one achievable manner, the electronic device may perform weighted sum calculation on each sub-tag based on the weight coefficient of each characteristic tag in the characteristic tag of at least one dimension of the candidate resource to obtain the availability score of the candidate resource.

[0189] Exemplarily, when the characteristic tags of the candidate resources include a relevance tag, an authority tag, a personalization tag, and a timeliness tag, the available score of the candidate resources satisfies the following formula:

[0190] The available score of the candidate resource = w1*the tag value of the relevance tag+w2*the tag value of the authority tag+w3*the tag value of the personalized tag+w4*the tag value of the timeliness tag.

[0191] Among them, w1, w2, w3 and w4 are weight coefficients of each characteristic label in the characteristic label of at least one dimension of the candidate resource. w1, w2, w3 and w4 can be the same weight coefficients set manually, or different weight coefficients can be set according to actual needs, which is not limited in the embodiments of the present application.

[0192] Specifically, in different scenarios, users may have different needs for resources recalled by search information. For example, when the search information is "Can I enter a certain square now?", the search information is a question with time-sensitive requirements. In this case, the weight coefficient w4 of the time-sensitive label of the candidate resource can be set to a higher value, and the weight coefficients of other sub-labels can be set to lower values ​​to obtain the available score of the candidate resource that meets the user's needs.

[0193] After obtaining the availability score of each candidate resource, the electronic device can sort the multiple candidate resources from large to small based on the size order of the availability score of each candidate resource, and use the top K (TOP K) candidate resources after sorting as resources for search information recall.

[0194] In some embodiments, Figure 6 FIG. 2 shows a complete flow chart of the resource recall method provided in the embodiment of the present application. Figure 6 As shown, the search information is taken as the search term and the candidate resource is the note as an example.

[0195] First, the electronic device can obtain the characteristics of the search term and the characteristics of the note.

[0196] The features of the search terms include: text features of the search terms and discrete features of the search terms.

[0197] The discrete features of the search terms include timeliness indication parameters of the search terms. The timeliness indication parameters can be obtained by inputting the text features of the search terms into a deep neural network model (such as an NVWA model).

[0198] The features of notes include: text features of notes and discrete features of notes.

[0199] The text features of a note include: the text features of the note title and the text features of the note content.

[0200] The discrete features of a note include: user interaction effect score (i.e. the CES score mentioned above), the matching score between the note and the user who input the search term (i.e. the postrank score mentioned above), the number of words in the note (i.e. the amount of resource content mentioned above), the time when the note was published (i.e. the time when the resource was published above), the amount of information in the note (i.e. the amount of resource information mentioned above), and the relevance score between the note and the search term (i.e. the relevance score mentioned above).

[0201] The user interaction effect score can be obtained by the number of likes, favorites, comments, shares, and followers and their respective weight coefficients. The weight coefficient of the number of likes and favorites is 1, and the weight coefficient of the number of comments, shares, and followers is 4.

[0202] Next, the electronic device can input the discrete features into the N linear layers (Linear layerN) of the label prediction model to obtain a vector representation (i.e., the first vector feature in the above text), denoted as v1, and input the text features into the correlation model of the label prediction model to obtain another vector representation (i.e., the second vector feature in the above text), denoted as v2.

[0203] Next, the electronic device can concatenate v1 and v2 and input them into different prediction heads of the label prediction model (each prediction head includes a linear layer and a sigmoid activation function) to obtain the characteristic labels of the candidate resources output by the label prediction model: relevance label, authority label, personalization label and timeliness label.

[0204] Next, the electronic device may determine the resources for searching information recall according to the characteristic tags of the candidate resources.

[0205] In some embodiments, the embodiments of the present application also provide a resource search method. Figure 7 FIG. 1 is a flow chart of a resource search method provided by an embodiment of the present application. Figure 7 As shown, the resource search method includes: S701-S703.

[0206] S701: The electronic device obtains search information and resources for recalling the search information.

[0207] Among them, the resources recalled by search information are based on the above Figure 4 The resources recalled by the provided resource recall method are, among the candidate resources corresponding to the search information, the top K (TOP K) candidate resources with the highest available scores.

[0208] In some embodiments, when the electronic device is a terminal with a display function, the electronic device can display a conversation page. The conversation page is a pre-set conversation page for resource search, and the user can enter search information (such as relevant keywords) in the conversation page to achieve resource search.

[0209] S702: The electronic device inputs the search information and the resources recalled by the search information into the large language model to obtain the answer resources corresponding to the search information.

[0210] Among them, a large language model (LLM) can be a deep learning model trained using a large amount of text data, which can generate natural language text or understand the meaning of language text.

[0211] Optionally, the LLM may be deployed in an electronic device as an answer module, or may be deployed in other devices connected to the electronic device, which is not limited in the embodiments of the present application.

[0212] S703: The electronic device outputs a response resource.

[0213] Optionally, when the electronic device is a terminal with a display function, the electronic device can feed back answer resources corresponding to the search information in the form of a conversation (such as a robot conversation).

[0214] For example, Figure 8 As shown, the conversation page may include a search information input control 801 , a search information display control 802 , and an answer resource display control 803 .

[0215] The search information input control 801 is used to prompt and receive the search information input by the user. The search information display control 802 is used to display the search information input by the user. The answer resource display control 803 is used to display the answer resources determined by the electronic device.

[0216] Optionally, the above session page may further include a plurality of corresponding controls to implement the required functions. The specific controls may be set and adjusted according to actual needs and are not specifically limited here.

[0217] When the user wants to search for “How much is the ticket price for Park A?”, the user can perform an input operation of inputting “How much is the ticket price for Park A?” on the search information input control 801. In this case, the electronic device can receive the search information of “How much is the ticket price for Park A?” input by the user.

[0218] Next, the electronic device can determine the resources recalled by the search information from multiple candidate resources corresponding to the search information, and determine the answer resource of the search information as "The ticket price of Park A is 100 yuan / person" through the answer module of the electronic device, and display the content of the answer resource in the session page.

[0219] The above mainly introduces the scheme of the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.

[0220] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0221] like Fig. 9 As shown, the embodiment of the present application provides a model training device, including: a communication unit 901 and a processing unit 902;

[0222] The communication unit 901 is used to obtain a first training set for training a label prediction model; the first training set includes a plurality of first training samples, discrete features of the first training samples, text features, and characteristic labels of at least one dimension; the first training samples include sample search information and sample recall resources recalled by the sample search information;

[0223] A processing unit 902 is used to input the discrete features of the first training sample into a linear layer of the label prediction model to obtain a first vector feature, and input the text features of the first training sample into a correlation model of the label prediction model to obtain a second vector feature;

[0224] The processing unit 902 is further used to concatenate the first vector feature and the second vector feature to obtain a comprehensive vector feature, and input the comprehensive vector feature into at least one prediction head of the label prediction model to obtain a first predicted label; different prediction heads are used to predict characteristic labels of the first training sample in different dimensions;

[0225] The processing unit 902 is further configured to train the label prediction model according to the first prediction label and the feature label to obtain a trained label prediction model.

[0226] Optionally, the correlation model is trained by:

[0227] Acquire a second training set; the second training set includes a plurality of second training samples and availability labels of the second training samples; the second training samples include sample search information and sample recall resources recalled through the sample search information; the availability labels are used to characterize the degree of correlation between the sample recall resources and the sample search information and the degree of availability of the sample recall resources for the sample search information;

[0228] Inputting the second training sample into the initial model of the correlation model to obtain a second predicted label;

[0229] The initial model of the correlation model is trained according to the second prediction label and the availability label of the second training sample to obtain the correlation model.

[0230] Optionally, during training of the label prediction model, the learning rate of the correlation model is less than the learning rate of the linear layer.

[0231] Optionally, the processing unit 902 is specifically configured to:

[0232] Discretize the discrete features of the first training sample by bucketing to obtain discrete features of the same order of magnitude;

[0233] The discrete features of the same order of magnitude are input into the linear layer of the label prediction model to obtain the first vector feature.

[0234] Optionally, at least one prediction head is used to predict feature labels of at least one of the following dimensions: a relevance label, an authority label, a personalization label, and a timeliness label;

[0235] The relevance label is used to characterize the relevance between the sample recall resource and the sample search information;

[0236] The authoritative label is used to characterize the authority of the sample recall resource;

[0237] Personalized tags are used to characterize the matching degree between sample recall resources and users who input sample search information;

[0238] The timeliness label is used to characterize the timeliness of sample recall resources.

[0239] Optionally, the discrete features of the sample search information include: a timeliness indication parameter, the timeliness indication parameter is used to indicate whether the search information has a timeliness requirement;

[0240] The text features of sample recall resources include: title text features and content text features;

[0241] The discrete features of sample recall resources include at least one of the following: resource information volume, user interaction effect score, relevance score with sample search information, matching score with users who input sample search information, resource content volume, and resource release time.

[0242] Optionally, the timeliness indicator parameter is obtained in the following way:

[0243] The text features of the sample search information are input into a pre-trained deep neural network model to obtain effectiveness indication parameters.

[0244] Optionally, the user interaction effect score is obtained in the following way:

[0245] Obtain parameter values ​​of interaction parameters for sample recall resources; interaction parameters include at least one of the following: number of likes, number of favorites, number of comments, number of shares, and number of followers;

[0246] The parameter values ​​of the interaction parameters are weighted and summed to obtain the user interaction effect score.

[0247] like Fig.10 As shown, the embodiment of the present application further provides a resource recall device, including: a communication unit 1001 and a processing unit 1002;

[0248] The communication unit 1001 is used to obtain search information and multiple candidate resources corresponding to the search information;

[0249] Processing unit 1002 is used to input the characteristics of the search information and the characteristics of the candidate resources into a label prediction model to obtain a characteristic label of at least one dimension of the candidate resources; the label prediction model is based on Figure 2 The model training method provided is pre-trained;

[0250] The processing unit 1002 is further configured to determine resources for search information recall based on characteristic tags of at least one dimension of each of the plurality of candidate resources.

[0251] Optionally, the processing unit 1002 is specifically configured to:

[0252] Obtaining business characteristic requirements of the business scenario corresponding to the search information; the business characteristic requirements are used to indicate the business characteristics required by the business scenario;

[0253] Determine the label weight of the feature label corresponding to the business feature requirement; the label weight of the feature label corresponding to the business feature requirement is greater than the label weight of the feature labels of other dimensions; the feature label corresponding to the business feature requirement and the feature labels of other dimensions are the feature labels of at least one dimension of the candidate resource;

[0254] Based on the characteristic tags of at least one dimension of the candidate resources and the tag weight corresponding to each characteristic tag, the resources for search information recall are determined.

[0255] like Fig.11 As shown, the embodiment of the present application further provides a resource search device, including: a communication unit 1101 and a processing unit 1102;

[0256] Communication unit 1101, used to obtain search information and resources for searching information recall; the resources for searching information recall are based on Figure 4 The resources recalled by the provided resource recall method;

[0257] The processing unit 1102 is used to input the search information and the resources recalled by the search information into the large language model to obtain the answer resources corresponding to the search information;

[0258] The communication unit 1101 is also used to output the answer resource.

[0259] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the model training, resource recall method or resource search method provided by the present disclosure.

[0260] According to an embodiment of the present disclosure, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable an electronic device to execute the model training, resource recall method or resource search method provided by the present disclosure.

[0261] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the model training, resource recall method or resource search method provided by the present disclosure.

[0262] Fig.12A schematic block diagram of an example electronic device 1200 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0263] like Fig.12 As shown, the electronic device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory 1202 or a computer program loaded from a storage unit 1208 to a random access memory 1203. In the random access memory (Random Access Memory, RAM) 1203, various programs and data required for the operation of the electronic device 1200 can also be stored. The computing unit 1201, the read-only memory (Read-Only Memory, ROM) 1202 and the RAM 1203 are connected to each other through a bus 1204. An input / output (Input / Output, I / O) interface 1205 is also connected to the bus 1204.

[0264] Multiple components in the electronic device 1200 are connected to the input / output interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the electronic device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0265] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors, and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as a data matching method. For example, in one embodiment, the data matching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1208. In one embodiment, part or all of the computer program may be loaded and / or installed on the electronic device 1200 via the ROM 702 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the data matching method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform the data matching method in any other appropriate manner (eg, by means of firmware).

[0266] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays, application specific integrated circuits, application specific standard parts (ASSP), system on chip systems (System On Chip, SOC), complex programmable logic devices (Complex Programmable Logic Device, CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0267] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0268] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, optical fibers, portable compact disk read-only memories, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0269] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user, such as a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0270] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

[0271] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0272] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of this disclosure can be achieved, and this document is not limited here.

[0273] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A model training method, characterized in that: include: Acquire a first training set for training a label prediction model; the first training set includes a plurality of first training samples, discrete features, text features, and characteristic labels of at least one dimension of the first training samples; the first training samples include sample search information and sample recall resources recalled by the sample search information; Inputting the discrete features of the first training sample into a linear layer of the label prediction model to obtain a first vector feature, and inputting the text features of the first training sample into a correlation model of the label prediction model to obtain a second vector feature; splicing the first vector feature and the second vector feature to obtain a comprehensive vector feature, and inputting the comprehensive vector feature into at least one prediction head of the label prediction model to obtain a first predicted label; different prediction heads are used to predict characteristic labels of the first training sample in different dimensions; The label prediction model is trained according to the first prediction label and the characteristic label to obtain a trained label prediction model.

2. The method according to claim 1, characterized in that The correlation model is trained in the following way: Acquire a second training set; the second training set includes a plurality of second training samples and availability labels of the second training samples; the second training samples include sample search information and sample recall resources recalled by the sample search information; the availability labels are used to characterize the degree of correlation between the sample recall resources and the sample search information and the degree of availability of the sample recall resources for the sample search information; Inputting the second training sample into the initial model of the correlation model to obtain a second prediction label; The initial model of the correlation model is trained according to the second prediction label and the availability label of the second training sample to obtain the correlation model.

3. The method according to claim 2, characterized in that During the training of the label prediction model, the learning rate of the correlation model is less than the learning rate of the linear layer.

4. The method according to claim 1, characterized in that: The step of inputting the discrete features of the first training sample into a linear layer of the label prediction model to obtain a first vector feature includes: Discretize the discrete features of the first training sample by bucketing to obtain discrete features of the same order of magnitude; The discrete features with the same order of magnitude are input into the linear layer of the label prediction model to obtain the first vector features.

5. The method according to claim 1, characterized in that The at least one prediction head is used to predict a feature label of at least one of the following dimensions: a relevance label, an authority label, a personalization label, and a timeliness label; The correlation tag is used to characterize the correlation degree between the sample recall resource and the sample search information; The authoritative label is used to characterize the authority of the sample recall resource; The personalized tag is used to characterize the matching degree between the sample recall resource and the user who inputs the sample search information; The timeliness tag is used to characterize the timeliness of the sample recall resource.

6. The method according to claim 1, characterized in that The discrete features of the sample search information include: a timeliness indication parameter, the timeliness indication parameter is used to indicate whether the search information has a timeliness requirement; The text features of the sample recall resources include: title text features and content text features; The discrete features of the sample recall resource include at least one of the following: resource information volume, user interaction effect score, relevance score with the sample search information, matching score with the user who inputs the sample search information, resource content volume and resource release time.

7. The method according to claim 6, characterized in that The timeliness indication parameter is obtained in the following manner: The text features of the sample search information are input into a pre-trained deep neural network model to obtain the effectiveness indication parameter.

8. The method according to claim 6, characterized in that The user interaction effect score is obtained in the following way: Obtaining parameter values ​​of interaction parameters for the sample recall resource; the interaction parameters include at least one of the following: number of likes, number of favorites, number of comments, number of shares, and number of followers; The parameter values ​​of the interaction parameters are weighted and summed to obtain the user interaction effect score.

9. A resource recall method, characterized in that: include: Acquire search information and multiple candidate resources corresponding to the search information; Inputting the features of the search information and the features of the candidate resources into a label prediction model to obtain a characteristic label of at least one dimension of the candidate resource; the label prediction model is pre-trained according to the model training method according to any one of claims 1 to 8; The resources recalled by the search information are determined based on the characteristic tags of at least one dimension of each of the multiple candidate resources.

10. The method according to claim 9, characterized in that The determining of the resources to be recalled by the search information based on the characteristic tags of at least one dimension of each of the plurality of candidate resources includes: Acquire a business characteristic requirement of a business scenario corresponding to the search information; the business characteristic requirement is used to indicate a business characteristic required by the business scenario; Determine the label weight of the characteristic label corresponding to the business characteristic requirement; the label weight of the characteristic label corresponding to the business characteristic requirement is greater than the label weight of the characteristic labels of other dimensions; the characteristic label corresponding to the business characteristic requirement and the characteristic labels of other dimensions are the characteristic labels of at least one dimension of the candidate resource; The resources recalled by the search information are determined based on the characteristic tags of at least one dimension of the candidate resources and the tag weight corresponding to each of the characteristic tags.

11. A resource search method, characterized in that: include: Obtain search information and resources recalled by the search information; The resources recalled by the search information are resources recalled according to the resource recall method according to claim 9 or 10; Inputting the search information and the resources recalled by the search information into a large language model to obtain answer resources corresponding to the search information; The answer resource is output.

12. A model training device, characterized in that: include: a communication unit and a processing unit; The communication unit is used to obtain a first training set for training a label prediction model; The first training set includes a plurality of first training samples, discrete features, text features, and characteristic labels of at least one dimension of the first training samples; the first training samples include sample search information and sample recall resources recalled by the sample search information; The processing unit is used to input the discrete features of the first training sample into the linear layer of the label prediction model to obtain a first vector feature, and input the text features of the first training sample into the correlation model of the label prediction model to obtain a second vector feature; The processing unit is further used to concatenate the first vector feature and the second vector feature to obtain a comprehensive vector feature, and input the comprehensive vector feature into at least one prediction head of the label prediction model to obtain a first predicted label; different prediction heads are used to predict characteristic labels of the first training sample in different dimensions; The processing unit is further used to train the label prediction model according to the first prediction label and the characteristic label to obtain a trained label prediction model.

13. A resource recall device, characterized in that: include: a communication unit and a processing unit; The communication unit is used to obtain search information and multiple candidate resources corresponding to the search information; The processing unit is used to input the features of the search information and the features of the candidate resources into a label prediction model to obtain a characteristic label of at least one dimension of the candidate resource; the label prediction model is pre-trained according to the model training method according to any one of claims 1 to 8; The processing unit is further configured to determine the resources to be recalled by the search information based on the characteristic tags of at least one dimension of each of the multiple candidate resources.

14. A resource search device, characterized in that: include: a communication unit and a processing unit; The communication unit is used to obtain search information and resources for recalling the search information; The resources recalled by the search information are resources recalled according to the resource recall method according to claim 9 or 10; The processing unit is used to input the search information and the resources recalled by the search information into a large language model to obtain answer resources corresponding to the search information; The communication unit is further configured to output the answer resource.

15. An electronic device, characterized in that: The electronic device comprises: processor; a memory configured to store instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 8, or the method according to claim 9 or 10, or the method according to claim 11.

16. A non-volatile storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is read and executed, it implements the method according to any one of claims 1 to 8, or the method according to claim 9 or 10, or the method according to claim 11.

17. A computer program product comprising instructions, characterized in that When the instruction is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 8, or the method according to claim 9 or 10, or the method according to claim 11.