CN115293291B - Training method and device for sequencing model, sequencing method and device, electronic equipment and medium - Google Patents

Training method and device for sequencing model, sequencing method and device, electronic equipment and medium Download PDF

Info

Publication number
CN115293291B
CN115293291B CN202211058818.XA CN202211058818A CN115293291B CN 115293291 B CN115293291 B CN 115293291B CN 202211058818 A CN202211058818 A CN 202211058818A CN 115293291 B CN115293291 B CN 115293291B
Authority
CN
China
Prior art keywords
sample data
data set
tag
target
sample
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202211058818.XA
Other languages
Chinese (zh)
Other versions
CN115293291A (en
Inventor
徐靖宇
刘昊骋
徐世界
王天祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211058818.XA priority Critical patent/CN115293291B/en
Publication of CN115293291A publication Critical patent/CN115293291A/en
Application granted granted Critical
Publication of CN115293291B publication Critical patent/CN115293291B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a training method, a sequencing method, a device, electronic equipment and a medium for a sequencing model, relates to the technical field of artificial intelligence, and particularly relates to the technical field of machine learning and information recommendation. The specific implementation scheme is as follows: in response to detecting the data acquisition instruction, acquiring a sample data set and an original tag set from a data source by utilizing a data interface, wherein the sample data set is a sample data set of a target application scene, and the target application scene represents an application scene focusing on a relative ordering relation among all sample data; processing an original tag value set of the sample data set according to a tag processing strategy corresponding to the tag type to obtain a target tag value set of the sample data set; dividing the sample data set into at least one sample data set; training a sorting model according to the at least one sample data set and the target label value set of the at least one sample data set to obtain a target sorting model.

Description

Training method and device for sequencing model, sequencing method and device, electronic equipment and medium
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to the technical field of machine learning and information recommendation. In particular to a training method, a sequencing method, a device, electronic equipment and a medium of a sequencing model.
Background
With the continuous development of computer technology, artificial intelligence technology has also been developed. For example, sequencing may be performed using artificial intelligence techniques to achieve, for example, resource recommendation scenarios, service provider selection, anomaly detection, fault tracing, and potential safety hazard troubleshooting.
Disclosure of Invention
The disclosure provides a training method, a sequencing method, a device, electronic equipment and a medium for a sequencing model.
According to an aspect of the present disclosure, there is provided a training method of a ranking model, including: in response to detecting the data acquisition instruction, acquiring a sample data set and an original tag set from a data source by utilizing a data interface, wherein the sample data set is a sample data set of a target application scene, and the target application scene represents an application scene focusing on a relative ordering relation among all sample data; processing an original tag value set of the sample data set according to a tag processing strategy corresponding to the tag type to obtain a target tag value set of the sample data set; dividing the sample data set into at least one sample data set; and training the sorting model according to the at least one sample data set and the target label value set of the at least one sample data set to obtain a target sorting model.
According to another aspect of the present disclosure, there is provided a sorting method including: acquiring a data set to be sequenced; and inputting the data set to be ranked into a target ranking model to obtain a ranking result, wherein the target ranking model is trained by the method according to the disclosure.
According to another aspect of the present disclosure, there is provided a training apparatus of a ranking model, including: the first obtaining module is used for obtaining a sample data set and an original tag set from a data source by utilizing a data interface in response to detecting a data obtaining instruction, wherein the sample data set is a sample data set of a target application scene, and the target application scene represents an application scene focusing on the relative ordering relation of each sample data; the second obtaining module is used for processing an original tag value set of a sample data set according to a tag processing strategy corresponding to a tag type to obtain a target tag value set of the sample data set, wherein the sample data set is a sample data set of a target application scene, and the target application scene represents an application scene focusing on a relative ordering relation among all sample data; a dividing module for dividing the sample data set into at least one sample data group; and a third obtaining module, configured to train the ranking model according to the at least one sample data set and the target tag value set of the at least one sample data set, to obtain a target ranking model.
According to another aspect of the present disclosure, there is provided a sorting apparatus including: the acquisition module is used for acquiring the data set to be sequenced; and a fourth obtaining module, configured to input the to-be-sorted dataset into a target sorting model to obtain a sorting result, where the target sorting model is trained by using the apparatus according to the disclosure.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described in the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer as described above to perform a method as described in the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method as described in the present disclosure.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 schematically illustrates an exemplary system architecture of a training method, a ranking method, and an apparatus that may rank models according to embodiments of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a training method of a ranking model according to an embodiment of the disclosure;
FIG. 3A schematically illustrates an example schematic diagram of a training process of a ranking model according to an embodiment of the disclosure;
FIG. 3B schematically illustrates an example schematic diagram of a ranking model according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of a sorting method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a training apparatus of a ranking model according to an embodiment of the disclosure;
FIG. 6 schematically illustrates a block diagram of a sorting apparatus according to an embodiment of the disclosure; and
fig. 7 schematically illustrates a block diagram of an electronic device adapted to implement a training method and a ranking method of a ranking model according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
FIG. 1 schematically illustrates an exemplary system architecture of a training method, a ranking method, and an apparatus that may rank models according to embodiments of the present disclosure.
It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which the training method, the ranking method, and the apparatus of the ranking model may be applied may include a terminal device, but the terminal device may implement the training method, the ranking method, and the apparatus of the ranking model provided by the embodiments of the present disclosure without interacting with a server.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 101, 102, 103. For example, at least one of a knowledge reading class application, a web browser application, a search class application, an instant messaging tool, a mailbox client and social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing. For example, at least one of a smart phone, tablet, laptop portable computer, desktop computer, and the like may be included.
The server 105 may be various types of servers that provide various services. For example, the server 105 may be a cloud server, also called a cloud computing server or a cloud host, which is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical hosts and VPS services (Virtual Private Server, virtual private servers). The server 105 may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted that, the training method of the ranking model provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the training apparatus of the ranking model provided in the embodiments of the present disclosure may be generally disposed in the server 1 05. The training method of the ranking model provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 1, 103 and/or the server 105. Accordingly, the training apparatus of the ranking model provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
Alternatively, the training method of the ranking model provided by the embodiments of the present disclosure may also be generally performed by the terminal device 101, 102, or 103. Accordingly, the training apparatus of the ranking model provided in the embodiments of the present disclosure may also be provided in the terminal device 101, 102, or 103.
It should be noted that, the sorting method provided by the embodiments of the present disclosure may be generally performed by the terminal device 101, 102, or 103. Accordingly, the sorting apparatus provided in the embodiments of the present disclosure may also be provided in the terminal device 101, 102, or 103.
Alternatively, the ranking method provided by the embodiments of the present disclosure may also be generally performed by the server 105. Accordingly, the sorting apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The ranking method provided by the embodiments of the present disclosure may also be performed by a server or a cluster of servers other than the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the sorting apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the sequence numbers of the respective operations in the following methods are merely representative of the operations for the purpose of description, and should not be construed as representing the order of execution of the respective operations. The method need not be performed in the exact order shown unless explicitly stated.
FIG. 2 schematically illustrates a flow chart of a training method of a ranking model according to an embodiment of the disclosure.
As shown in fig. 2, the method 200 includes operations S210 to S240.
In response to detecting the data acquisition instruction, a sample data set and an original tag set are acquired from a data source using a data interface in operation S210.
In operation S220, the original tag value set of the sample data set is processed according to the tag processing policy corresponding to the tag type, to obtain the target tag value set of the sample data set.
In operation S230, the sample data set is divided into at least one sample data group.
In operation S240, a ranking model is trained from the at least one sample data set and the target tag value set of the at least one sample data set to obtain a target ranking model.
According to an embodiment of the present disclosure, the sample data set may be a sample data set of a target application scenario. The target application scenario may characterize an application scenario that focuses on the relative ordering of the various sample data with respect to each other.
According to embodiments of the present disclosure, a sample set may include a sample data set and an original tag value set corresponding to the sample data set. The sample set may comprise at least one sample. The sample data set may comprise at least one sample data. The set of original tag values may include at least one original tag value. The sample has sample data and an original tag value corresponding to the sample. The sample data may be used to characterize the sample. The sample data may include sample feature data. The sample feature data may include a sample feature vector.
According to an embodiment of the present disclosure, the sample data set may be a data set corresponding to the target application scenario. The target application scenario may refer to an application scenario in which the relative ordering relationship of the respective sample data in the sample data set is of interest, but the absolute ordering relationship of the respective sample data in the sample data set is not of interest. The absolute ordering relationship may refer to an ordering relationship determined from an absolute value corresponding to the sample data. The absolute value corresponding to the sample data may be a value obtained by processing the sample data based on a regression model. The relative ordering relationship may refer to an ordering relationship that is not dependent on an absolute value corresponding to the sample data. For example, the target application scenario may include at least one of: resource recommendation scenes, question and answer scenes, rewards issuing scenes, personnel recording scenes, service provider selection scenes, anomaly detection scenes, fault tracing scenes, potential safety hazard scenes and the like.
According to an embodiment of the present disclosure, a resource recommendation scenario may include at least one of the following according to an attribute type of a resource: video asset recommendation scenes, audio asset recommendation scenes, and text asset recommendation scenes. Depending on the application scenario type of the resource, the resource recommendation scenario may include at least one of: financial product recommendation scenes, route recommendation scenes, object recommendation scenes, music recommendation scenes, movie and television series recommendation scenes, game recommendation scenes, food recommendation scenes, scenic spot recommendation scenes, accommodation recommendation scenes, game recommendation scenes and the like.
According to an embodiment of the present disclosure, the question-answer scenario may include at least one of: text question-answering scenes, graphics-text question-answering scenes, and the like. The prize delivery scenario may include at least one of: coupon issuance scenarios, performance rewards issuance scenarios, etc. The coupon issuing scenario may include at least one of: a food coupon issuing scene, a clothing coupon issuing scene, a movie ticket coupon issuing scene, a scenic spot ticket coupon issuing scene, an application program member coupon issuing scene, and the like.
According to an embodiment of the present disclosure, a personal video scene may include at least one of: an enterprise recording scene, a public institution recording scene, a public servicer unit recording scene and the like. The service provider selection scenario may include at least one of: the supply chain provider selects a scenario. The supply chain provider selection scenario may include at least one of: a raw material supplier selection scenario, an intermediate processing supplier selection scenario, an assembly supplier selection scenario, a distribution supplier selection scenario, a sales supplier selection scenario, and the like. The anomaly detection scenario may include at least one of: abnormal industrial product detection scenes and intelligent power grid dispatching control system business abnormal detection scenes.
According to the embodiment of the disclosure, the type of the sample data set may be selected according to the target application scenario, which is not limited herein. For example, the type of sample data set may include at least one of: a sample image data set, a sample audio data set, and a sample text data set.
For example, for a video asset recommendation scenario, the type of sample data set may be a sample image data set. Further, the type of sample data set may also include at least one of a sample audio data set and a sample text data set. For an audio resource recommendation scenario, the type of sample data set may be a sample audio data set. For a text resource recommendation scenario, the type of sample data set may be a sample text data set.
For example, for a text question-and-answer scenario, the type of sample data set may be a sample text data set. For a teletext question-answer scenario, the types of sample data sets may include a sample text data set and a sample image data set.
For example, for an abnormal industrial product detection scenario, the type of sample data set may include at least one of a sample image data set and a sample text data set. For the business anomaly detection scene of the intelligent power grid dispatching control system, the type of the sample data set can be a sample text data set.
According to embodiments of the present disclosure, a tag type may refer to a type of an original set of tag values. The expected value of the original set of tag values may include one or more. For example, the tag type may include at least one of: continuous type labels and discrete type labels. For example, the continuous tag may include a consumption asset value. The discrete tag may include a credit rating. A tag processing policy may refer to a policy for processing an original set of tag values. There may be tag processing policies corresponding to tag types. For example, a continuous tag may have a tag processing policy corresponding to the continuous tag. The discrete type tags may have tag processing policies corresponding to the discrete type tags. The label processing policy corresponding to the continuous type label may include a label processing policy that discretizes the continuous type label. The tag processing policy corresponding to the discrete type tag may include a tag processing policy that digitizes the discrete type tag.
According to an embodiment of the present disclosure, the at least one sample data set may be obtained by dividing a sample data set. The sample data set may comprise at least one sample data. The sample data sets do not have identical sample data with respect to each other. Alternatively, there is at least one sample data in each sample data set divided into at least two sample data sets. Alternatively, there is at least one sample data among the respective sample data groups divided into at least two sample data groups and the respective sample data of each sample data group is different from each other.
According to an embodiment of the present disclosure, the ordering model may refer to a model for ordering at least one sample data comprised by the sample data set. The ranking model may include a machine learning based ranking model. The ranking model may include at least one of: a point-based ranking model, a pair-based ranking model, and a list-based ranking model. The model structure of the ranking model may be configured according to actual service requirements, which is not limited herein.
According to embodiments of the present disclosure, a data interface may be invoked in response to detecting a data acquisition instruction. The data acquisition instructions may be generated in response to detecting a data acquisition operation by the user. A sample data set and a set of original tag values corresponding to the sample data set are obtained from a data source using a data interface. The data source may include at least one of: local databases, cloud databases, and the internet. The tag type of the original set of tag values may be determined. And processing the original tag value set according to the tag processing strategy corresponding to the tag type to obtain a target tag value set. And processing the sample data set by using a sample data set partitioning strategy to obtain at least one sample data set.
According to an embodiment of the present disclosure, for a sample data set of at least one sample data set, sample data included in the sample text data set may be input into a ranking model, resulting in a ranking evaluation value of the sample data included in the sample data set. And training a sorting model by using the sorting evaluation value of the sample data included in each at least one sample data set and the target label value set of each at least one sample data set to obtain a target sorting model.
For example, in the case where the target application scenario is a financial product recommendation scenario, the sample data may include at least one of: object flow data of sample objects, object risk assessment data, financial product data, and the like. The object pipeline data may include at least one of: transaction time of transaction, transaction asset value, and transaction nature of the transaction of the object within a predetermined period of time. The financial product data may include at least one of: risk level of financial products, fund manager, asset size, buying period, and redemption period. The raw tag values corresponding to the sample data may include tag values that characterize the candidate sample financial product as recommended and tag values that characterize the candidate sample financial product as not recommended. According to the training method of the sorting model, the original label value set of the sample data set is processed according to the label processing strategy corresponding to the label type, so that the target label value set of the sample data set is obtained, the rationality of the label value is improved, and the training method can be used for improving the recommendation accuracy of financial products on the basis.
For example, in the case where the target application scenario is an object recommendation scenario, the sample data may include object social interaction data of the sample object. The object social interaction data may include at least one of: attention data, appreciation data, comment data, bullet screen data, praise data, collection data, sharing data, and forwarding data of the object. The original tag value corresponding to the sample data may include a tag value that characterizes a likelihood that the candidate sample object is recommended. According to the training method of the sorting model, the original label value set of the sample data set is processed according to the label processing strategy corresponding to the label type, so that the target label value set of the sample data set is obtained, the rationality of the label value is improved, and the training method can be used for improving the recommendation accuracy of the object on the basis.
For example, in the case where the target application scenario is a vendor selection scenario, the sample data may include at least one of: sample provider data and sample order data for sample providers. The sample provider data may include at least one of: sample supply efficiency data, sample change flexibility data, sample business strength data, and collaboration potential data. The sample order data may include at least one of: sample order required capacity data, sample order address location data, sample order lead-in data, sample order flexibility data, and sample order quota data. The original tag value corresponding to the sample data may include a tag value that characterizes the likelihood that the sample provider was selected. According to the training method of the sorting model, the original label value set of the sample data set is processed according to the label processing strategy corresponding to the label type, so that the target label value set of the sample data set is obtained, the rationality of the label value is improved, and the training method can be used for improving the selection accuracy of suppliers on the basis.
According to embodiments of the present disclosure, the training method of the ranking model of the embodiments of the present disclosure may be performed by an electronic device. For example, the electronic device may be a server or a terminal device. The electronic device may include at least one processor. The processor may be used to perform the training method of the ranking model provided by the embodiments of the present disclosure. For example, the training method of the ranking model provided by the embodiments of the present disclosure may be performed by a single processor, or may be performed in parallel by a plurality of processors.
According to the embodiment of the disclosure, the original tag value set of the sample data set is processed according to the tag processing strategy corresponding to the tag type to obtain the target tag value set of the sample data set, so that the rationality of the tag value is improved, and the sorting model is trained according to at least one sample data set and the target tag value set of the at least one sample data set obtained by dividing the sample data set to obtain the target sorting model, so that the sorting accuracy of the target sorting model for the whole sample data is improved, and the resource consumption is reduced. Because the sequencing accuracy of the target sequencing model for the whole sample data is improved, the model iteration times are reduced, the training speed of the model is improved, the data processing capacity of electronic equipment such as a processor is reduced, and the processing efficiency of the electronic equipment such as the processor is improved. In addition, the effect of improving the internal performance of the electronic equipment conforming to the natural law is further obtained, so that the core competitiveness of the electronic equipment is improved.
According to an embodiment of the present disclosure, operation S220 may include the following operations.
A tag type of an original set of tag values of the sample data set is determined.
And under the condition that the tag type is determined to be a continuous tag, processing the original tag value set of the sample data set by utilizing a discretization processing strategy to obtain a target tag value set of the sample data set. And under the condition that the tag type is determined to be a discrete tag, processing the original tag value set of the sample data set by using a mapping processing strategy to obtain a target tag value set of the sample data set.
According to embodiments of the present disclosure, the tag type may include at least one of: continuous type labels and discrete type labels. The continuous tag may characterize the expected value of the original set of tag values as a continuous value. For example, a discrete label may characterize the expected value of the original set of label values as a discrete number.
According to embodiments of the present disclosure, a discretization processing policy may refer to a processing policy for discretizing an original set of tag values for a continuous tag. The mapping processing policy may refer to a processing policy for mapping an original set of tag values for a discrete tag. Mapping may refer to mapping the original tag value to a predetermined numerical value. The predetermined value may be configured according to actual service requirements, and is not limited herein.
According to an embodiment of the present disclosure, processing an original tag value set of a sample data set with a discretization processing policy to obtain a target tag value set of the sample data set may include the following operations.
And processing the original tag value set of the sample data set by utilizing a box-division processing strategy to obtain a target tag value set of the sample data set.
According to embodiments of the present disclosure, the discretization policy may include a binning policy. The binning strategy may comprise at least one of: equidistant binning and equal frequency binning. The binning policy may be configured according to actual service requirements, and is not limited herein.
According to an embodiment of the present disclosure, processing an original tag value set of a sample data set using a binning policy to obtain a target tag value set of the sample data set may include the following operations.
A global boundary tag value corresponding to the original set of tag values for the sample data set is determined. And determining the interval boundary tag value corresponding to at least one interval according to the global boundary tag value and the expected interval number. And obtaining a target label value set of the sample data set according to the interval boundary label value and the original label value set corresponding to at least one interval.
According to embodiments of the present disclosure, the global boundary tag values may include a maximum global boundary tag value and a minimum global boundary tag value. The maximum global boundary tag value may refer to the maximum value of the respective expected values of the original tag value. The minimum global boundary tag value may refer to the smallest of the various expected values of the original tag value. The interval boundary tag values may include a maximum interval boundary tag value and a minimum interval boundary tag value. The number of expected intervals may be configured according to actual service requirements, and is not limited herein. For example, the expected number of differences may be 4.
According to embodiments of the present disclosure, a maximum global boundary tag value and a minimum global boundary tag value may be determined from expected values of an original set of tag values from a sample data set. And determining a range of interval values corresponding to at least one interval respectively according to the maximum global boundary tag value, the minimum global boundary tag value and the expected interval number. According to the range of interval values corresponding to each of the at least one interval. And determining the interval boundary label value corresponding to each of the at least one interval according to the interval numerical range corresponding to each of the at least one interval.
According to an embodiment of the present disclosure, for an original tag value in a set of original tag values, an interval boundary tag value corresponding to the original tag value is determined. And determining a first preset numerical value corresponding to the interval boundary label value according to the first mapping relation set. The original tag value is mapped to a first predetermined value corresponding to the interval boundary tag value. The first predetermined value may be configured according to actual service requirements, and is not limited herein. The first set of mappings may include at least one first mapping. The first mapping relationship may characterize a relationship between the interval boundary tag value and a first predetermined value.
For example, the expected values for the original set of tag values may include 10, 10.5, and 15. The interval boundary tag value Labels1 may be determined in the above manner to include 10 and 13. The interval boundary tag value Labels2 may include 13 and 16.
According to an embodiment of the present disclosure, processing an original tag value set of a sample data set using a mapping processing policy to obtain a target tag value set of the sample data set may include the following operations.
And mapping the original tag value set of the sample data set into a preset numerical value set by using a mapping processing strategy to obtain a target tag value set of the sample data set.
According to an embodiment of the present disclosure, the second set of predetermined values (i.e., the set of predetermined values) may include at least one second predetermined value (i.e., the predetermined value). The mapping processing policy may refer to a processing policy for mapping the original tag value of the discrete tag to a second predetermined value.
According to the embodiment of the disclosure, the original tag value set of the sample data set may be mapped into a second predetermined value set according to the second mapping relation set, so as to obtain the target tag value set of the sample data set. The second set of mappings may include a second mapping. The second mapping may characterize a relationship between the original tag value and a second predetermined value. For example, for an original tag value in the set of original tag values, a second predetermined value corresponding to the original tag value is determined according to the second set of mappings. The original tag value is mapped to a second predetermined value corresponding to the original tag value.
For example, the original tag characterizes a credit rating. The values of the original set of tag values may include differences, general and preferred. The mapping process strategy may be utilized to map "differences" to "0," general "to" 1 "and" preferred "to" 2".
According to an embodiment of the present disclosure, the at least one sample data set may comprise at least one of at least one first sample data set and at least one second sample data set.
According to an embodiment of the present disclosure, operation S230 may include one of:
the sample data set is partitioned into at least one first sample data set using a non-duplication partitioning strategy. The respective first sample data sets are different from each other. The sample data set is partitioned into at least one second sample data set using a repetition partitioning strategy. At least one sample data in the at least one second sample data set is divided into at least two second sample data sets.
According to embodiments of the present disclosure, a non-duplication partitioning policy may be used to implement a policy of partitioning a sample data set into respective first sample data groups different from each other. The re-partitioning strategy may be used to implement a strategy for partitioning a sample data set into at least two second sample data sets for which there is at least one sample data. Further, the respective sample data included in the second sample data group may be different from each other.
According to an embodiment of the present disclosure, the at least one sample data set may comprise at least one first sample data set. Alternatively, the at least one sample data set may comprise at least one second sample data set. Alternatively, the at least one sample data set may comprise at least one first sample data set and at least one second sample data set.
According to an embodiment of the present disclosure, where the at least one sample data set includes at least one first sample data set, training the ranking model from the at least one sample data set and the target tag value set of the at least one sample data set to obtain the target ranking model may include: training a sorting model according to the at least one first sample data set and the target label value set of the at least one first sample data set to obtain a target sorting model.
According to an embodiment of the present disclosure, in a case where the at least one sample data set includes at least one second sample data set, training the ranking model from the at least one sample data set and the target tag value set of the at least one sample data set to obtain the target ranking model may include: training a sorting model according to the at least one second sample data set and the target label value set of the at least one second sample data set to obtain a target sorting model.
According to an embodiment of the present disclosure, the at least one first sample data set may include M first sample data sets.
According to an embodiment of the present disclosure, dividing the sample data set into at least one first sample data group using the repetition-free division policy may include repeatedly performing the following operations M times, and the mth operation may include repeatedly performing the following operations until the number of sample data in the mth first sample data group is equal to the mth first predetermined number threshold:
In the case where it is determined that the number of sample data in the mth first sample data group is smaller than the mth first predetermined number threshold value, from (m-1) n-1 An nth sample data is determined from the set of sample data. The nth sample data is determined as sample data of the mth first sample data group. From (m-1) n-1 Deleting the nth sample data from the set of sample data to obtain the (m-1) n A set of sample data.
According to embodiments of the present disclosure, M may be an integer greater than or equal to 1. n may be an integer greater than or equal to 1 and less than or equal to P. P may be an integer greater than or equal to 1. P may characterize the number of sample data included in the sample data set.
In accordance with an embodiment of the present disclosure, M e {1, 2.,. M-1, M }. The M first sample data sets are different from each other. The mth first sample data group may include sample data corresponding to the mth first predetermined number of thresholds. The sum of the 1 st first predetermined number threshold, the 2 nd first predetermined number threshold, the.2 nd first predetermined number threshold, the M first predetermined number threshold, the.2 nd first predetermined number threshold, the (M-1) th first predetermined number threshold, and the M first predetermined number threshold is less than or equal to P.
According to an embodiment of the present disclosure, the mth first sample data group may be obtained as follows. It is determined whether the number of sample data in the mth first sample data group is less than the mth first predetermined number threshold. From (m-1) if it is determined that the number of sample data in the mth first sample data group is less than the mth first predetermined number threshold n-1 Determining the nth sample data from the sample data sets, and determining the nth sample data as the sample data of the mth first sample data set, and then from (m-1) n-1 And deleting the nth sample data from the sample data sets to obtain the (m-1) nth sample data set. The above operations are repeatedly performed until it is determined that the sample data in the mth first sample data group is equal to the mth first predetermined number threshold. The mth operation procedure may be repeatedly performed M times to obtain the 1 st to mth first sample data sets.
According to an embodiment of the present disclosure, the at least one second sample data set may comprise R second sample data sets.
According to an embodiment of the present disclosure, dividing the sample data set into at least one second sample data set using the repetition dividing policy may include repeatedly performing the following operations R times, and the R-th operation may include repeatedly performing the following operations until the number of sample data in the R-th second sample data set is equal to the R-th second predetermined number threshold:
in the case where it is determined that the number of sample data in the r-th second sample data group is smaller than the r-th second predetermined number threshold value, the s-th sample data is determined from the (s-1) -th sample data set. The (s-1) th sample data set is obtained by deleting (s-1) sample data from the sample data set. The s-th sample data is determined as sample data of the r-th second sample data set. Deleting the s-th sample data from the (s-1) -th sample data set to obtain the s-th sample data set.
According to embodiments of the present disclosure, R may be an integer greater than or equal to 1. s may be an integer greater than or equal to 1 and less than or equal to P. P may be an integer greater than or equal to 1. P may characterize the number of sample data included in the sample data set.
According to embodiments of the present disclosure, r∈ {1, 2.. Sub.i., R-1, R }. The r second sample data set may include sample data corresponding to the r second predetermined number of thresholds. The sum of the 1 st second predetermined number threshold, the 2 nd first predetermined number threshold, the R first predetermined number threshold, the (R-1) first predetermined number threshold, and the R first predetermined number threshold is less than or equal to P.
According to an embodiment of the present disclosure, the r second sample data set may be obtained as follows. It is determined whether the number of sample data in the r second sample data set is less than the r second predetermined number threshold. If the number of the sample data in the r second sample data group is determined to be smaller than the r second preset number threshold value, the s-th sample data is determined from the (s-1) th sample data set obtained by deleting the (s-1) th sample data in the sample data set, the s-th sample data is determined to be the sample data of the r second sample data group, and the s-th sample data is deleted from the (s-1) th sample data set, so that the s-th sample data set is obtained. The above operations are repeatedly performed until it is determined that the sample data in the r second sample data group is equal to the r second predetermined number threshold. The R-th operation procedure may be repeatedly performed R times to obtain the 1 st to R-th second sample data sets.
According to an embodiment of the present disclosure, operation S240 may include repeating the following operations until a predetermined end condition is satisfied, resulting in a target ranking model including G tree models:
training the g-th tree model by using the output result of the previous (g-1) tree models, the at least one sample data set and the target label value set of the at least one sample data set to obtain the output result of the g-th tree model.
According to embodiments of the present disclosure, the output result may characterize an ordered output value of the sample data comprised by the sample data set. G may be an integer greater than or equal to 1 and less than or equal to G. G may be an integer greater than or equal to 1. G e {1, 2.,. G-1, G }.
According to an embodiment of the present disclosure, the tree model may include one of: regression trees and classification trees. The regression tree may comprise a decision tree based regression tree. The regression tree may include a MART (Multiple Additive Regression Tree, multiple incremental regression tree) (i.e., GBDT (Gradient Boosting Decision Tree, gradient boost decision tree)). The classification tree may comprise a decision tree based classification tree. The predetermined end condition may include at least one of: the training operation of the predetermined number of tree models and the convergence of the objective loss function values are completed. The objective loss function value may be determined from the sorted output value of the sample data and the sorted label value. The form of the objective loss function may be configured according to the actual service requirement, and is not limited herein. For example, the objective loss function may include a cross entropy loss function.
According to an embodiment of the present disclosure, the ranking model may include G cascaded tree models. The g-th tree model may be used to fit the residual values of the previous (g-1) tree models. The residual value may be the partial derivative of all previous ranked output results according to the target loss function.
According to an embodiment of the present disclosure, the sample data set may comprise at least two sample data.
According to an embodiment of the present disclosure, training a g-th tree model using the output result of the previous (g-1) tree model, the at least one sample data set, and the target tag value set of the at least one sample data set, to obtain the output result of the g-th tree model may include the following operations.
For a sample data set of the at least one sample data set, determining a gradient value and a weight value corresponding to each of the at least two sample data from the at least two sample data based on the ranking evaluation index function. And training the g-th tree model by using the output result of the previous (g-1) tree models and target tag values, gradient values and weight values corresponding to at least two sample data in at least one sample data group.
According to an embodiment of the present disclosure, the ranking assessment index may include at least one of: normalized discount cumulative revenue average (Normalized Discount Cumulative Gain, NDCG), average reciprocal rank (Mean Reciprocal Rank, MRR), and accuracy (Mean Average Precision, MAP).
According to embodiments of the present disclosure, a partial order probability function may be determined based on the order assessment indicator function. And determining a gradient function according to the partial sequence probability function. For each sample data in each sample data set, processing the sample data and any other sample data in the sample data set by using a gradient function to obtain a gradient value of the sample data. And deriving the gradient of the sample data based on the partial order probability function to obtain a weight value corresponding to the sample data. The sequence probability function and the gradient function may be functions for the sample data and any other sample data in the sample data set.
According to embodiments of the present disclosure, a LambdaMART model may be trained using at least one sample data set and at least one target tag value set.
The training method of the ranking model according to the embodiments of the present disclosure is further described below with reference to fig. 3A to 3B, in conjunction with specific embodiments.
FIG. 3A schematically illustrates an example schematic diagram of a training process of a ranking model according to an embodiment of the disclosure.
As shown in fig. 3A, in 300A, a tag type 302 of an original set of tag values 301 corresponding to a sample data set 305 may be determined. The original set of tag values 301 is processed according to a tag processing policy 303 corresponding to the tag type 302, resulting in a target set of tag values 304. The sample data set 305 may be partitioned into at least one sample data set 306 using one of a non-repeating partitioning strategy and a repeating partitioning strategy. The ranking model 307 is trained using the at least one sample data set 306 and the set of target sample tag values 304 corresponding to each of the at least one sample data set 306 to obtain a target ranking model 308.
FIG. 3B schematically illustrates an example schematic diagram of a ranking model according to an embodiment of the disclosure.
As shown in fig. 3B, in 300B, the ranking model 309 may include G tree models, e.g., tree model 309_1, tree model 309_2, and the. The g-th tree model (i.e., tree model 309_g) is trained using the output results of the previous (g-1) tree models, the at least one sample data set 310, and the target tag value set of the at least one sample data set 310, resulting in the output results of tree model 309_g.
Fig. 4 schematically illustrates a flow chart of a sorting method according to an embodiment of the present disclosure.
As shown in fig. 4, the method 400 includes operations S410 to S420.
In operation S410, a data set to be sorted is acquired.
In operation S420, the data set to be sorted is input into the target sorting model, and a sorting result is obtained.
According to embodiments of the present disclosure, the target ranking model may be trained using a training method of the ranking model according to embodiments of the present disclosure.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
The above is only an exemplary embodiment, but not limited thereto, and other training methods and sorting methods of sorting models known in the art may be included as long as the rationality of the tag value can be improved, the sorting accuracy of the target sorting model for the whole amount of sample data can be improved, and the resource consumption can be reduced.
Fig. 5 schematically illustrates a block diagram of a training apparatus of a ranking model according to an embodiment of the disclosure.
As shown in fig. 5, the training apparatus 500 of the ranking model may include a first obtaining module 510, a second obtaining module 520, a dividing module 530, and a third obtaining module 540.
A first obtaining module 510 is configured to obtain a sample data set and an original tag set from a data source using a data interface. The sample data set is a sample data set of the target application scenario. The target application scene characterizes the application scene focusing on the relative ordering relation of the sample data.
The second obtaining module 520 is configured to process the original tag value set of the sample data set according to the tag processing policy corresponding to the tag type, so as to obtain a target tag value set of the sample data set.
A dividing module 530 for dividing the sample data set into at least one sample data set.
A third obtaining module 540 is configured to train the ranking model according to the at least one sample data set and the target tag value set of the at least one sample data set, so as to obtain a target ranking model.
According to an embodiment of the present disclosure, the tag type includes at least one of: continuous type labels and discrete type labels. The continuous tag characterizes the expected value of the original set of tag values as a continuous value. The discrete label characterizes the expected value of the original label value set as a discrete value.
According to an embodiment of the present disclosure, the second obtaining module 520 may include a determining sub-module, a first obtaining sub-module, and a second obtaining sub-module.
A determination submodule for determining a tag type of an original tag value set of the sample data set.
The first obtaining sub-module is used for processing the original tag value set of the sample data set by utilizing the discretization processing strategy to obtain the target tag value set of the sample data set under the condition that the tag type is determined to be a continuous tag.
And the second obtaining submodule is used for processing the original tag value set of the sample data set by using the mapping processing strategy to obtain the target tag value set of the sample data set under the condition that the tag type is determined to be a discrete tag.
According to an embodiment of the present disclosure, the first obtaining sub-module may include a first obtaining unit.
The first obtaining unit is used for processing the original tag value set of the sample data set by utilizing the binning strategy to obtain a target tag value set of the sample data set.
According to an embodiment of the present disclosure, the first obtaining unit may include a first determining subunit, a second determining subunit, and a first obtaining subunit.
A first determination subunit configured to determine a global boundary tag value corresponding to the original tag value set of the sample data set.
And the second determining subunit is used for determining the interval boundary label value corresponding to at least one interval according to the global boundary label value and the expected interval number.
The first obtaining subunit is configured to obtain a target tag value set of the sample data set according to the interval boundary tag value and the original tag value set corresponding to the at least one interval.
According to an embodiment of the present disclosure, the second obtaining sub-module may include a second obtaining unit.
The second obtaining unit is used for mapping the original tag value set of the sample data set into a preset numerical value set by using a mapping processing strategy to obtain a target tag value set of the sample data set.
According to an embodiment of the present disclosure, the at least one sample data set comprises at least one of at least one first sample data set and at least one second sample data set.
According to an embodiment of the present disclosure, the dividing module 530 may include one of a first dividing sub-module and a second dividing sub-module.
A first partitioning sub-module for partitioning the sample data set into at least one first sample data set using a repetition-free partitioning strategy. The respective first sample data sets are different from each other.
And the second dividing sub-module is used for dividing the sample data set into at least one second sample data set by utilizing a repeated dividing strategy. At least one sample data in the at least one second sample data set is divided into at least two second sample data sets.
According to an embodiment of the present disclosure, the at least one first sample data set comprises M first sample data sets. M is an integer greater than or equal to 1.
According to an embodiment of the disclosure, the dividing the sample data set into at least one first sample data group using the repetition-free division policy includes repeatedly performing the following operations M times, the mth operation including repeatedly performing the following operations until the number of sample data in the mth first sample data group is equal to the mth first predetermined number threshold:
In the case where it is determined that the number of sample data in the mth first sample data group is smaller than the mth first predetermined number threshold value, from (m-1) n-1 The nth sample data is determined in the set of sample data, where n is an integer greater than or equal to 1 and less than or equal to P, P is an integer greater than or equal to 1, and P characterizes the number of sample data included in the set of sample data. The nth sample data is determined as sample data of the mth first sample data group. From (m-1) n-1 Deleting the nth sample data from the set of sample data to obtain the (m-1) n A set of sample data.
According to an embodiment of the present disclosure, the at least one second sample data set comprises R second sample data sets. R is an integer greater than or equal to 1.
According to an embodiment of the disclosure, the dividing the sample data set into at least one second sample data set using the repetition dividing policy includes repeatedly performing the following operations R times, the R-th operation including repeatedly performing the following operations until the number of sample data in the R-th second sample data set is equal to the R-th second predetermined number threshold:
in the case where it is determined that the number of sample data in the r-th second sample data group is smaller than the r-th second predetermined number threshold value, the s-th sample data is determined from the (s-1) -th sample data set. The (s-1) th sample data set is obtained by deleting (s-1) sample data from the sample data set. s is an integer greater than or equal to 1 and less than or equal to P. P is an integer greater than or equal to 1. P characterizes the number of sample data comprised by the sample data set. The s-th sample data is determined as sample data of the r-th second sample data set. Deleting the s-th sample data from the (s-1) -th sample data set to obtain the s-th sample data set.
According to an embodiment of the present disclosure, training a ranking model from at least one sample data set and a set of target tag values of the at least one sample data set to obtain a target ranking model includes repeating the following operations until a predetermined end condition is met to obtain a target ranking model including G tree models:
training the g-th tree model by using the output result of the previous (g-1) tree models, the at least one sample data set and the target label value set of the at least one sample data set to obtain the output result of the g-th tree model. The output results characterize the ordered output values of the sample data comprised by the sample data set. G is an integer greater than or equal to 1 and less than or equal to G. G is an integer greater than or equal to 1.
According to an embodiment of the present disclosure, the sample data set comprises at least two sample data.
According to an embodiment of the present disclosure, training a g-th tree model using the output result of the previous (g-1) tree model, the at least one sample data set, and the target tag value set of the at least one sample data set, to obtain the output result of the g-th tree model may include the following operations.
For a sample data set of the at least one sample data set, determining a gradient value and a weight value corresponding to each of the at least two sample data from the at least two sample data based on the ranking evaluation index function. And training the g-th tree model by using the output result of the previous (g-1) tree models and target tag values, gradient values and weight values corresponding to at least two sample data in at least one sample data group.
According to an embodiment of the present disclosure, the application scenario may include one of: resource recommendation scenes, question and answer scenes, rewards issuing scenes, personnel recording scenes, service provider selection scenes, anomaly detection scenes, fault tracing scenes and potential safety hazard scenes.
Fig. 6 schematically illustrates a block diagram of a sorting apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the sorting apparatus 600 may include an acquisition module 610 and a fourth acquisition module 620.
An acquisition module 610 is configured to acquire a data set to be sorted.
A fourth obtaining module 620, configured to input the data set to be ranked into the target ranking model, and obtain a ranking result.
According to an embodiment of the present disclosure, the target ranking model is trained by a training device of the ranking model according to an embodiment of the present disclosure.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described above.
According to an embodiment of the present disclosure, a computer program product comprising a computer program which, when executed by a processor, implements a method as described above.
Fig. 7 schematically illustrates a block diagram of an electronic device adapted to implement a training method and a ranking method of a ranking model according to an embodiment of the disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701 that can perform various appropriate actions and processes 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. In the RAM 703, various programs and data required for the operation of the electronic device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. 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.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the respective methods and processes described above, such as a training method and a ranking method of the ranking model. For example, in some embodiments, the training method and the ordering method of the ordering model may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the training method and the ranking method of the ranking model described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the training method and the ranking method of the ranking model in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be 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.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, 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.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (20)

1. A training method of a ranking model, comprising:
in response to detecting the data acquisition instruction, acquiring a sample data set and an original tag set from a data source by utilizing a data interface, wherein the sample data set is a sample data set of a target application scene, the target application scene represents an application scene focusing on a relative ordering relation between each sample data, and in the case that the target application scene is an object recommendation scene, the sample data comprises object social interaction data of a sample object, and the object social interaction data comprises at least one of the following: the sample object comprises attention data, appreciation data, comment data, barrage data, praise data, collection data, sharing data and forwarding data, wherein an original tag value corresponding to the sample data comprises a tag value representing the possibility that a candidate sample object is recommended;
Processing an original tag value set of the sample data set according to a tag processing strategy corresponding to the tag type to obtain a target tag value set of the sample data set;
dividing the sample data set into at least one sample data set; and
training the sorting model according to the at least one sample data set and the target label value set of the at least one sample data set to obtain a target sorting model;
wherein the tag type includes at least one of: the continuous tag and the discrete tag, wherein the continuous tag represents that the expected value of the original tag value set is a continuous value, and the discrete tag represents that the expected value of the original tag value set is a discrete value;
the processing the original tag value set of the sample data set according to the tag processing policy corresponding to the tag type to obtain a target tag value set of the sample data set includes:
determining a tag type of an original tag value set of the sample data set;
under the condition that the tag type is determined to be the continuous tag, processing an original tag value set of the sample data set by utilizing a discretization processing strategy to obtain a target tag value set of the sample data set; and
Under the condition that the tag type is determined to be the discrete tag, processing an original tag value set of the sample data set by using a mapping processing strategy to obtain a target tag value set of the sample data set;
wherein the at least one sample data set comprises at least one of at least one first sample data set and at least one second sample data set;
wherein said dividing said sample data set into at least one sample data set comprises one of:
dividing the sample data set into the at least one first sample data set using a repetition-free division strategy, wherein each of the first sample data sets is different from each other; and
the sample data set is partitioned into the at least one second sample data set using a repetition partitioning strategy, wherein at least one sample data present in the at least one second sample data set is partitioned into at least two of the second sample data sets.
2. The method of claim 1, wherein the processing the original set of tag values of the sample data set with a discretization processing policy results in a target set of tag values for the sample data set, comprising:
And processing the original tag value set of the sample data set by utilizing a binning strategy to obtain a target tag value set of the sample data set.
3. The method of claim 2, wherein the processing the original set of tag values for the sample data set using a binning strategy to obtain a target set of tag values for the sample data set comprises:
determining a global boundary tag value corresponding to an original tag value set of the sample data set;
determining an interval boundary tag value corresponding to at least one interval according to the global boundary tag value and the expected interval number; and
and obtaining a target label value set of the sample data set according to the interval boundary label value corresponding to the at least one interval and the original label value set.
4. A method according to any one of claims 1 to 3, wherein said processing the original set of tag values of the sample data set using a mapping processing strategy to obtain a target set of tag values for the sample data set comprises:
and mapping the original tag value set of the sample data set into a preset numerical value set by using the mapping processing strategy to obtain a target tag value set of the sample data set.
5. The method of claim 1, wherein the at least one first sample data set comprises M first sample data sets, M being an integer greater than or equal to 1;
wherein the dividing the sample data set into the at least one first sample data group using a non-repetition division policy includes repeatedly performing the following operations M times, the mth operation including repeatedly performing the following operations until the number of sample data in the mth first sample data group is equal to the mth first predetermined number threshold:
in the case where it is determined that the number of sample data in the mth first sample data group is smaller than the mth first predetermined number threshold value, from (m-1) n-1 Determining nth sample data in a set of sample data, wherein n is an integer greater than or equal to 1 and less than or equal to P, P is an integer greater than or equal to 1, P characterizing the number of sample data comprised by the set of sample data;
determining the nth sample data as sample data of the mth first sample data group; and
from the (m-1) n-1 Deleting the nth sample data from the set of sample data to obtain the (m-1) th sample data n A set of sample data.
6. The method of claim 1 or 5, wherein the at least one second sample data set comprises R second sample data sets, R being an integer greater than or equal to 1;
Wherein said dividing said set of sample data into said at least one second set of sample data using a repetition division strategy comprises repeating R times the following operations, the R times comprising repeating the following operations until the number of sample data in the R second set of sample data equals the R second predetermined number threshold:
determining, in the event that the number of sample data in the (s-1) th second sample data set is determined to be less than the (s-1) th second predetermined number threshold, the (s-1) th sample data set being obtained by deleting (s-1) th sample data from the sample data set, s being an integer greater than or equal to 1 and less than or equal to P, P being an integer greater than or equal to 1, P being an integer representing the number of sample data included in the sample data set;
determining the s-th sample data as sample data of the r-th second sample data set; and
deleting the s-th sample data from the (s-1) -th sample data set to obtain the s-th sample data set.
7. A method according to any one of claims 1-3, wherein said training said ranking model from said at least one sample data set and a set of target tag values for said at least one sample data set resulting in a target ranking model comprises repeating the following operations until a predetermined end condition is met resulting in a target ranking model comprising G tree models:
Training a G tree model by using the output result of the previous (G-1) tree models, the at least one sample data group and the target label value set of the at least one sample data group to obtain the output result of the G tree model, wherein G is an integer greater than or equal to 1 and less than or equal to G, and G is an integer greater than or equal to 1, and the output result represents the ordered output value of the sample data included in the sample data set.
8. The method of claim 7, wherein the sample data set comprises at least two sample data;
wherein training the g-th tree model with the output result of the previous (g-1) tree models, the at least one sample data set, and the target tag value set of the at least one sample data set to obtain the output result of the g-th tree model, comprises:
for a sample data set of the at least one sample data set,
determining gradient values and weight values corresponding to the at least two sample data respectively according to the at least two sample data based on the sorting evaluation index function; and
training the g-th tree model by using the output result of the first (g-1) tree model and target tag values, gradient values and weight values corresponding to the at least two sample data respectively in the at least one sample data group.
9. A method of ordering, comprising:
acquiring a data set to be sequenced; and
inputting the data set to be sequenced into a target sequencing model to obtain a sequencing result,
wherein the object ordering model is trained using the method according to any one of claims 1-8.
10. A training apparatus for a ranking model, comprising:
a first obtaining module, configured to obtain, in response to detecting a data obtaining instruction, a sample data set and an original tag value set from a data source by using a data interface, where the sample data set is a sample data set of a target application scenario, the target application scenario is characterized by an application scenario focusing on a relative ordering relationship between respective sample data, and in a case where the target application scenario is an object recommendation scenario, the sample data includes object social interaction data of a sample object, and the object social interaction data includes at least one of: the sample object comprises attention data, appreciation data, comment data, barrage data, praise data, collection data, sharing data and forwarding data, wherein an original tag value corresponding to the sample data comprises a tag value representing the possibility that a candidate sample object is recommended;
The second obtaining module is used for processing the original tag value set of the sample data set according to a tag processing strategy corresponding to the tag type to obtain a target tag value set of the sample data set;
a dividing module for dividing the sample data set into at least one sample data set; and
a third obtaining module, configured to train the ranking model according to the at least one sample data set and the target tag value set of the at least one sample data set, to obtain a target ranking model;
wherein the tag type includes at least one of: the continuous tag and the discrete tag, wherein the continuous tag represents that the expected value of the original tag value set is a continuous value, and the discrete tag represents that the expected value of the original tag value set is a discrete value;
wherein the second obtaining module includes:
a determining submodule, configured to determine a tag type of an original tag value set of the sample data set;
the first obtaining submodule is used for processing the original tag value set of the sample data set by utilizing a discretization processing strategy under the condition that the tag type is determined to be the continuous tag, so as to obtain a target tag value set of the sample data set; and
The second obtaining submodule is used for processing the original tag value set of the sample data set by using a mapping processing strategy under the condition that the tag type is determined to be the discrete tag, so as to obtain a target tag value set of the sample data set;
wherein the at least one sample data set comprises at least one of at least one first sample data set and at least one second sample data set;
wherein the dividing module comprises one of the following:
a first partitioning sub-module for partitioning the sample data set into the at least one first sample data set using a repetition-free partitioning strategy, wherein each of the first sample data sets is different from each other; and
and a second dividing sub-module for dividing the sample data set into the at least one second sample data set using a repetition division strategy, wherein at least one sample data in the at least one second sample data set is divided into at least two second sample data sets.
11. The apparatus of claim 10, wherein the first obtaining sub-module comprises:
the first obtaining unit is used for processing the original tag value set of the sample data set by utilizing a binning strategy to obtain a target tag value set of the sample data set.
12. The apparatus of claim 11, wherein the first obtaining unit comprises:
a first determining subunit, configured to determine a global boundary tag value corresponding to an original tag value set of the sample data set;
a second determining subunit, configured to determine an interval boundary tag value corresponding to at least one interval according to the global boundary tag value and the number of expected intervals; and
the first obtaining subunit is configured to obtain a target tag value set of the sample data set according to the interval boundary tag value corresponding to the at least one interval and the original tag value set.
13. The apparatus of any of claims 10-12, wherein the second acquisition sub-module comprises:
the second obtaining unit is used for mapping the original tag value set of the sample data set into a preset numerical value set by utilizing the mapping processing strategy to obtain a target tag value set of the sample data set.
14. The apparatus of claim 10, wherein the at least one first sample data set comprises M first sample data sets, M being an integer greater than or equal to 1;
wherein the dividing the sample data set into the at least one first sample data group using a non-repetition division policy includes repeatedly performing the following operations M times, the mth operation including repeatedly performing the following operations until the number of sample data in the mth first sample data group is equal to the mth first predetermined number threshold:
In the case where it is determined that the number of sample data in the mth first sample data group is smaller than the mth first predetermined number threshold value, from (m-1) n-1 Determination of the nth sample data in the sample data setWherein n is an integer greater than or equal to 1 and less than or equal to P, P is an integer greater than or equal to 1, P characterizing the number of sample data included in the sample data set;
determining the nth sample data as sample data of the mth first sample data group; and
from the (m-1) n-1 Deleting the nth sample data from the set of sample data to obtain the (m-1) th sample data n A set of sample data.
15. The apparatus of claim 10 or 14, wherein the at least one second sample data set comprises R second sample data sets, R being an integer greater than or equal to 1;
wherein said dividing said set of sample data into said at least one second set of sample data using a repetition division strategy comprises repeating R times the following operations, the R times comprising repeating the following operations until the number of sample data in the R second set of sample data equals the R second predetermined number threshold:
determining, in the event that the number of sample data in the (s-1) th second sample data set is determined to be less than the (s-1) th second predetermined number threshold, the (s-1) th sample data set being obtained by deleting (s-1) th sample data from the sample data set, s being an integer greater than or equal to 1 and less than or equal to P, P being an integer greater than or equal to 1, P being an integer representing the number of sample data included in the sample data set;
Determining the s-th sample data as sample data of the r-th second sample data set; and
deleting the s-th sample data from the (s-1) -th sample data set to obtain the s-th sample data set.
16. The apparatus according to any one of claims 10-12, wherein the training the ranking model from the at least one sample data set and the target tag value set of the at least one sample data set to obtain a target ranking model comprises repeating the following operations until a predetermined end condition is met to obtain a target ranking model comprising G tree models:
training a G tree model by using the output result of the previous (G-1) tree models, the at least one sample data group and the target label value set of the at least one sample data group to obtain the output result of the G tree model, wherein G is an integer greater than or equal to 1 and less than or equal to G, and G is an integer greater than or equal to 1, and the output result represents the ordered output value of the sample data included in the sample data set.
17. The apparatus of claim 16, wherein the sample data set comprises at least two sample data;
Wherein training the g-th tree model with the output result of the previous (g-1) tree models, the at least one sample data set, and the target tag value set of the at least one sample data set to obtain the output result of the g-th tree model, comprises:
for a sample data set of the at least one sample data set,
determining gradient values and weight values corresponding to the at least two sample data respectively according to the at least two sample data based on the sorting evaluation index function; and
training the g-th tree model by using the output result of the first (g-1) tree model and target tag values, gradient values and weight values corresponding to the at least two sample data respectively in the at least one sample data group.
18. A sequencing device, comprising:
the acquisition module is used for acquiring the data set to be sequenced; and
a fourth obtaining module, configured to input the data set to be sorted into a target sorting model to obtain a sorting result,
wherein the object ordering model is trained using the apparatus according to any one of claims 10-17.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8 or claim 9.
20. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8 or claim 9.
CN202211058818.XA 2022-08-31 2022-08-31 Training method and device for sequencing model, sequencing method and device, electronic equipment and medium Active CN115293291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211058818.XA CN115293291B (en) 2022-08-31 2022-08-31 Training method and device for sequencing model, sequencing method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211058818.XA CN115293291B (en) 2022-08-31 2022-08-31 Training method and device for sequencing model, sequencing method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN115293291A CN115293291A (en) 2022-11-04
CN115293291B true CN115293291B (en) 2023-09-12

Family

ID=83832757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211058818.XA Active CN115293291B (en) 2022-08-31 2022-08-31 Training method and device for sequencing model, sequencing method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115293291B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076906B (en) * 2023-08-18 2024-02-23 云和恩墨(北京)信息技术有限公司 Distributed intelligent fault diagnosis method and system, computer equipment and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021379A (en) * 2016-05-12 2016-10-12 深圳大学 Personalized recommendation method and system based on user preference
CN110442684A (en) * 2019-08-14 2019-11-12 山东大学 A kind of class case recommended method based on content of text
CN113312512A (en) * 2021-06-10 2021-08-27 北京百度网讯科技有限公司 Training method, recommendation device, electronic equipment and storage medium
WO2021195688A1 (en) * 2020-04-03 2021-10-07 Presagen Pty Ltd Artificial intelligence (ai) method for cleaning data for training ai models
CN113642635A (en) * 2021-08-12 2021-11-12 百度在线网络技术(北京)有限公司 Model training method and device, electronic device and medium
CN113641896A (en) * 2021-07-23 2021-11-12 北京三快在线科技有限公司 Model training and recommendation probability prediction method and device
CN113689928A (en) * 2021-08-24 2021-11-23 平安国际智慧城市科技股份有限公司 Recommendation method, device, equipment and storage medium for maintaining and preventing disease scheme
CN114036398A (en) * 2021-11-30 2022-02-11 北京百度网讯科技有限公司 Content recommendation and ranking model training method, device, equipment and storage medium
CN114092188A (en) * 2021-11-19 2022-02-25 上海国烨跨境电子商务有限公司 Recommendation system algorithm of lightweight B2B E-commerce platform
CN114330752A (en) * 2021-12-31 2022-04-12 维沃移动通信有限公司 Ranking model training method and ranking method
CN114417194A (en) * 2021-12-30 2022-04-29 北京百度网讯科技有限公司 Recommendation system sorting method, parameter prediction model training method and device
CN114419397A (en) * 2022-01-20 2022-04-29 中山大学·深圳 Data set construction method and device based on data cleaning and data generation
CN114443948A (en) * 2021-12-16 2022-05-06 贝壳找房网(北京)信息技术有限公司 Ranking model training method, ranking method and device based on multi-scene data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737559B (en) * 2020-05-29 2024-05-31 北京百度网讯科技有限公司 Resource ordering method, method for training ordering model and corresponding device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021379A (en) * 2016-05-12 2016-10-12 深圳大学 Personalized recommendation method and system based on user preference
CN110442684A (en) * 2019-08-14 2019-11-12 山东大学 A kind of class case recommended method based on content of text
WO2021195688A1 (en) * 2020-04-03 2021-10-07 Presagen Pty Ltd Artificial intelligence (ai) method for cleaning data for training ai models
CN113312512A (en) * 2021-06-10 2021-08-27 北京百度网讯科技有限公司 Training method, recommendation device, electronic equipment and storage medium
CN113641896A (en) * 2021-07-23 2021-11-12 北京三快在线科技有限公司 Model training and recommendation probability prediction method and device
CN113642635A (en) * 2021-08-12 2021-11-12 百度在线网络技术(北京)有限公司 Model training method and device, electronic device and medium
CN113689928A (en) * 2021-08-24 2021-11-23 平安国际智慧城市科技股份有限公司 Recommendation method, device, equipment and storage medium for maintaining and preventing disease scheme
CN114092188A (en) * 2021-11-19 2022-02-25 上海国烨跨境电子商务有限公司 Recommendation system algorithm of lightweight B2B E-commerce platform
CN114036398A (en) * 2021-11-30 2022-02-11 北京百度网讯科技有限公司 Content recommendation and ranking model training method, device, equipment and storage medium
CN114443948A (en) * 2021-12-16 2022-05-06 贝壳找房网(北京)信息技术有限公司 Ranking model training method, ranking method and device based on multi-scene data
CN114417194A (en) * 2021-12-30 2022-04-29 北京百度网讯科技有限公司 Recommendation system sorting method, parameter prediction model training method and device
CN114330752A (en) * 2021-12-31 2022-04-12 维沃移动通信有限公司 Ranking model training method and ranking method
CN114419397A (en) * 2022-01-20 2022-04-29 中山大学·深圳 Data set construction method and device based on data cleaning and data generation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Ranking Distillation: Learning Compact Ranking Mo dels With High Performance for Re commender System;Jiaxi Tang 等;《Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining》;2289–2298 *

Also Published As

Publication number Publication date
CN115293291A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN112559007B (en) Parameter updating method and device of multitask model and electronic equipment
CN113312512B (en) Training method, recommending device, electronic equipment and storage medium
CN114428677B (en) Task processing method, processing device, electronic equipment and storage medium
US20200074509A1 (en) Business data promotion method, device, terminal and computer-readable storage medium
CN113393306A (en) Product recommendation method and device, electronic equipment and computer readable medium
CN115293332A (en) Method, device and equipment for training graph neural network and storage medium
CN115293291B (en) Training method and device for sequencing model, sequencing method and device, electronic equipment and medium
CN113361240B (en) Method, apparatus, device and readable storage medium for generating target article
CN111782850B (en) Object searching method and device based on hand drawing
CN106575418A (en) Suggested keywords
CN113987026A (en) Method, apparatus, device and storage medium for outputting information
CN114048315A (en) Method and device for determining document tag, electronic equipment and storage medium
GB2608112A (en) System and method for providing media content
CN113934894A (en) Data display method based on index tree and terminal equipment
CN114818843A (en) Data analysis method and device and computing equipment
CN110895564A (en) Potential customer data processing method and device
CN113011922B (en) Method and device for determining similar crowd, electronic equipment and storage medium
CN113360765B (en) Event information processing method and device, electronic equipment and medium
CN109949117B (en) Method and device for pushing information
CN112784861B (en) Similarity determination method, device, electronic equipment and storage medium
CN117422412A (en) Project management method, device, equipment and storage medium
CN117851653A (en) Object matching method, device, electronic equipment, storage medium and program product
CN114547417A (en) Media resource ordering method and electronic equipment
CN118035445A (en) Work order classification method and device, electronic equipment and storage medium
CN117932087A (en) User portrait generation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant