WO2023142406A1 - 排序方法、排序模型的训练方法、装置、电子设备及介质 - Google Patents

排序方法、排序模型的训练方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2023142406A1
WO2023142406A1 PCT/CN2022/107627 CN2022107627W WO2023142406A1 WO 2023142406 A1 WO2023142406 A1 WO 2023142406A1 CN 2022107627 W CN2022107627 W CN 2022107627W WO 2023142406 A1 WO2023142406 A1 WO 2023142406A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
recall
recall data
recalled
feature information
Prior art date
Application number
PCT/CN2022/107627
Other languages
English (en)
French (fr)
Inventor
程洲
Original Assignee
北京百度网讯科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京百度网讯科技有限公司 filed Critical 北京百度网讯科技有限公司
Priority to JP2022578848A priority Critical patent/JP2024509014A/ja
Priority to US18/016,754 priority patent/US20240104154A1/en
Priority to EP22826799.3A priority patent/EP4242879A4/en
Priority to KR1020227045347A priority patent/KR20230006601A/ko
Publication of WO2023142406A1 publication Critical patent/WO2023142406A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Definitions

  • the present disclosure relates to the field of artificial intelligence technology, in particular to the field of intelligent search, and in particular to a sorting method, a sorting model training method, a device, electronic equipment, a computer-readable storage medium, and a computer program product.
  • Artificial intelligence is a discipline that studies the use of computers to simulate certain human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level.
  • Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing.
  • Artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, and machine learning/depth Learning, big data processing technology, knowledge map technology and other major directions.
  • the present disclosure provides a sorting method, a sorting model training method, a device, an electronic device, a computer readable storage medium and a computer program product.
  • a sorting method including: determining a plurality of recall data associated with the data to be searched; for each recall data in the plurality of recall data, based on the recall data and the plurality of recall data The similarity between each of the recalled data in, determine the recommendation degree of the recalled data in multiple recalled data; and based on the recommendation degree of each recalled data in the multiple recalled data, perform sorting for multiple recalled data .
  • a sorting model training method wherein the sorting model includes a first transformer module, and the method includes: determining the first of each recalled data among a plurality of recalled data associated with the data to be searched Feature vector; input the first feature vector of each recalled data in the multiple recalled data into the first transformer module, to obtain the recommendation degree of each recalled data in the multiple recalled data; and in response to the existence of The at least one recalled data with a label adjusts the parameters of the ranking model based on the recommendation degree and label of each recalled data in the at least one recalled data.
  • a sorting device including: a first determination unit configured to determine a plurality of recall data associated with the data to be searched; a second determination unit configured to For each recall data in the recall data, based on the similarity between the recall data and each recall data in the plurality of recall data, determine the recommendation degree of the recall data in the plurality of recall data; and the sorting unit is selected
  • the configuration is configured to perform sorting for the plurality of recall data based on a recommendation degree of each of the plurality of recall data.
  • a ranking model training device wherein the ranking model includes a first transformer module, and the device includes: a fourth determination unit configured to determine a plurality of The first eigenvector of each recalled data in the recalled data; the acquisition unit is configured to input the first eigenvector of each recalled data in the plurality of recalled data into the first transformer module to obtain the plurality of recalled data The recommendation degree of each recalled data; and the adjustment unit is configured to respond to the presence of at least one recalled data with a label in the plurality of recalled data, based on the recommendation degree and label of each recalled data in the at least one recalled data, Adjust the parameters of the ranking model.
  • an electronic device including: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by Execution by at least one processor, so that at least one processor can execute any one of the above methods.
  • a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute any one of the above-mentioned methods.
  • a computer program product including a computer program, wherein the computer program implements any one of the above methods when executed by a processor.
  • the relationship between multiple recalled data can be obtained, and based on this, the quality of sorting the multiple recalled data can be improved.
  • FIG. 1 shows a schematic diagram of an exemplary system in which various methods described herein may be implemented according to an embodiment of the present disclosure
  • Fig. 2 shows a flow chart of a sorting method according to an embodiment of the present disclosure
  • Fig. 3 shows a schematic diagram of a sorting method according to an embodiment of the present disclosure
  • Fig. 4 shows a flow chart of a sorting model training method according to an embodiment of the present disclosure
  • FIG. 5 shows a structural block diagram of a sorting device according to an embodiment of the present disclosure
  • FIG. 6 shows a structural block diagram of a training device for a ranking model according to an embodiment of the present disclosure.
  • FIG. 7 shows a structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure.
  • first, second, etc. to describe various elements is not intended to limit the positional relationship, temporal relationship or importance relationship of these elements, and such terms are only used for Distinguishes one feature from another.
  • first element and the second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on contextual description.
  • Search tasks can generally be divided into two parts: recall and ranking.
  • recall and ranking In related technologies, multiple recalled data are recalled based on the data to be searched in the recall process, and in the sorting process, according to the characteristics of each recalled data, for example, the similarity between the recalled data and the data to be searched, to determine the The recommendation degree of the recalled data, and then perform the sorting of multiple recalled data.
  • This sorting method ignores the contextual information existing among multiple recall data, resulting in poor sorting accuracy.
  • the present disclosure proposes a sorting method. For each recalled data in multiple recalled data, based on the similarity between the recalled data and each recalled data in the multiple recalled data, it is determined that the recalled data is in the The recommendation degree in the plurality of recall data is described, and then the sorting of the plurality of recall data is performed.
  • the relationship between multiple recalled data can be obtained during the sorting process, and based on this, the sorting quality of multiple recalled data can be improved.
  • FIG. 1 shows a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented according to an embodiment of the present disclosure.
  • the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks coupling the one or more client devices to the server 120 110.
  • Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
  • the server 120 may run one or more services or software applications enabling execution of a ranking method or a training method of a ranking model.
  • server 120 may also provide other services or software applications that may include non-virtualized environments and virtualized environments.
  • these services may be provided as web-based services or cloud services, such as under a software-as-a-service (SaaS) model to users of client devices 101, 102, 103, 104, 105, and/or 106 .
  • SaaS software-as-a-service
  • server 120 may include one or more components that implement the functions performed by server 120 . These components may include software components, hardware components or combinations thereof executable by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and/or 106 may in turn utilize one or more client application programs to interact with server 120 to utilize the services provided by these components. It should be understood that various different system configurations are possible, which may differ from system 100 . Accordingly, FIG. 1 is one example of a system for implementing the various methods described herein, and is not intended to be limiting.
  • a user may use client devices 101, 102, 103, 104, 105, and/or 106 to input and send data to be searched.
  • a client device may provide an interface that enables a user of the client device to interact with the client device. The client device can also output information to the user via the interface.
  • FIG. 1 depicts only six client devices, those skilled in the art will understand that the present disclosure can support any number of client devices.
  • Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computing devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, Smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc.
  • These computer devices can run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems , such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android.
  • Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), and the like.
  • Wearable devices may include head-mounted displays (such as smart glasses) and other devices.
  • Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices, and the like.
  • a client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (eg, email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.
  • communication applications eg, email applications
  • SMS Short Message Service
  • Network 110 can be any type of network known to those skilled in the art that can support data communications using any of a number of available protocols, including but not limited to TCP/IP, SNA, IPX, and the like.
  • the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, Public switched telephone network (PSTN), infrared network, wireless network (eg Bluetooth, WIFI) and/or any combination of these and/or other networks.
  • LAN local area network
  • Ethernet-based network a token ring
  • WAN wide area network
  • VPN virtual private network
  • PSTN Public switched telephone network
  • WIFI wireless network
  • Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination .
  • Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (eg, one or more flexible pools of logical storage devices that may be virtualized to maintain the server's virtual storage devices).
  • server 120 may run one or more services or software applications that provide the functionality described below.
  • Computing units in server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems.
  • Server 120 may also run any of a variety of additional server applications and/or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
  • server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of client devices 101 , 102 , 103 , 104 , 105 , and/or 106 .
  • Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101 , 102 , 103 , 104 , 105 and/or 106 .
  • the server 120 may be a server of a distributed system, or a server combined with a blockchain.
  • the server 120 can also be a cloud server, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology.
  • Cloud server is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability existing in traditional physical host and virtual private server (VPS, Virtual Private Server) services.
  • System 100 may also include one or more databases 130 .
  • these databases may be used to store data and other information.
  • databases 130 may be used to store information such as audio files and video files.
  • Database 130 may reside in various locations.
  • the database used by server 120 may be local to server 120, or may be remote from server 120 and may communicate with server 120 via a network-based or dedicated connection.
  • Database 130 can be of different types.
  • the database used by server 120 may be, for example, a relational database.
  • One or more of these databases may store, update and retrieve the database and data from the database in response to commands.
  • databases 130 may also be used by applications to store application data.
  • Databases used by applications can be different types of databases such as key-value stores, object stores or regular stores backed by a file system.
  • the system 100 of FIG. 1 may be configured and operated in various ways to enable application of the various methods and apparatuses described in accordance with this disclosure.
  • Fig. 2 shows a flow chart of a sorting method according to an exemplary embodiment of the present disclosure.
  • the method 200 includes: step S201, determining a plurality of recall data associated with the data to be searched; step S202, for a plurality of recall data For each recall data in, based on the similarity between the recall data and each recall data in a plurality of recall data, determine the recommendation degree of the recall data in a plurality of recall data; and step S203, based on a plurality of recall The recommendation degree of each recalled data in the data, performing sorting for multiple recalled data.
  • the context information of multiple recalled data can be considered in the sorting process, and the sorting quality of multiple recalled data can be improved based on the correlation between multiple recalled data.
  • the data to be searched may be input by the user through the terminal device.
  • the plurality of recall data may be a plurality of data associated with the data to be searched obtained from a database by using a preset recall rule or a trained recall model.
  • any one of the data to be searched and the plurality of recalled data may include at least one of the following data types: text; image; and video.
  • step S202 by determining the similarity between each recalled data and each recalled data in multiple recalled data, it is possible to evaluate whether the recalled data is worth recommending at the level of the data set composed of multiple recalled data , that is, the evaluation of each recall data is not limited to the internal information of the recall data, but also considers the context information of multiple recall data, which helps to improve the accuracy of sorting multiple recall data.
  • the degree of recommendation can be understood as being determined according to one or more factors among user satisfaction, probability of being clicked, and degree of matching with the data to be searched.
  • the similarity can be determined based on the text overlap between the recall data and each recall data in the plurality of recall data, and thus it can be determined that the recall data is in Recommendations in Multiple Recall Data.
  • each recall data determine the number of recall data whose similarity with the recall data is higher than a preset similarity threshold among multiple recall data, and determine the recommendation degree of the recall data based on the number, wherein the recall The recommendability of the data is positively related to this quantity.
  • each recall data in the plurality of recall data has a corresponding first feature vector
  • determining the recommendation degree of the recall data in the plurality of recall data may include: based on the first feature of the recall data The similarity between the vector and the first eigenvector of each recalled data in the plurality of recalled data, and the first eigenvector of each recalled data in the plurality of recalled data are fused to obtain the second eigenvector of the recalled data ; and based on the second eigenvector of the recall data, determine the recommendation degree of the recall data among multiple recall data.
  • the characteristics of the recall data can be reflected on the global level of the set composed of multiple recall data, and then more accurately determine the recall data in multiple recall data. recommendation in .
  • the above-mentioned manner of determining the second feature vector of the recalled data may be realized by using an attention mechanism.
  • determining the recommendation degree of the recall data among the multiple recall data may include: inputting the first feature vector of each recall data among the multiple recall data into the first transformer module, so as to obtain the recall data among multiple recall data The degree of recommendation in recall data.
  • the first transformer module may be composed of two parts: an encoder (encoder) and a decoder (decoder). Based on the self-attention mechanism (Self-Attention), the first transformer module can fully integrate the input multiple first feature vectors, and then accurately determine each recall data at the global level of the set composed of multiple recall data. Recommendations in Multiple Recall Data.
  • each of the plurality of recall data includes a plurality of feature information
  • the method may further include: before determining the recommendation degree of the recall data in the plurality of recall data, for each of the plurality of recall data For one piece of recalled data, a first feature vector of the recalled data is determined by fusing multiple feature information of the recalled data.
  • the first feature vector obtained by fusing multiple feature information of each recall data can more accurately represent the recall data at the overall level composed of multiple features, thereby improving the sorting of multiple recall data quality.
  • the pieces of feature information of each piece of recall data include feature information used to represent the similarity between the recall data and the data to be searched.
  • the similarity between the recalled data and the data to be searched can be reflected from the feature level of each recalled data, and further, the first feature vector obtained by fusing multiple feature information of the recalled data can be Indicates how similar the recalled data is to the searched data.
  • each feature information among the plurality of feature information of each recall data can be obtained through an additional model prediction.
  • the recall data and the data to be searched may be input into an additional matching model to obtain similarity information between the recall data and the data to be searched.
  • the similarity information is used as a characteristic information of the recalled data for sorting the recalled data.
  • the plurality of feature information includes at least one of numerical feature information, enumerated feature information, and vector feature information.
  • the numerical feature information may include, for example, historical hits; the enumerated feature information may include, for example, the type of recall source of the recall data, the type of page style, etc.; the vector feature information may include, for example, the The feature vector of the similarity between the data and the data to be searched, the feature vector used to represent the site quality of the recalled data, and the like.
  • determining the first feature vector of the recall data may include: determining a characterization vector of each feature information in the plurality of feature information; and by combining a plurality of feature information The characterization vectors of each feature information in the feature information are fused to determine the first feature vector of the recalled data.
  • each feature information in the multiple feature information may be converted into a representation vector of the same dimension first, that is, to realize normalization of the feature information.
  • the purpose of feature normalization is to smoothly learn the relationship between feature information, and then represent the recall data as a pre-step of the first feature vector.
  • each numerical feature information it is converted into a D-dimensional representation vector by logarithmizing its value or dividing by a constant, wherein the dimension D of the representation vector is predetermined; for each enumeration For feature information, a corresponding preset D-dimensional vector can be selected according to the specific enumeration value as the representation vector of the enumeration feature information; for each vector feature information, it can be expressed as one or more D-dimensional representation vectors, for example , convert the vector feature information directly into a D-dimensional vector through linear transformation, or convert it into multiple D-dimensional vectors according to the dimension of the vector feature information and the size of the data.
  • determining the first feature vector of the recall data may include: inputting the characterization vector of each of the multiple feature information The second transformer module to obtain the first feature vector of the recalled data.
  • the second transformer module may be composed of an encoder. Based on the attention mechanism in the encoder, each feature information in multiple feature information can be fully fused, and the obtained first feature vector can be more accurate. to represent the recall data.
  • inputting the characterization vector of each of the plurality of feature information into the second transformer module may include: arranging the characterization vector of each of the plurality of feature information in a preset order to form the recalling a feature matrix of the data; and inputting the feature matrix into a second transformer module.
  • the present disclosure does not limit the order of arrangement of multiple characteristic information, only that the order of arrangement of multiple characteristic information of each recall data is the same, for example, the order of arrangement can be preset as: "historical hits, page style type, the similarity between the recalled data and the data to be searched, and the type of the recalled source”, so that the characterization vectors of multiple feature information of each recalled data should be arranged in this order, so that each recalled data is in the same
  • the mode is input into the second transformer module.
  • an additional vector is added on the basis of the characteristic vectors of the plurality of characteristic information of the recalled data, and the additional vector and the characteristic vectors of the plurality of characteristic information
  • the dimensions are the same, and can be used to extract the first feature vector of the recalled data at the output of the second transformer module, that is, the output vector obtained by processing the additional vector through the second transformer module is used as the first feature vector of the recalled data.
  • the additional vector can be arranged before or after the characterizing vectors of the plurality of feature information.
  • a preset default vector may be set in the order of the feature information in a preset order.
  • recall data can come from multiple different recall sources, for example, from different databases or recalled through different recall models, there may be situations where the feature information in different recall data is not uniform, that is, a recall data A feature information in does not exist in another recall data.
  • a preset default vector is used to occupy the position of missing feature information.
  • Step S203 performs sorting for multiple recall data based on the recommendation degree of each recall data determined in step S202. Specifically, multiple recalled data can be arranged in sequence according to the degree of recommendation and fed back to the client, so that the user can view the search results for the data to be searched through the client.
  • Fig. 3 shows a schematic diagram of a sorting method according to an exemplary embodiment of the present disclosure.
  • each of the recall data 1-N includes a plurality of feature information (shown by a cube in Figure 3 exemplarily), by performing steps 301, 302 and S303, the recall data can be determined
  • the recommendation degree of each of 1-N is used for sorting the recalled data 1-N.
  • the description of the sorting method for the recalled data 1 to N is as follows:
  • Step 301 For each of the recalled data 1-N, determine the characterization vector of each of the multiple feature information of the recall data, and combine the characterization vector of each of the multiple feature information with an additional vector
  • the jointly formed feature matrix is input into the second transformer model, wherein the additional vector is located in the first column of the feature matrix;
  • Step 302 for each of the recalled data 1-N, obtain the first feature vector of the recalled data through the encoder of the second transformer model, wherein the first feature vector is the additional vector passed through the second transformer model an output vector resulting from encoder processing;
  • Step 303 Input the first feature vector of each of the recalled data 1 to N into the first transformer model, and fuse the first feature vectors of each recalled data through the encoder in the first transformer model to obtain the recalled data
  • the second eigenvectors of each of 1 to N wherein the second eigenvectors of each recalled data are fused with the information of other recalled data through the encoder of the first transformer model, and finally, for the recalled data 1
  • Each of -N determines the recommendation degree of the recall data based on the second feature vector of the recall data.
  • the recalled data 1-N After determining the recommendation degree of each of the recalled data 1-N, the recalled data 1-N can be sorted based on the magnitude of the recommendation degree of each.
  • Fig. 4 shows a flow chart of a sorting model training method according to an exemplary embodiment of the present disclosure, wherein the sorting model includes a first transformer module, and the method 400 includes: step S401, determining multiple The first feature vector of each recall data in the recall data; step S402, input the first feature vector of each recall data in the plurality of recall data into the first transformer module, to obtain each recall in the plurality of recall data The recommendation degree of the data; and step S403 , in response to at least one recalled data having a label among the plurality of recalled data, adjusting the parameters of the ranking model based on the recommendation degree and the label of each recalled data in the at least one recalled data.
  • the sorting model trained in this way can mine the correlation between multiple recalled data through the first transformer module, so that the context information of multiple recalled data can be considered in the sorting process, and the sorting quality of multiple recalled data can be improved.
  • the first transformer module may be composed of two parts: an encoder (encoder) and a decoder (decoder).
  • the first transformer module in the sorting model trained by the above method can fully integrate multiple input first feature vectors based on the self-attention mechanism (Self-Attention), and then in the set of multiple recall data Accurately determine the recommendation degree of each recall data among multiple recall data at the global level.
  • the plurality of recall data may be a plurality of data associated with the data to be searched obtained from a database by using a preset recall rule or a trained recall model.
  • the ranking model further includes a second transformer module, each recall data in the plurality of recall data includes a plurality of feature information, and wherein determining the first feature vector of each recall data in the plurality of recall data includes : determine the characterization vector of each feature information in the plurality of feature information of the recall data; and input the characterization vector of each feature information in the plurality of feature information into the second transformer module to obtain the first feature of the recall data vector.
  • the second transformer module may be composed of an encoder (encoder).
  • the trained second transformer module can fully integrate each feature information of multiple feature information based on the attention mechanism in the encoder, and the obtained first feature vector can more accurately represent the recall data.
  • pre-training for the second transformer module is performed before inputting the characterization vector of each feature information in the plurality of feature information into the second transformer module.
  • the pre-training for the second transformer module may include: obtaining sample data with labels, wherein the sample data includes a plurality of feature information; each feature information in the multiple feature information of the sample data
  • the characterization vector is input to the second transformer module to obtain the first feature vector of the sample data; the first feature vector is input to the classification model to obtain the predicted classification of the sample data; and based on the predicted classification and label of the sample data, adjust The parameters of the second transformer module.
  • the second transformer module can be pre-trained by connecting a classification model to the output of the second transformer module, so as to obtain a primary second transformer module that can adapt to downstream tasks.
  • executing the training of the sorting model can speed up the convergence speed of the model and improve the training effect.
  • the classification model may be a click prediction model.
  • the parameter adjustment for the ranking model is only performed based on the recalled data with labels. It can be understood that, for multiple recall data, the user may only view part of the recall data, that is, the user only gives feedback information on part of the recall data. In this case, only the labels for the part of the recalled data that were viewed are available.
  • the user only viewed the first 10 recall data, that is, the user only made a judgment on the first 10 recall data that he had seen, such as clicking on the third recall data and No other recall data was clicked.
  • these data should not be used in the parameter adjustment of the ranking model.
  • the label of each recall data in the at least one recall data may be determined based on at least one of the following information: click information for the at least one recall data; Search for matching information between data.
  • the clicked recall data can be assigned a larger value as a label, and the recall data that has not been clicked can be assigned a smaller value as a label. For example, clicked recalls have a label of 1 and unclicked recalls have a label of 0.
  • the label can be further refined according to the number of times each recall data is clicked, so that the magnitude of the label value is positively correlated with the number of clicks.
  • the label of each recalled data may be determined, wherein the numerical value of the label is positively correlated with the matching degree.
  • the label of the recalled data may also be determined according to the degree of satisfaction with the recalled data, wherein the numerical value of the label is positively correlated with the degree of satisfaction.
  • Fig. 5 shows a structural block diagram of a sorting device according to an exemplary embodiment of the present disclosure.
  • the device 500 includes: a first determining unit 501 configured to determine a plurality of recall data associated with the data to be searched;
  • the unit 502 is configured to, for each recall data in the plurality of recall data, based on the similarity between the recall data and each recall data in the plurality of recall data, determine that the recall data is in the plurality of recall data degree of recommendation; and a sorting unit 503 configured to perform sorting for the plurality of recall data based on the recommendation degree of each recall data in the plurality of recall data.
  • each recall data in the plurality of recall data has a corresponding first feature vector
  • the second determination unit includes: a fusion subunit configured to combine the first feature vector of the recall data with the similarity between the first eigenvectors of each of the plurality of recalled data, and fusing the first eigenvectors of each of the plurality of recalled data to obtain a second eigenvector of the recalled data; and
  • the first determination subunit is configured to determine the recommendation degree of the recall data among the plurality of recall data based on the second feature vector of the recall data.
  • the second determination unit includes: inputting the first feature vector of each recall data in the plurality of recall data into the first transformer module, so as to obtain the recommendation degree of the recall data in the plurality of recall data subunit.
  • each recall data in the plurality of recall data includes a plurality of feature information
  • the device further includes: a third determination unit configured to, before determining the recommendation degree of the recall data in the plurality of recall data, For each recall data among the multiple recall data, a first feature vector of the recall data is determined by fusing multiple feature information of the recall data.
  • the third determining unit includes: a second determining subunit configured to determine a characterization vector of each feature information in a plurality of feature information; and a third determining subunit configured to The characterization vectors of each of the feature information are fused together to determine the first feature vector of the recalled data.
  • the third determination unit includes: an input subunit configured to input a feature vector of each feature information in the plurality of feature information into the second transformer module to obtain a first feature vector of the recall data.
  • the input subunit includes: a subunit for arranging the characterization vectors of each of the feature information in a preset order to form a feature matrix of the recalled data; and a subunit for arranging the feature matrix Enter the subunit of the second transformer module.
  • the input subunit includes: a subunit configured to, in response to the absence of any one feature information among the plurality of feature information, set a preset default vector for the order of the feature information in a preset order.
  • the pieces of feature information of each piece of recall data include feature information used to represent the similarity between the recall data and the data to be searched.
  • the plurality of feature information includes at least one of numerical feature information, enumerated feature information, and vector feature information.
  • any one of the data to be searched and the plurality of recalled data includes at least one of the following data types: text; images; and video.
  • Fig. 6 shows a structural block diagram of an apparatus for training a ranking model according to an exemplary embodiment of the present disclosure, wherein, the ranking model includes a first transformer module, and the apparatus 600 includes: a fourth determination unit 601 configured to determine and to be searched A first feature vector of each of the multiple recall data associated with the data; an acquisition unit 602 configured to input the first feature vector of each of the multiple recall data into the first transformer module, to obtain the recommendation degree of each recall data in the plurality of recall data; and the adjustment unit 603 is configured to respond to the presence of at least one recall data with a label in the plurality of recall data, based on each of the at least one recall data Recall the recommendation degree and label of the data, and adjust the parameters of the ranking model.
  • the apparatus 600 includes: a fourth determination unit 601 configured to determine and to be searched A first feature vector of each of the multiple recall data associated with the data; an acquisition unit 602 configured to input the first feature vector of each of the multiple recall data into the first transformer module, to obtain the recommendation degree of each recall data
  • the label of each recalled data in the at least one recalled data is determined based on at least one of the following information: click information for the at least one recalled data; matching information between data.
  • the ranking model further includes a second transformer module, each recall data in the plurality of recall data includes a plurality of feature information, and wherein the fourth determination unit includes: a plurality of feature information for determining the recall data and a subunit for inputting the characterization vector of each of the multiple feature information into the second transformer module to obtain the first feature vector of the recall data.
  • the device further includes a pre-training unit configured to perform pre-training for the second transformer module before inputting the characterization vector of each feature information in the plurality of feature information into the second transformer module.
  • an electronic device including: 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 at least one processor. Executed by a processor, so that at least one processor can execute any one of the above methods.
  • a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute any one of the above-mentioned methods.
  • a computer program product including a computer program, wherein the computer program implements any one of the above methods when executed by a processor.
  • Electronic device 700 is intended to mean various forms of digital electronic computing equipment, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • an electronic device 700 includes a computing unit 701, which can perform calculations according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various appropriate actions and processes are performed. In the RAM 703, various programs and data necessary for the operation of the electronic device 700 can also be stored.
  • the computing unit 701, ROM 702, and RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also connected to the bus 704 .
  • the input unit 706 may be any type of device capable of inputting information to the electronic device 700, the input unit 706 may receive input digital or character information, and generate key signal input related to user settings and/or function control of the electronic device, and This may include, but is not limited to, a mouse, keyboard, touch screen, trackpad, trackball, joystick, microphone, and/or remote control.
  • the output unit 707 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video/audio output terminal, a vibrator, and/or a printer.
  • the storage unit 708 may include, but is not limited to, a magnetic disk and an optical disk.
  • the communication unit 709 allows the electronic device 700 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks, and may include but not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and/or a chip Groups, such as BluetoothTM devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.
  • the computing unit 701 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 701 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
  • the calculation unit 701 executes various methods and processes described above, such as a ranking method or a training method of a ranking model.
  • the ranking method or the training method of the ranking model may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708 .
  • part or all of the computer program can be loaded and/or installed on the electronic device 700 via the ROM 702 and/or the communication unit 709.
  • the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the above-described sorting method or training method of the sorting model can be performed.
  • the computing unit 701 may be configured in any other appropriate way (for example, by means of firmware) to execute a ranking method or a training method of a ranking model.
  • Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), complex programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC system of systems
  • CPLD complex programmable logic device
  • computer hardware firmware, software, and/or combinations thereof.
  • programmable processor can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
  • Program codes for implementing the methods 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 devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented.
  • the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • 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, apparatus, or device.
  • 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, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer.
  • a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or a trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
  • 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., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
  • a computer system may include clients and servers.
  • Clients and servers are generally remote from each other and typically interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
  • the server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
  • steps may be reordered, added or deleted using the various forms of flow shown above.
  • each step described in the present disclosure may be executed in parallel, sequentially or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供了一种排序方法、排序模型的训练方法、装置、电子设备及介质,涉及人工智能领域,尤其涉及智能搜索领域。实现方案为:确定与待搜索数据相关联的多个召回数据;针对多个召回数据中的每一个召回数据,基于该召回数据与多个召回数据中的每一个召回数据之间的相似度,确定该召回数据在多个召回数据中的推荐度;以及基于多个召回数据中的每一个召回数据的推荐度,执行针对所述多个召回数据的排序。

Description

排序方法、排序模型的训练方法、装置、电子设备及介质
相关申请的交叉引用
本申请要求于2022年1月30日提交的中国专利申请2022101135725的优先权,其全部内容通过引用整体结合在本申请中。
技术领域
本公开涉及人工智能技术领域,尤其涉及智能搜索领域,具体涉及一种排序的方法、排序模型的训练方法、装置、电子设备、计算机可读存储介质和计算机程序产品。
背景技术
人工智能是研究使计算机来模拟人的某些思维过程和智能行为(如学习、推理、思考、规划等)的学科,既有硬件层面的技术也有软件层面的技术。人工智能硬件技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理等技术、人工智能软件技术主要包括计算机视觉技术、语音识别技术、自然语言处理技术以及机器学习/深度学习、大数据处理技术、知识图谱技术等几大方向。
在此部分中描述的方法不一定是之前已经设想到或采用的方法。除非另有指明,否则不应假定此部分中描述的任何方法仅因其包括在此部分中就被认为是现有技术。类似地,除非另有指明,否则此部分中提及的问题不应认为在任何现有技术中已被公认。
发明内容
本公开提供了一种排序的方法、排序模型的训练方法、装置、电子设备、计算机可读存储介质和计算机程序产品。
根据本公开的一方面,提供了一种排序方法,包括:确定与待搜索数据相关联的多个召回数据;针对多个召回数据中的每一个召回数据,基于该召回数据与多个召回数据中的每一个召回数据之间的相似度,确定该召回数据 在多个召回数据中的推荐度;以及基于多个召回数据中的每一个召回数据的推荐度,执行针对多个召回数据的排序。
根据本公开的一方面,提供了一种排序模型训练方法,其中,排序模型包括第一transformer模块,方法包括:确定与待搜索数据相关联的多个召回数据中的每一个召回数据的第一特征向量;将多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到多个召回数据中的每一个召回数据的推荐度;以及响应于多个召回数据中存在至少一个具有标签的召回数据,基于至少一个召回数据中的每一个召回数据的推荐度和标签,调整排序模型的参数。
根据本公开的另一方面,提供了一种排序装置,包括:第一确定单元,被配置用于确定与待搜索数据相关联的多个召回数据;第二确定单元,被配置用于针对多个召回数据中的每一个召回数据,基于该召回数据与多个召回数据中的每一个召回数据之间的相似度,确定该召回数据在多个召回数据中的推荐度;以及排序单元,被配置用于基于多个召回数据中的每一个召回数据的推荐度,执行针对多个召回数据的排序。
根据本公开的另一方面,提供了一种排序模型的训练装置,其中,排序模型包括第一transformer模块,装置包括:第四确定单元,被配置用于确定与待搜索数据相关联的多个召回数据中的每一个召回数据的第一特征向量;获取单元,被配置用于将多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到多个召回数据中的每一个召回数据的推荐度;以及调整单元,被配置用于响应于多个召回数据中存在至少一个具有标签的召回数据,基于至少一个召回数据中的每一个召回数据的推荐度和标签,调整排序模型的参数。
根据本公开的另一方面,还提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述任意一种方法。
根据本公开的另一方面,还提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行上述任意一种方法。
根据本公开的另一方面,还提供了一种计算机程序产品,包括计算机程序,其中,计算机程序在被处理器执行时实现上述任意一种方法。
根据本公开的一个或多个实施例,能够在排序过程中获取多个召回数据之间的联系,并基于此来提升对多个召回数据的排序质量。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
附图说明
附图示例性地示出了实施例并且构成说明书的一部分,与说明书的文字描述一起用于讲解实施例的示例性实施方式。所示出的实施例仅出于例示的目的,并不限制权利要求的范围。在所有附图中,相同的附图标记指代类似但不一定相同的要素。
图1示出了根据本公开的实施例的可以在其中实施本文描述的各种方法的示例性***的示意图;
图2示出了根据本公开的实施例的一种排序方法的流程图;
图3示出了根据本公开的实施例的一种排序方法的示意图;
图4示出了根据本公开的实施例的一种排序模型训练方法的流程图;
图5示出了根据本公开的实施例的排序装置的结构框图;
图6示出了根据本公开的实施例的排序模型的训练装置的结构框图;以及
图7示出了能够用于实现本公开的实施例的示例性电子设备的结构框图。
具体实施方式
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
在本公开中,除非另有说明,否则使用术语“第一”、“第二”等来描述各种要素不意图限定这些要素的位置关系、时序关系或重要性关系,这种术语只是用于将一个要素与另一要素区分开。在一些示例中,第一要素和第二要素可以指向该要素的同一实例,而在某些情况下,基于上下文的描述,它们也可以指代不同实例。
在本公开中对各种示例的描述中所使用的术语只是为了描述特定示例的目的,而并非旨在进行限制。除非上下文另外明确地表明,如果不特意限定要素的数量,则该要素可以是一个也可以是多个。此外,本公开中所使用的术语“和/或”涵盖所列出的项目中的任何一个以及全部可能的组合方式。
搜索任务一般可以分为召回和排序两个部分。在相关技术中,在召回过程中基于待搜索数据而召回多个召回数据,在排序过程中,根据每一个召回数据自身的特征,例如,该召回数据与待搜索数据的相似度,来确定该召回数据的推荐度,进而执行对多个召回数据的排序。这种排序方式忽视了多个召回数据之间存在的上下文信息,导致排序的准确性不佳。
基于此,本公开提出一种排序方法,针对多个召回数据中的每一个召回数据,基于该召回数据与多个召回数据中的每一个召回数据之间的相似度,确定该召回数据在所述多个召回数据中的推荐度,进而执行对多个召回数据的排序。由此,能够在排序过程中获取多个召回数据之间的关系,并基于此来提升对多个召回数据的排序质量。
下面将结合附图详细描述本公开的实施例。
图1示出了根据本公开的实施例可以将本文描述的各种方法和装置在其中实施的示例性***100的示意图。参考图1,该***100包括一个或多个客户端设备101、102、103、104、105和106、服务器120以及将一个或多个客户端设备耦接到服务器120的一个或多个通信网络110。客户端设备101、102、103、104、105和106可以被配置为执行一个或多个应用程序。
在本公开的实施例中,服务器120可以运行使得能够执行排序方法或排序模型的训练方法的一个或多个服务或软件应用。
在某些实施例中,服务器120还可以提供可以包括非虚拟环境和虚拟环境的其他服务或软件应用。在某些实施例中,这些服务可以作为基于web的 服务或云服务提供,例如在软件即服务(SaaS)模型下提供给客户端设备101、102、103、104、105和/或106的用户。
在图1所示的配置中,服务器120可以包括实现由服务器120执行的功能的一个或多个组件。这些组件可以包括可由一个或多个处理器执行的软件组件、硬件组件或其组合。操作客户端设备101、102、103、104、105和/或106的用户可以依次利用一个或多个客户端应用程序来与服务器120进行交互以利用这些组件提供的服务。应当理解,各种不同的***配置是可能的,其可以与***100不同。因此,图1是用于实施本文所描述的各种方法的***的一个示例,并且不旨在进行限制。
用户可以使用客户端设备101、102、103、104、105和/或106来输入和发送待搜索数据。客户端设备可以提供使客户端设备的用户能够与客户端设备进行交互的接口。客户端设备还可以经由该接口向用户输出信息。尽管图1仅描绘了六种客户端设备,但是本领域技术人员将能够理解,本公开可以支持任何数量的客户端设备。
客户端设备101、102、103、104、105和/或106可以包括各种类型的计算机设备,例如便携式手持设备、通用计算机(诸如个人计算机和膝上型计算机)、工作站计算机、可穿戴设备、智能屏设备、自助服务终端设备、服务机器人、游戏***、瘦客户端、各种消息收发设备、传感器或其他感测设备等。这些计算机设备可以运行各种类型和版本的软件应用程序和操作***,例如MICROSOFT Windows、APPLE iOS、类UNIX操作***、Linux或类Linux操作***(例如GOOGLE Chrome OS);或包括各种移动操作***,例如MICROSOFT Windows Mobile OS、iOS、Windows Phone、Android。便携式手持设备可以包括蜂窝电话、智能电话、平板电脑、个人数字助理(PDA)等。可穿戴设备可以包括头戴式显示器(诸如智能眼镜)和其他设备。游戏***可以包括各种手持式游戏设备、支持互联网的游戏设备等。客户端设备能够执行各种不同的应用程序,例如各种与Internet相关的应用程序、通信应用程序(例如电子邮件应用程序)、短消息服务(SMS)应用程序,并且可以使用各种通信协议。
网络110可以是本领域技术人员熟知的任何类型的网络,其可以使用多种可用协议中的任何一种(包括但不限于TCP/IP、SNA、IPX等)来支持数 据通信。仅作为示例,一个或多个网络110可以是局域网(LAN)、基于以太网的网络、令牌环、广域网(WAN)、因特网、虚拟网络、虚拟专用网络(VPN)、内部网、外部网、公共交换电话网(PSTN)、红外网络、无线网络(例如蓝牙、WIFI)和/或这些和/或其他网络的任意组合。
服务器120可以包括一个或多个通用计算机、专用服务器计算机(例如PC(个人计算机)服务器、UNIX服务器、中端服务器)、刀片式服务器、大型计算机、服务器群集或任何其他适当的布置和/或组合。服务器120可以包括运行虚拟操作***的一个或多个虚拟机,或者涉及虚拟化的其他计算架构(例如可以被虚拟化以维护服务器的虚拟存储设备的逻辑存储设备的一个或多个灵活池)。在各种实施例中,服务器120可以运行提供下文所描述的功能的一个或多个服务或软件应用。
服务器120中的计算单元可以运行包括上述任何操作***以及任何商业上可用的服务器操作***的一个或多个操作***。服务器120还可以运行各种附加服务器应用程序和/或中间层应用程序中的任何一个,包括HTTP服务器、FTP服务器、CGI服务器、JAVA服务器、数据库服务器等。
在一些实施方式中,服务器120可以包括一个或多个应用程序,以分析和合并从客户端设备101、102、103、104、105和/或106的用户接收的数据馈送和/或事件更新。服务器120还可以包括一个或多个应用程序,以经由客户端设备101、102、103、104、105和/或106的一个或多个显示设备来显示数据馈送和/或实时事件。
在一些实施方式中,服务器120可以为分布式***的服务器,或者是结合了区块链的服务器。服务器120也可以是云服务器,或者是带人工智能技术的智能云计算服务器或智能云主机。云服务器是云计算服务体系中的一项主机产品,以解决传统物理主机与虚拟专用服务器(VPS,Virtual Private Server)服务中存在的管理难度大、业务扩展性弱的缺陷。
***100还可以包括一个或多个数据库130。在某些实施例中,这些数据库可以用于存储数据和其他信息。例如,数据库130中的一个或多个可用于存储诸如音频文件和视频文件的信息。数据库130可以驻留在各种位置。例如,由服务器120使用的数据库可以在服务器120本地,或者可以远离服务器120且可以经由基于网络或专用的连接与服务器120通信。数据库130 可以是不同的类型。在某些实施例中,由服务器120使用的数据库例如可以是关系数据库。这些数据库中的一个或多个可以响应于命令而存储、更新和检索到数据库以及来自数据库的数据。
在某些实施例中,数据库130中的一个或多个还可以由应用程序使用来存储应用程序数据。由应用程序使用的数据库可以是不同类型的数据库,例如键值存储库,对象存储库或由文件***支持的常规存储库。
图1的***100可以以各种方式配置和操作,以使得能够应用根据本公开所描述的各种方法和装置。
本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。
图2示出了根据本公示例性实施例的一种排序方法的流程图,该方法200包括:步骤S201、确定与待搜索数据相关联的多个召回数据;步骤S202、针对多个召回数据中的每一个召回数据,基于该召回数据与多个召回数据中的每一个召回数据之间的相似度,确定该召回数据在多个召回数据中的推荐度;以及步骤S203、基于多个召回数据中的每一个召回数据的推荐度,执行针对多个召回数据的排序。
由此,能够在排序过程中考虑多个召回数据的上下文信息,基于多个召回数据之间的相关性,来提升对多个召回数据的排序质量。
针对步骤S201,其中,待搜索数据可以为用户通过终端设备而输入的。多个召回数据可以为利用预设的召回规则或者经过训练的召回模型,从数据库获取的与待搜索数据相关联的多个数据。
根据一些实施例,待搜索数据和多个召回数据两者中的任意一者可以包括以下至少一种数据类型:文本;图像;和视频。
针对步骤S202,通过确定每一个召回数据与多个召回数据中的每一个召回数据之间的相似度,能够在多个召回数据所构成的数据集合的层面,来评估该召回数据是否值得被推荐,即使得对每一个召回数据的评估不仅局限于该召回数据的内部信息,还能够考虑多个召回数据的上下文信息,有助于提升对多个召回数据的排序的准确程度。
其中,推荐度可以理解为根据用户满意度、被点击的概率和与待搜索数据的匹配程度中的一种或多种因素而确定。
根据一些实施例,针对多个召回数据中的每一个召回数据,可以基于该召回数据与多个召回数据中的每一个召回数据的文字重合度来确定相似度,并由此确定该召回数据在多个召回数据中的推荐度。
例如,针对每一个召回数据,确定多个召回数据中与该召回数据的相似度高于预设相似度阈值的召回数据的数量,并基于该数量确定该召回数据的推荐度,其中,该召回数据的推荐度与该数量正相关。
根据一些实施例,多个召回数据中的每一个召回数据具有对应的第一特征向量,并且其中,确定该召回数据在多个召回数据中的推荐度可以包括:基于该召回数据的第一特征向量与多个召回数据中的每一个召回数据的第一特征向量之间的相似度,融合多个召回数据中的每一个召回数据的第一特征向量,以得到该召回数据的第二特征向量;以及基于该召回数据的第二特征向量,确定该召回数据在多个召回数据中的推荐度。
基于该方法所得到的每一个召回数据的第二特征,能够在多个召回数据所构成的集合的全局层面上反映该召回数据的特点,进而更为准确地确定该召回数据在多个召回数据中的推荐度。
其中,上述确定召回数据的第二特征向量的方式可以使用注意力(Attention)机制来实现。
根据一些实施例,确定该召回数据在多个召回数据中的推荐度可以包括:将多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到该召回数据在多个召回数据中的推荐度。
其中,第一transformer模块可以由编码器(encoder)和解码器(decoder)两部分构成。基于自注意力机制(Self-Attention),第一transformer模块可以使输入的多个第一特征向量充分融合,进而在多个召回数据所构成的集合的全局层面上准确地确定每个召回数据在多个召回数据中的推荐度。
根据一些实施例,多个召回数据中的每一个召回数据包括多个特征信息,方法还可以包括:在确定该召回数据在多个召回数据中的推荐度之前,针对多个召回数据中的每一个召回数据,通过将该召回数据的多个特征信息相融合,确定该召回数据的第一特征向量。
通过将每一个召回数据的多个特征信息相融合而得到的第一特征向量,能够在多个特征所构成的整体的层面更加准确地表示出该召回数据,进而提升对多个召回数据的排序质量。
根据一些实施例,每一个召回数据的多个特征信息中包括用于表示该召回数据与待搜索数据之间的相似度的特征信息。
由此,可以从每个召回数据的特征层面反映出该召回数据与待搜索数据之间的相似度,进一步地,通过将该召回数据的多个特征信息相融合而得到的第一特征向量可以表示该召回数据与待搜索数据的相似程度。
在一种实施方式中,每个召回数据的多个特征信息中的每一个特征信息可以通过附加的模型预测得到。例如,针对多个召回数据中的每一个召回数据,可以将该召回数据和待搜索数据输入附加的匹配模型,以得到该召回数据与待搜索数据之间的相似度信息。该相似度信息作为该召回数据的一个特征信息而用于对召回数据的排序之中。
根据一些实施例,多个特征信息包括数值特征信息、枚举特征信息和向量特征信息中的至少一种。
在一种实施方式中,数值特征信息例如可以包括历史点击量;枚举特征信息例如可以包括该召回数据的召回来源的类型、页面样式的类型等;向量特征信息例如可以包括用于表示该召回数据与待搜索数据之间的相似度的特征向量、用于表示该召回数据的站点质量的特征向量等。
根据一些实施例,通过将该召回数据的多个特征信息相融合,确定该召回数据的第一特征向量可以包括:确定多个特征信息中的每一个特征信息的表征向量;以及通过将多个特征信息中的每一个特征信息的表征向量相融合,确定该召回数据的第一特征向量。
由于多个特征信息的数据类型多样,为了能够便于后续的处理,可以先将多个特征信息中的每一个特征信息转换为相同维度的表征向量,即实现特征信息的归一化。进行特征归一化是为了顺利进行特征信息间关系学习,并进而将召回数据表示为第一特征向量的前置步骤。
在一种实施方式中,针对每个数值特征信息,通过将其数值求对数或者除常数来转换为一个D维的表征向量,其中,表征向量的维度D是预先确定;针对每个枚举特征信息,可以根据具体的枚举值选择一个对应的预设D 维向量作为该枚举特征信息的表征向量;针对每个向量特征信息,可以表示为一个或多个D维的表征向量,例如,通过线性变换将向量特征信息直接转换为1个D维向量,或者按向量特征信息的维度和数据的大小,转换为多个D维向量。
根据一些实施例,通过将多个特征信息中的每一个特征信息的表征向量相融合,确定该召回数据的第一特征向量可以包括:将多个特征信息中的每一个特征信息的表征向量输入第二transformer模块,以得到该召回数据的第一特征向量。
其中,第二transformer模块可以由编码器(encoder)构成,基于编码器中的注意力机制,多个特征信息中的每一个特征信息能够充分融合,其所得到的第一特征向量能够更为准确地表示该召回数据。
根据一些实施例,将多个特征信息中的每一个特征信息的表征向量输入第二transformer模块可以包括:将多个特征信息中的每一个特征信息的表征向量按照预设顺序排列,以构成该召回数据的特征矩阵;以及将特征矩阵输入第二transformer模块。
可以理解,本公开并不限定多个特征信息的排列顺序,仅使各个召回数据的多个特征信息排列顺序相同即可,例如,可以将排列顺序预设为:“历史点击量、页面样式的类型、召回数据与待搜索数据之间的相似度、召回来源的类型”,如此,每个召回数据的多个特征信息的表征向量均应当按照该顺序排列,以使每个召回数据以相同的模式输入第二transformer模块之中。
在一种实施方式中,针对多个召回数据中的每一个召回数据,在该召回数据的多个特征信息的表征向量的基础上添加一个附加向量,该附加向量与多个特征信息的表征向量的维度相同,能够用于在第二transformer模块的输出端提取该召回数据的第一特征向量,即将该附加向量经过第二transformer模块处理所得到的输出向量作为该召回数据的第一特征向量。
特别地,附加向量可以设置在多个特征信息的表征向量之前或之后。
根据一些实施例,响应于多个特征信息中的任意一个特征信息不存在,可以在预设顺序中该特征信息的位次设置预设缺省向量。
由于多个召回数据可以来自于多个不同的召回来源,例如,来自不同的数据库或者通过不同的召回模型而召回,因此,可能存在不同召回数据中的 特征信息不统一的情况,即一个召回数据中的某个特征信息在另一个召回数据中不存在。为了避免上述情况造成输入第二transformer模块的召回数据模式不统一,采用预设缺省向量来占用缺失的特征信息的位次。
步骤S203基于步骤S202确定的多个召回数据中的每一个召回数据的推荐度,执行针对多个召回数据的排序。具体地,可以将多个召回数据按照推荐度的大小依次排列并反馈给客户端,以使用户能够通过客户端查看到针对待搜索数据的搜索结果。
图3示出了根据本公开示例性实施例的一种排序方法的示意图。如图3所示,召回数据1~N中的每一者均包括多个特征信息(由图3中的正方体示例性示出),通过执行步骤301、步骤302和步骤S303,可以确定召回数据1~N中每一者的推荐度,用以执行对召回数据1~N的排序。对召回数据1~N的排序方法的描述如下:
步骤301、针对召回数据1~N中的每一者,确定该召回数据的多个特征信息中的每一者的表征向量,将多个特征信息中的每一者的表征向量和一个附加向量共同构成的特征矩阵输入第二transformer模型中,其中,附加向量位于特征矩阵中的第一列;
步骤302、针对召回数据1~N中的每一者,通过第二transformer模型的编码器来获取该召回数据的第一特征向量,其中,该第一特征向量为附加向量经过第二transformer模型的编码器处理而得到的输出向量;以及
步骤303、将召回数据1~N中的每一者的第一特征向量输入第一transformer模型,通过第一transformer模型中的编码器对各个召回数据的第一特征向量进行融合,可以得到召回数据1~N中的每一者的的第二特征向量,其中,每个召回数据的第二特征向量均通过第一transformer模型的编码器而融合了其它召回数据的信息,最终,针对召回数据1~N中的每一者,基于该召回数据的第二特征向量,来确定该召回数据的推荐度。
在确定了召回数据1~N中的每一者的推荐度的基础上,可以基于每一者的推荐度的大小来对召回数据1~N进行排序。
图4示出了根据本公示例性实施例的一种排序模型训练方法的流程图,其中,排序模型包括第一transformer模块,方法400包括:步骤S401、确定与待搜索数据相关联的多个召回数据中的每一个召回数据的第一特征向 量;步骤S402、将多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到多个召回数据中的每一个召回数据的推荐度;以及步骤S403、响应于多个召回数据中存在至少一个具有标签的召回数据,基于至少一个召回数据中的每一个召回数据的推荐度和标签,调整排序模型的参数。
由此训练得到的排序模型,能够通过第一transformer模块挖掘多个召回数据之间的相关性,从而可以在排序过程中考虑多个召回数据的上下文信息,提升对多个召回数据的排序质量。
其中,第一transformer模块可以由编码器(encoder)和解码器(decoder)两部分构成。通过上述方法训练得到的排序模型中的第一transformer模块,可以基于自注意力机制(Self-Attention),使输入的多个第一特征向量充分融合,进而在多个召回数据所构成的集合的全局层面上准确地确定每个召回数据在多个召回数据中的推荐度。
针对步骤S401,其中,多个召回数据可以为利用预设的召回规则或者经过训练的召回模型,从数据库获取的与待搜索数据相关联的多个数据。
根据一些实施例,排序模型还包括第二transformer模块,多个召回数据中的每一个召回数据包括多个特征信息,并且其中,确定多个召回数据中的每一个召回数据的第一特征向量包括:确定该召回数据的多个特征信息中的每一个特征信息的表征向量;以及将多个特征信息中的每一个特征信息的表征向量输入第二transformer模块,以得到该召回数据的第一特征向量。
其中,第二transformer模块可以由编码器(encoder)构成。经过训练的第二transformer模块,能够基于编码器中的注意力机制,将多个特征信息中的每一个特征信息充分融合,所得到的第一特征向量能够更为准确地表示该召回数据。
根据一些实施例,在将多个特征信息中的每一个特征信息的表征向量输入第二transformer模块之前,执行针对第二transformer模块的预训练。
在一种实施方式中,针对第二transformer模块的预训练可以包括:获取具有标签的样本数据,其中,该样本数据包括多个特征信息;将样本数据的多个特征信息中的每一个特征信息的表征向量输入第二transformer模块,以得到该样本数据的第一特征向量;将第一特征向量输入分类模型,以得到该 样本数据的预测分类;以及基于该样本数据的预测分类和标签,调整第二transformer模块的参数。
由此,可以通过在第二transformer模块的输出端连接一个分类模型来对第二transformer模块进行预训练,以得到能够适应于下游任务的初级的第二transformer模块。在经过预训练的第二transformer模块的基础上,执行对排序模型的训练,能够加快模型的收敛速度,提升训练效果。
特别地,该分类模型可以为点击预测模型。
针对步骤S403,针对排序模型的参数调整仅根据具有标签的召回数据来执行。可以理解,针对多个召回数据,用户可能只查看了其中的部分召回数据,即用户仅给出了其中的部分召回数据的反馈信息。在这种情况下,只能够得到查看过的部分召回数据的标签。
例如,对于200个经过排序的召回数据,用户只查看了其中的前10个召回数据,即用户只对看过的前10个召回数据做了判断,如点击了其中的第3个召回数据而没有点击其它的召回数据。在这种情况下,由于用户没有对前10个召回数据以外的召回数据进行判断,这些数据不应被应用于对排序模型的参数调整之中。
根据一些实施例,至少一个召回数据中的每一个召回数据的标签可以为基于以下至少一种信息而确定:针对至少一个召回数据的点击信息;和至少一个召回数据中的每一个召回数据与待搜索数据之间的匹配信息。
在一种实施方式中,可以为被点击的召回数据赋予较大的数值作为标签,为未被点击的召回数据赋予较小的数值作为标签。例如,被点击的召回数据的标签为1,未被点击的召回数据的标签为0。
特别地,可以根据每个召回数据被点击的次数来进一步细化该标签,以使标签数值的大小与点击量正相关。
在一种实施方式中,可以基于至少一个召回数据中的每一个召回数据与待搜索数据之间的匹配信息,确定每个召回数据的标签,其中,标签的数值的大小与匹配程度正相关。
在一种实施方式中,还可以根据对召回数据的满意程度来确定召回数据的标签,其中,标签的数值的大小与满意程度正相关。
图5示出了根据本公示例性实施例的排序装置的结构框图,该装置500包括:第一确定单元501,被配置用于确定与待搜索数据相关联的多个召回数据;第二确定单元502,被配置用于针对多个召回数据中的每一个召回数据,基于该召回数据与多个召回数据中的每一个召回数据之间的相似度,确定该召回数据在多个召回数据中的推荐度;以及排序单元503,被配置用于基于多个召回数据中的每一个召回数据的推荐度,执行针对多个召回数据的排序。
根据一些实施例,多个召回数据中的每一个召回数据具有对应的第一特征向量,并且其中,第二确定单元包括:融合子单元,被配置用于基于该召回数据的第一特征向量与多个召回数据中的每一个召回数据的第一特征向量之间的相似度,融合多个召回数据中的每一个召回数据的第一特征向量,以得到该召回数据的第二特征向量;以及第一确定子单元,被配置用于基于该召回数据的第二特征向量,确定该召回数据在多个召回数据中的推荐度。
根据一些实施例,第二确定单元包括:用于将多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到该召回数据在多个召回数据中的推荐度的子单元。
根据一些实施例,多个召回数据中的每一个召回数据包括多个特征信息,装置还包括:第三确定单元,被配置用于在确定该召回数据在多个召回数据中的推荐度之前,针对多个召回数据中的每一个召回数据,通过将该召回数据的多个特征信息相融合,确定该召回数据的第一特征向量。
根据一些实施例,第三确定单元包括:第二确定子单元,被配置用于确定多个特征信息中的每一个特征信息的表征向量;以及第三确定子单元,被配置用于通过将多个特征信息中的每一个特征信息的表征向量相融合,确定该召回数据的第一特征向量。
根据一些实施例,第三确定单元包括:输入子单元,被配置用于将多个特征信息中的每一个特征信息的表征向量输入第二transformer模块,以得到该召回数据的第一特征向量。
根据一些实施例,输入子单元包括:用于将多个特征信息中的每一个特征信息的表征向量按照预设顺序排列,以构成该召回数据的特征矩阵的子单元;以及用于将特征矩阵输入第二transformer模块的子单元。
根据一些实施例,输入子单元包括:用于响应于多个特征信息中的任意一个特征信息不存在,在预设顺序中该特征信息的位次设置预设缺省向量的子单元。
根据一些实施例,每一个召回数据的多个特征信息中包括用于表示该召回数据与待搜索数据之间的相似度的特征信息。
根据一些实施例,多个特征信息包括数值特征信息、枚举特征信息和向量特征信息中的至少一种。
根据一些实施例,待搜索数据和多个召回数据两者中的任意一者包括以下至少一种数据类型:文本;图像;和视频。
图6示出了根据本公示例性实施例的排序模型的训练装置的结构框图,其中,排序模型包括第一transformer模块,装置600包括:第四确定单元601,被配置用于确定与待搜索数据相关联的多个召回数据中的每一个召回数据的第一特征向量;获取单元602,被配置用于将多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到多个召回数据中的每一个召回数据的推荐度;以及调整单元603,被配置用于响应于多个召回数据中存在至少一个具有标签的召回数据,基于至少一个召回数据中的每一个召回数据的推荐度和标签,调整排序模型的参数。
根据一些实施例,至少一个召回数据中的每一个召回数据的标签为基于以下至少一种信息而确定:针对至少一个召回数据的点击信息;和至少一个召回数据中的每一个召回数据与待搜索数据之间的匹配信息。
根据一些实施例,排序模型还包括第二transformer模块,多个召回数据中的每一个召回数据包括多个特征信息,并且其中,第四确定单元包括:用于确定该召回数据的多个特征信息中的每一个特征信息的表征向量的子单元;以及用于将多个特征信息中的每一个特征信息的表征向量输入第二transformer模块,以得到该召回数据的第一特征向量的子单元。
根据一些实施例,该装置还包括预训练单元,被配置用于在将多个特征信息中的每一个特征信息的表征向量输入第二transformer模块之前,执行针对第二transformer模块的预训练。
根据本公开的实施例,还提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中存储器存储有可被至少一个 处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述任意一种方法。
根据本公开的实施例,还提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行上述任意一种方法。
根据本公开的实施例,还提供了一种计算机程序产品,包括计算机程序,其中,计算机程序在被处理器执行时实现上述任意一种方法。
参考图7,现将描述可以作为本公开的服务器或客户端的电子设备700的结构框图,其是可以应用于本公开的各方面的硬件设备的示例。电子设备旨在表示各种形式的数字电子的计算机设备,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
如图7所示,电子设备700包括计算单元701,其可以根据存储在只读存储器(ROM)702中的计算机程序或者从存储单元708加载到随机访问存储器(RAM)703中的计算机程序,来执行各种适当的动作和处理。在RAM 703中,还可存储电子设备700操作所需的各种程序和数据。计算单元701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。
电子设备700中的多个部件连接至I/O接口705,包括:输入单元706、输出单元707、存储单元708以及通信单元709。输入单元706可以是能向电子设备700输入信息的任何类型的设备,输入单元706可以接收输入的数字或字符信息,以及产生与电子设备的用户设置和/或功能控制有关的键信号输入,并且可以包括但不限于鼠标、键盘、触摸屏、轨迹板、轨迹球、操作杆、麦克风和/或遥控器。输出单元707可以是能呈现信息的任何类型的设备,并且可以包括但不限于显示器、扬声器、视频/音频输出终端、振动器和/或打印机。存储单元708可以包括但不限于磁盘、光盘。通信单元709允许电子设备700通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据,并且可以包括但不限于调制解调器、网卡、红外通信设备、 无线通信收发机和/或芯片组,例如蓝牙TM设备、802.11设备、WiFi设备、WiMax设备、蜂窝通信设备和/或类似物。
计算单元701可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元701的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元701执行上文所描述的各个方法和处理,例如排序方法或排序模型的训练方法。例如,在一些实施例中,排序方法或排序模型的训练方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元708。在一些实施例中,计算机程序的部分或者全部可以经由ROM 702和/或通信单元709而被载入和/或安装到电子设备700上。当计算机程序加载到RAM 703并由计算单元701执行时,可以执行上文描述的排序方法或排序模型的训练方法的一个或多个步骤。备选地,在其他实施例中,计算单元701可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行排序方法或排序模型的训练方法。
本文中以上描述的***和技术的各种实施方式可以在数字电子电路***、集成电路***、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上***的***(SOC)、复杂可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程***上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储***、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储***、该至少一个输入装置、和该至少一个输出装置。
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行***、装置或设备使用或与指令执行***、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体***、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
为了提供与用户的交互,可以在计算机上实施此处描述的***和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的***和技术实施在包括后台部件的计算***(例如,作为数据服务器)、或者包括中间件部件的计算***(例如,应用服务器)、或者包括前端部件的计算***(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的***和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算***中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将***的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算机***可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式***的服务器,或者是结合了区块链的服务器。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行、也可以顺序地或以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
虽然已经参照附图描述了本公开的实施例或示例,但应理解,上述的方法、***和设备仅仅是示例性的实施例或示例,本发明的范围并不由这些实施例或示例限制,而是仅由授权后的权利要求书及其等同范围来限定。实施例或示例中的各种要素可以被省略或者可由其等同要素替代。此外,可以通过不同于本公开中描述的次序来执行各步骤。进一步地,可以以各种方式组合实施例或示例中的各种要素。重要的是随着技术的演进,在此描述的很多要素可以由本公开之后出现的等同要素进行替换。

Claims (33)

  1. 一种排序方法,包括:
    确定与待搜索数据相关联的多个召回数据;
    针对所述多个召回数据中的每一个召回数据,基于该召回数据与所述多个召回数据中的每一个召回数据之间的相似度,确定该召回数据在所述多个召回数据中的推荐度;以及
    基于所述多个召回数据中的每一个召回数据的推荐度,执行针对所述多个召回数据的排序。
  2. 根据权利要求1所述的方法,其中,所述多个召回数据中的每一个召回数据具有对应的第一特征向量,并且其中,所述确定该召回数据在所述多个召回数据中的推荐度包括:
    基于该召回数据的第一特征向量与所述多个召回数据中的每一个召回数据的第一特征向量之间的相似度,融合所述多个召回数据中的每一个召回数据的第一特征向量,以得到该召回数据的第二特征向量;以及
    基于该召回数据的第二特征向量,确定该召回数据在所述多个召回数据中的推荐度。
  3. 根据权利要求2所述的方法,其中,所述确定该召回数据在所述多个召回数据中的推荐度包括:
    将所述多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到该召回数据在所述多个召回数据中的推荐度。
  4. 根据权利要求2或3所述的方法,其中,所述多个召回数据中的每一个召回数据包括多个特征信息,所述方法还包括:
    在确定该召回数据在所述多个召回数据中的推荐度之前,针对所述多个召回数据中的每一个召回数据,通过将该召回数据的多个特征信息相融合,确定该召回数据的第一特征向量。
  5. 根据权利要求4所述的方法,其中,所述通过将该召回数据的多个特征信息相融合,确定该召回数据的第一特征向量包括:
    确定所述多个特征信息中的每一个特征信息的表征向量;以及
    通过将所述多个特征信息中的每一个特征信息的表征向量相融合,确定该召回数据的第一特征向量。
  6. 根据权利要求5所述的方法,其中,所述通过将所述多个特征信息中的每一个特征信息的表征向量相融合,确定该召回数据的第一特征向量包括:
    将所述多个特征信息中的每一个特征信息的表征向量输入第二transformer模块,以得到该召回数据的第一特征向量。
  7. 根据权利要求6所述的方法,其中,所述将所述多个特征信息中的每一个特征信息的表征向量输入第二transformer模块包括:
    将所述多个特征信息中的每一个特征信息的表征向量按照预设顺序排列,以构成该召回数据的特征矩阵;以及
    将所述特征矩阵输入所述第二transformer模块。
  8. 根据权利要求7所述的方法,还包括:
    响应于所述多个特征信息中的任意一个特征信息不存在,在所述预设顺序中该特征信息的位次设置预设缺省向量。
  9. 根据权利要求4至8中的任意一项所述的方法,其中,每一个召回数据的所述多个特征信息中包括用于表示该召回数据与所述待搜索数据之间的相似度的特征信息。
  10. 根据权利要求4至9中任意一项所述的方法,其中,所述多个特征信息包括数值特征信息、枚举特征信息和向量特征信息中的至少一种。
  11. 根据权利要求1至10中任意一项所述的方法,其中,所述待搜索数据和所述多个召回数据两者中的任意一者包括以下至少一种数据类型:
    文本;
    图像;和
    视频。
  12. 一种排序模型训练方法,其中,所述排序模型包括第一transformer模块,所述方法包括:
    确定与待搜索数据相关联的多个召回数据中的每一个召回数据的第一特征向量;
    将所述多个召回数据中的每一个召回数据的第一特征向量输入所述第一transformer模块,以得到所述多个召回数据中的每一个召回数据的推荐度;以及
    响应于所述多个召回数据中存在至少一个具有标签的召回数据,基于所述至少一个召回数据中的每一个召回数据的推荐度和标签,调整所述排序模型的参数。
  13. 根据权利要求12所述的方法,其中,所述至少一个召回数据中的每一个召回数据的标签为基于以下至少一种信息而确定:
    针对所述至少一个召回数据的点击信息;和
    所述至少一个召回数据中的每一个召回数据与所述待搜索数据之间的匹配信息。
  14. 根据权利要求12或13所述的方法,其中,所述排序模型还包括第二transformer模块,所述多个召回数据中的每一个召回数据包括多个特征信息,
    并且其中,所述确定所述多个召回数据中的每一个召回数据的第一特征向量包括:
    确定该召回数据的多个特征信息中的每一个特征信息的表征向量;以及
    将所述多个特征信息中的每一个特征信息的表征向量输入所述第二transformer模块,以得到该召回数据的第一特征向量。
  15. 根据权利要求14所述的方法,还包括:
    在将所述多个特征信息中的每一个特征信息的表征向量输入所述第二transformer模块之前,执行针对所述第二transformer模块的预训练。
  16. 一种排序装置,包括:
    第一确定单元,被配置用于确定与待搜索数据相关联的多个召回数据;
    第二确定单元,被配置用于针对所述多个召回数据中的每一个召回数据,基于该召回数据与所述多个召回数据中的每一个召回数据之间的相似度,确定该召回数据在所述多个召回数据中的推荐度;以及
    排序单元,被配置用于基于所述多个召回数据中的每一个召回数据的推荐度,执行针对所述多个召回数据的排序。
  17. 根据权利要求16所述的装置,其中,所述多个召回数据中的每一个召回数据具有对应的第一特征向量,并且其中,所述第二确定单元包括:
    融合子单元,被配置用于基于该召回数据的第一特征向量与所述多个召回数据中的每一个召回数据的第一特征向量之间的相似度,融合所述多个召回数据中的每一个召回数据的第一特征向量,以得到该召回数据的第二特征向量;以及
    第一确定子单元,被配置用于基于该召回数据的第二特征向量,确定该召回数据在所述多个召回数据中的推荐度。
  18. 根据权利要求17所述的装置,其中,所述第二确定单元包括:
    用于将所述多个召回数据中的每一个召回数据的第一特征向量输入第一transformer模块,以得到该召回数据在所述多个召回数据中的推荐度的子单元。
  19. 根据权利要求17或18所述的装置,其中,所述多个召回数据中的每一个召回数据包括多个特征信息,所述装置还包括:
    第三确定单元,被配置用于在确定该召回数据在所述多个召回数据中的推荐度之前,针对所述多个召回数据中的每一个召回数据,通过将该召回数据的多个特征信息相融合,确定该召回数据的第一特征向量。
  20. 根据权利要求19所述的装置,其中,所述第三确定单元包括:
    第二确定子单元,被配置用于确定所述多个特征信息中的每一个特征信息的表征向量;以及
    第三确定子单元,被配置用于通过将所述多个特征信息中的每一个特征信息的表征向量相融合,确定该召回数据的第一特征向量。
  21. 根据权利要求20所述的装置,其中,所述第三确定单元包括:
    输入子单元,被配置用于将所述多个特征信息中的每一个特征信息的表征向量输入第二transformer模块,以得到该召回数据的第一特征向量。
  22. 根据权利要求21所述的装置,其中,所述输入子单元包括:
    用于将所述多个特征信息中的每一个特征信息的表征向量按照预设顺序排列,以构成该召回数据的特征矩阵的子单元;以及
    用于将所述特征矩阵输入所述第二transformer模块的子单元。
  23. 根据权利要求22所述的装置,所述输入子单元包括:
    用于响应于所述多个特征信息中的任意一个特征信息不存在,在所述预设顺序中该特征信息的位次设置预设缺省向量的子单元。
  24. 根据权利要求19至23中的任意一项所述的装置,其中,每一个召回数据的所述多个特征信息中包括用于表示该召回数据与所述待搜索数据之间的相似度的特征信息。
  25. 根据权利要求19至24中任意一项所述的装置,其中,所述多个特征信息包括数值特征信息、枚举特征信息和向量特征信息中的至少一种。
  26. 根据权利要求16至25中任意一项所述的装置,其中,所述待搜索数据和所述多个召回数据两者中的任意一者包括以下至少一种数据类型:
    文本;
    图像;和
    视频。
  27. 一种排序模型的训练装置,其中,所述排序模型包括第一transformer模块,所述装置包括:
    第四确定单元,被配置用于确定与待搜索数据相关联的多个召回数据中的每一个召回数据的第一特征向量;
    获取单元,被配置用于将所述多个召回数据中的每一个召回数据的第一特征向量输入所述第一transformer模块,以得到所述多个召回数据中的每一个召回数据的推荐度;以及
    调整单元,被配置用于响应于所述多个召回数据中存在至少一个具有标签的召回数据,基于所述至少一个召回数据中的每一个召回数据的推荐度和标签,调整所述排序模型的参数。
  28. 根据权利要求27所述的装置,其中,所述至少一个召回数据中的每一个召回数据的标签为基于以下至少一种信息而确定:
    针对所述至少一个召回数据的点击信息;和
    所述至少一个召回数据中的每一个召回数据与所述待搜索数据之间的匹配信息。
  29. 根据权利要求27或28所述的装置,其中,所述排序模型还包括第二transformer模块,所述多个召回数据中的每一个召回数据包括多个特征信息,
    并且其中,所述第四确定单元包括:
    用于确定该召回数据的多个特征信息中的每一个特征信息的表征向量的子单元;以及
    用于将所述多个特征信息中的每一个特征信息的表征向量输入所述第二transformer模块,以得到该召回数据的第一特征向量的子单元。
  30. 根据权利要求29所述的装置,还包括:
    预训练单元,被配置用于在将所述多个特征信息中的每一个特征信息的表征向量输入所述第二transformer模块之前,执行针对所述第二transformer模块的预训练。
  31. 一种电子设备,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-15中任一项所述的方法。
  32. 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使计算机执行根据权利要求1-15中任一项所述的方法。
  33. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被处理器执行时实现权利要求1-15中任一项所述的方法。
PCT/CN2022/107627 2022-01-30 2022-07-25 排序方法、排序模型的训练方法、装置、电子设备及介质 WO2023142406A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022578848A JP2024509014A (ja) 2022-01-30 2022-07-25 ソーティング方法、ソーティングモデルのトレーニング方法、装置、電子機器及び記憶媒体
US18/016,754 US20240104154A1 (en) 2022-01-30 2022-07-25 Ranking of recall data
EP22826799.3A EP4242879A4 (en) 2022-01-30 2022-07-25 RANKING METHOD AND DEVICE, RANKING MODEL TRAINING METHOD AND DEVICE AND ELECTRONIC DEVICE AND MEDIUM
KR1020227045347A KR20230006601A (ko) 2022-01-30 2022-07-25 정렬 방법, 정렬 모델의 트레이닝 방법, 장치, 전자 기기 및 매체

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210113572.5 2022-01-30
CN202210113572.5A CN114443989B (zh) 2022-01-30 2022-01-30 排序方法、排序模型的训练方法、装置、电子设备及介质

Publications (1)

Publication Number Publication Date
WO2023142406A1 true WO2023142406A1 (zh) 2023-08-03

Family

ID=81371799

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/107627 WO2023142406A1 (zh) 2022-01-30 2022-07-25 排序方法、排序模型的训练方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN114443989B (zh)
WO (1) WO2023142406A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443989B (zh) * 2022-01-30 2023-02-03 北京百度网讯科技有限公司 排序方法、排序模型的训练方法、装置、电子设备及介质
CN115033782B (zh) * 2022-05-18 2023-03-28 百度在线网络技术(北京)有限公司 推荐对象的方法、机器学习模型的训练方法、装置和设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120233159A1 (en) * 2011-03-10 2012-09-13 International Business Machines Corporation Hierarchical ranking of facial attributes
CN111563158A (zh) * 2020-04-26 2020-08-21 腾讯科技(深圳)有限公司 文本排序方法、排序装置、服务器和计算机可读存储介质
CN111581545A (zh) * 2020-05-12 2020-08-25 腾讯科技(深圳)有限公司 一种召回文档的排序方法及相关设备
CN112329954A (zh) * 2020-11-04 2021-02-05 中国平安人寿保险股份有限公司 物品召回方法、装置、终端设备及存储介质
CN113987161A (zh) * 2021-10-27 2022-01-28 建信金融科技有限责任公司 一种文本排序方法及装置
CN114443989A (zh) * 2022-01-30 2022-05-06 北京百度网讯科技有限公司 排序方法、排序模型的训练方法、装置、电子设备及介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204415A1 (en) * 2008-02-08 2009-08-13 Electronic Data Systems Corporation System and method for product recall notification
JP2014092955A (ja) * 2012-11-05 2014-05-19 Panasonic Corp 類似コンテンツ検索処理装置、類似コンテンツ検索処理方法、およびプログラム
US10572559B2 (en) * 2017-03-20 2020-02-25 International Business Machines Corporation Recalling digital content utilizing contextual data
CN111597297A (zh) * 2019-02-21 2020-08-28 北京京东尚科信息技术有限公司 物品召回方法、***、电子设备及可读存储介质
CN110083688B (zh) * 2019-05-10 2022-03-25 北京百度网讯科技有限公司 搜索结果召回方法、装置、服务器及存储介质
CN112541110A (zh) * 2019-09-20 2021-03-23 北京搜狗科技发展有限公司 一种信息推荐方法、装置和电子设备
CN113515690A (zh) * 2021-01-04 2021-10-19 腾讯科技(深圳)有限公司 内容召回模型的训练方法、内容召回方法、装置及设备
CN113705315B (zh) * 2021-04-08 2024-05-14 腾讯科技(深圳)有限公司 视频处理方法、装置、设备及存储介质
CN113821646A (zh) * 2021-11-19 2021-12-21 达而观科技(北京)有限公司 基于语义检索的智能化专利相似度搜索方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120233159A1 (en) * 2011-03-10 2012-09-13 International Business Machines Corporation Hierarchical ranking of facial attributes
CN111563158A (zh) * 2020-04-26 2020-08-21 腾讯科技(深圳)有限公司 文本排序方法、排序装置、服务器和计算机可读存储介质
CN111581545A (zh) * 2020-05-12 2020-08-25 腾讯科技(深圳)有限公司 一种召回文档的排序方法及相关设备
CN112329954A (zh) * 2020-11-04 2021-02-05 中国平安人寿保险股份有限公司 物品召回方法、装置、终端设备及存储介质
CN113987161A (zh) * 2021-10-27 2022-01-28 建信金融科技有限责任公司 一种文本排序方法及装置
CN114443989A (zh) * 2022-01-30 2022-05-06 北京百度网讯科技有限公司 排序方法、排序模型的训练方法、装置、电子设备及介质

Also Published As

Publication number Publication date
CN114443989A (zh) 2022-05-06
CN114443989B (zh) 2023-02-03

Similar Documents

Publication Publication Date Title
US20230005284A1 (en) Method for training image-text matching model, computing device, and storage medium
JP2021082308A (ja) マルチモーダルコンテンツ処理方法、装置、機器及び記憶媒体
WO2023142406A1 (zh) 排序方法、排序模型的训练方法、装置、电子设备及介质
US20230052389A1 (en) Human-object interaction detection
US20240104154A1 (en) Ranking of recall data
WO2023019948A1 (zh) 多模态信息库的检索方法、管理方法、装置、设备和介质
WO2023245938A1 (zh) 对象推荐方法和装置
US20230047628A1 (en) Human-object interaction detection
CN116501960B (zh) 内容检索方法、装置、设备及介质
WO2023231350A1 (zh) 利用整数规划求解器实现的任务处理方法、设备和介质
CN115168545A (zh) 群组搜索方法、装置、电子设备及介质
WO2024027125A1 (zh) 对象推荐方法、装置、电子设备和存储介质
CN116541536B (zh) 知识增强的内容生成***、数据生成方法、设备和介质
WO2023050732A1 (zh) 对象推荐方法和装置
WO2023240833A1 (zh) 信息推荐方法及装置、电子设备和介质
CN114219046B (zh) 模型训练方法、匹配方法、装置、***、电子设备和介质
CN115578501A (zh) 图像处理方法、装置、电子设备和存储介质
CN114281990A (zh) 文档分类方法及装置、电子设备和介质
US20230044508A1 (en) Data labeling processing
CN115809364B (zh) 对象推荐方法和模型训练方法
CN114861071B (zh) 对象推荐方法和装置
CN115033782B (zh) 推荐对象的方法、机器学习模型的训练方法、装置和设备
US11790014B2 (en) System and method of determining content similarity by comparing semantic entity attributes
US20230162722A1 (en) Techniques for model training
CN113535958B (zh) 生产线索聚合方法、装置及***、电子设备和介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2022578848

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 20227045347

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2022826799

Country of ref document: EP

Effective date: 20221230

WWE Wipo information: entry into national phase

Ref document number: 18016754

Country of ref document: US