CN115293291A - Training method of ranking model, ranking method, device, electronic equipment and medium - Google Patents

Training method of ranking model, ranking method, device, electronic equipment and medium Download PDF

Info

Publication number
CN115293291A
CN115293291A CN202211058818.XA CN202211058818A CN115293291A CN 115293291 A CN115293291 A CN 115293291A CN 202211058818 A CN202211058818 A CN 202211058818A CN 115293291 A CN115293291 A CN 115293291A
Authority
CN
China
Prior art keywords
sample data
data set
target
tag
original
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.)
Granted
Application number
CN202211058818.XA
Other languages
Chinese (zh)
Other versions
CN115293291B (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

Images

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 sorting method, a device, electronic equipment and a medium of a sorting model, and relates to the technical field of artificial intelligence, in particular to the technical field of machine learning and information recommendation. The specific implementation scheme is as follows: in response to the detection of a data acquisition instruction, acquiring a sample data set and an original label set from a data source by using 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 which pays attention to the relative ordering relationship between the 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 group; training a ranking model according to the target label value set of at least one sample data set and at least one sample data set to obtain a target ranking model.

Description

Training method of ranking model, ranking method, device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of artificial intelligence technology, and more particularly, to the field of machine learning and information recommendation technology. In particular, the invention relates to a training method, a ranking method, a device, an electronic device and a medium of a ranking model.
Background
With the continuous development of computer technology, artificial intelligence technology has also been developed. For example, the ordering may be performed by using an artificial intelligence technique, so as to implement resource recommendation scenarios, service provider selection, anomaly detection, failure tracing, potential safety hazard troubleshooting, and the like.
Disclosure of Invention
The disclosure provides a training method, a sequencing device, electronic equipment and a medium of 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 a data acquisition instruction, acquiring a sample data set and an original label set from a data source by using 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 which focuses on the relative ordering relationship between sample data; 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; dividing the sample data set into at least one sample data group; and training the ranking model according to the at least one sample data group and the target label value set of the at least one sample data group to obtain a target ranking model.
According to another aspect of the present disclosure, there is provided a sorting method including: acquiring a data set to be sorted; 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 system comprises a first obtaining module, a second obtaining module and a third obtaining module, wherein the first obtaining module is used for obtaining a sample data set and an original label set from a data source by utilizing a data interface in response to a detected data obtaining instruction, the sample data set is a sample data set of a target application scene, and the target application scene represents an application scene which focuses on the relative ordering relation between sample data; a second obtaining module, configured to process an original tag value set of a sample data set according to a tag processing policy corresponding to a tag type, to obtain a target tag value set of the sample data set, where the sample data set is a sample data set of a target application scenario, and the target application scenario represents an application scenario in which a relative ordering relationship between sample data is concerned; the dividing module is used 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 group and the target label value set of the at least one sample data group, so as 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 a data set to be sorted; and a fourth obtaining module, configured to input the data set to be ranked into a target ranking model to obtain a ranking result, where the target ranking model is trained by using the apparatus according to the present 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, the instructions being executable by the at least one processor to enable the at least one processor to perform the method of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method as described in the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide 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 apparatus that may rank models, according to embodiments of the disclosure;
FIG. 2 schematically illustrates a flow chart of a method of training a ranking model according to an embodiment of the present disclosure;
FIG. 3A schematically illustrates an example schematic of a training process for a ranking model according to an embodiment of this disclosure;
FIG. 3B schematically illustrates an example schematic diagram of a ranking model according to an embodiment of this 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 for a ranking model according to an embodiment of the disclosure;
FIG. 6 schematically shows a block diagram of a sorting apparatus according to an embodiment of the present disclosure; and
FIG. 7 schematically illustrates a block diagram of an electronic device suitable for implementing 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 with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those 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 can 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 the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to 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 in the embodiments of the present disclosure without interacting with a server.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications may 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, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having display screens and supporting web browsing. For example, at least one of a smartphone, a tablet, a laptop portable computer, a 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, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a conventional physical host and a VPS service (Virtual Private Server). 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 embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the training device of the ranking model provided by the embodiments of the present disclosure may be generally disposed in the server 105. 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, 102, 103 and/or the server 105. Accordingly, the training device of the ranking model provided in the embodiment of the present disclosure may also be disposed 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.
Alternatively, the training method of the ranking model provided by the embodiment of the present disclosure may also be generally executed by the terminal device 101, 102, or 103. Correspondingly, the training device of the ranking model provided by the embodiment of the present disclosure may also be disposed in the terminal device 101, 102, or 103.
It should be noted that the sorting method provided by the embodiment of the present disclosure may be generally executed by the terminal device 101, 102, or 103. Correspondingly, the sorting device provided by the embodiment of the present disclosure may also be disposed in the terminal device 101, 102, or 103.
Alternatively, the ranking method provided by the disclosed embodiments 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 server cluster that is different from the server 105 and that is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Correspondingly, the sorting apparatus provided by the embodiment of the present disclosure may also be disposed 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 used as representations of the operations for description, and should not be construed as representing the execution order of the respective operations. The method need not be performed in the exact order shown, unless explicitly stated.
FIG. 2 schematically shows 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-S240.
In operation S210, in response to detecting the data obtaining instruction, a sample data set and an original tag set are obtained from a data source using a data interface.
In operation S220, according to the tag processing policy corresponding to the tag type, the original tag value set of the sample data set is processed to obtain a 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, the ranking model is trained according to the at least one sample data group and the target label value set of the at least one sample data group, so as 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 relationship 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 set of tag values corresponding to the sample data set. The set of samples may include at least one sample. The set of sample data may comprise at least one sample data. The original set of tag values may include at least one original tag value. A 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 characteristic data. The sample feature data may comprise a sample feature vector.
According to an embodiment of the present disclosure, the sample data set may be a data set corresponding to a target application scenario. The target application scenario may refer to an application scenario in which a relative ordering relationship between sample data in the sample data set is concerned, but an absolute ordering relationship between sample data in the sample data set is not concerned. An absolute ordering relationship may refer to an ordering relationship determined from an absolute value corresponding to 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. A relative ordering relationship may refer to an ordering relationship that is determined independent of an absolute value corresponding to the sample data. For example, the target application scenario may include at least one of: the system comprises a resource recommendation scene, a question and answer scene, a reward issuing scene, a personnel record scene, a service provider selection scene, an abnormality detection scene, a fault tracing scene, a potential safety hazard scene and the like.
According to an embodiment of the present disclosure, according to the attribute type of the resource, the resource recommendation scenario may include at least one of: a video resource recommendation scenario, an audio resource recommendation scenario, and a text resource recommendation scenario. According to the application scene type of the resource, the resource recommendation scene may include at least one of: the system comprises a financial product recommending scene, a route recommending scene, an object recommending scene, a music recommending scene, a movie and television series recommending scene, a game recommending scene, a food recommending scene, a scenery spot recommending scene, a lodging recommending scene, a game recommending scene and the like.
According to an embodiment of the present disclosure, a question-answer scenario may include at least one of: a text question-answer scene, a picture and text question-answer scene and the like. The reward issuance scenario may include at least one of: a coupon issuing scene, a performance reward issuing scene and the like. The coupon issuance scenario may include at least one of: a food coupon dispensing scene, a clothing coupon dispensing scene, a movie ticket coupon dispensing scene, a scenic spot ticket coupon dispensing scene, an application program member coupon dispensing scene and the like.
According to an embodiment of the present disclosure, the human recording scenario may include at least one of: the system comprises an enterprise recording scene, a business unit recording scene, a officer unit recording scene and the like. The facilitator 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 process supplier selection scenario, an assembly supplier selection scenario, a distribution supplier selection scenario, and a sales supplier selection scenario, among others. The anomaly detection scenario may include at least one of: an abnormal industrial product detection scene and an intelligent power grid dispatching control system service abnormality detection scene.
According to an embodiment of the present disclosure, the type of the sample data set may be selected according to a target application scenario, which is not limited herein. For example, the type of the set of sample data 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 the sample data set may further 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 and 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 anomalous industrial product detection scenario, the type of the sample data set may include at least one of a sample image data set and a sample text data set. Aiming at a service 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 the 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 tags and discrete tags. For example, a continuous tag may include a value of a consumer asset. The discrete tags may include a credit rating. A tag processing policy may refer to a policy for processing a set of original tag values. There may be a tag handling policy corresponding to the tag type. For example, a continuation type tag may have a tag handling policy corresponding to the continuation type tag. The discrete tags may have tag handling policies corresponding to the discrete tags. The tag processing policy corresponding to the continuous type tag may include a tag processing policy of discretizing the continuous type tag. The label handling policy corresponding to the discrete label may include a label handling policy that digitizes the discrete label.
According to an embodiment of the present disclosure, at least one sample data group may be obtained by dividing a sample data set. The set of sample data may comprise at least one sample data. The sample data sets do not have the same sample data as each other. Alternatively, there is at least one sample data group in each sample data group divided into at least two sample data groups. Alternatively, there is at least one sample data group in which the sample data is partitioned into at least two sample data groups and the sample data of each sample data group is different from each other.
According to an embodiment of the present disclosure, a ranking model may refer to a model for ranking at least one sample data comprised by a set of sample data. The ranking model may comprise 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 sequencing model may be configured according to actual business requirements, and is not limited herein.
According to embodiments of the present disclosure, a data interface may be invoked in response to detecting a data fetch instruction. The data acquisition instruction may be generated in response to detecting a data acquisition operation by a user. And acquiring a sample data set and an original tag value set corresponding to the sample data set from a data source by using a data interface. The data source may include at least one of: local database, cloud database and internet. The tag type of the original set of tag values may be determined. And processing the original label value set according to a label processing strategy corresponding to the label type to obtain a target label value set. And processing the sample data set by using a sample data group division strategy to obtain at least one sample data group.
According to the embodiment of the disclosure, for a sample data group in at least one sample data group, the sample data included in the sample text data group may be input into a ranking model, and a ranking evaluation value of the sample data included in the sample data group is obtained. Training a ranking model by using the ranking evaluation value of the sample data included in at least one sample data group and the target label value set of at least one sample data group to obtain a target ranking model.
For example, 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 flow data may include at least one of: the transaction time, the transaction asset value, and the transaction nature of the transaction for the object over the predetermined time period. The financial product data may include at least one of: risk rating of financial products, fund manager, asset size, buy cycle and redeem cycle. The original tag values corresponding to the sample data may include a tag value characterizing the candidate sample financial product as recommended and a tag value characterizing the candidate sample financial product as not recommended. The training method of the ranking model provided by the embodiment of the disclosure obtains the target label value set of the sample data set by processing the original label value set of the sample data set according to the label processing strategy corresponding to the label type, so that the rationality of the label value is improved, and on the basis, the training method can be used for improving the recommendation accuracy of financial products.
For example, where the target application scene is an object recommendation scene, the sample data may include object social interaction data for the sample object. The subject social interaction data may include at least one of: the data processing method comprises the following steps of following data of an object, watching data, comment data, barrage data, like data, collection data, sharing data and forwarding data. The original tag values corresponding to the sample data may include tag values characterizing the likelihood that the candidate sample object is recommended. The training method of the ranking model provided by the embodiment of the disclosure obtains the target label value set of the sample data set by processing the original label value set of the sample data set according to the label processing strategy corresponding to the label type, improves the rationality of the label value, and can be used for improving the recommendation accuracy of the object on the basis.
For example, where the target application scenario is a vendor selected scenario, the sample data may include at least one of: sample supplier data and sample order data for a sample supplier. The sample supplier data may include at least one of: sample supply efficiency data, sample change flexibility data, sample enterprise strength data and cooperation potential data. The sample order data may include at least one of: the system comprises capacity data required by a sample order, sample order address position data, sample order lead time data, sample order flexibility data and sample order quota data. The original tag values corresponding to the sample data may include tag values that characterize the likelihood of the sample supplier being selected. The training method of the ranking model provided by the embodiment of the disclosure obtains the target label value set of the sample data set by processing the original label value set of the sample data set according to the label processing strategy corresponding to the label type, improves the rationality of the label value, and can be used for improving the selection accuracy of suppliers on the basis.
According to an embodiment of the present disclosure, the training method of the ranking model of the embodiment 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 can be used for executing the training method of the ranking model provided by the embodiment of the 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 target label value set of the sample data set is obtained by processing the original label value set of the sample data set according to the label processing strategy corresponding to the label type, the rationality of the label value is improved, the ranking model is trained according to the target label value set of at least one sample data group and at least one sample data group obtained by dividing the sample data set, the target ranking model is obtained, the ranking accuracy of the target ranking model for the full-amount sample data is improved, and the resource consumption is reduced. Due to the fact that the sequencing accuracy of the target sequencing model for the full-amount sample data is improved, the number of model iterations is reduced, the training speed of the model is improved, the data processing amount of the 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 according with the natural law is obtained, and therefore 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 label type is determined to be a continuous label, processing the original label value set of the sample data set by using a discretization processing strategy to obtain a target label value set of the sample data set. And under the condition that the label type is determined to be a discrete label, processing the original label value set of the sample data set by using a mapping processing strategy to obtain a target label value set of the sample data set.
According to an embodiment of the present disclosure, the tag type may include at least one of: continuous tags and discrete tags. A continuation-type label can characterize the expected values of the original set of label values as consecutive values. For example, a discrete label may characterize the expected values of a set of original label values as discrete values.
According to an embodiment of the present disclosure, a discretization processing policy may refer to a processing policy for discretizing an original set of tag values of a continuum-type tag. A mapping processing policy may refer to a processing policy for mapping an original set of tag values of a discrete tag. Mapping may refer to mapping the original tag value to a predetermined 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 by using 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 label value set of the sample data set by using a box separation processing strategy to obtain a target label value set of the sample data set.
According to embodiments of the present disclosure, the discretization strategy can include a binning strategy. The binning processing strategy may include at least one of: an equidistant binning processing strategy and an equal-frequency binning processing strategy. The binning processing strategy may be configured according to actual service requirements, and is not limited herein.
According to the embodiment of the disclosure, processing the original tag value set of the sample data set by using the binning processing strategy to obtain the target tag value set of the sample data set may include the following operations.
Determining a global boundary tag value corresponding to an original tag value set of the sample data set. And determining an interval boundary label value corresponding to at least one interval according to the global boundary label 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 corresponding to at least one interval and the original label value set.
According to an embodiment 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 largest of the various 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 expected number of intervals may be configured according to actual service requirements, and is not limited herein. For example, the expected number of distinctions may be 4.
According to the embodiment of the disclosure, the maximum global boundary label value and the minimum global boundary label value can be determined from the expected values of the original label value set of the sample data set. And determining an interval numerical range corresponding to each of the at least one interval according to the maximum global boundary label value, the minimum global boundary label value and the expected interval number. According to the range of the interval numerical value corresponding to each of at least one interval. And determining the boundary label value of the interval corresponding to the at least one interval according to the numerical range of the interval corresponding to the at least one interval.
According to an embodiment of the present disclosure, for an original tag value in an original tag value set, 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 an actual service requirement, and is not limited herein. The first set of mapping relationships may include at least one first mapping relationship. The first mapping relationship may characterize a relationship between the interval boundary tag value and the first predetermined value.
For example, the expected values of the original set of tag values may include 10, 10.5, and 15. The interval boundary label value Labels1 may be determined in the manner described above and may include 10 and 13. The zone boundary label value Labels2 may include 13 and 16.
According to the embodiment of the disclosure, 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 may include the following operations.
And mapping the original tag value set of the sample data set into a predetermined 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 comprise at least one second predetermined value (i.e. the predetermined value). The mapping process policy may refer to a process policy for mapping an original tag value of a discrete tag to a second predetermined value.
According to the embodiment of the present disclosure, the original tag value set of the sample data set may be mapped to a second predetermined value set according to a second mapping relationship set, so as to obtain a target tag value set of the sample data set. The second set of mappings may include a second mapping. The second mapping relationship 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 numerical value corresponding to the original tag value is determined according to the second set of mapping relationships. The original tag value is mapped to a second predetermined value corresponding to the original tag value.
For example, the original label characterizes the credit rating. The values of the original set of tag values may include difference, general, and excellent. The mapping process strategy can be used to map "poor" to "0", "general" to "1" and "good" 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:
and dividing the sample data set into at least one first sample data group by using a non-repetition division strategy. The respective first sample data groups are different from each other. And dividing the sample data set into at least one second sample data group by using a repeated division strategy. There is at least one sample data group in which at least one sample data is divided into at least two second sample data groups.
According to embodiments of the present disclosure, a no-duplication partitioning policy may be used to implement a policy of partitioning a sample data set into respective first sample data groups that are different from one another. The repeated partitioning policy may be used to implement a policy of partitioning the set of sample data into at least two second groups of sample data in which there is at least one sample data partition. 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 group may include at least one first sample data group. Alternatively, the at least one set of sample data may comprise at least one second set of sample data. 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, in a case that at least one sample data group includes at least one first sample data group, training an ordering model according to at least one sample data group and a target label value set of at least one sample data group, to obtain a target ordering model, may include: and training a ranking model according to the target label value sets of the at least one first sample data group and the at least one first sample data group to obtain a target ranking model.
According to an embodiment of the present disclosure, in a case that at least one sample data group includes at least one second sample data group, training an ordering model according to at least one sample data group and a target tag value set of at least one sample data group, to obtain a target ordering model, may include: and training the ranking model according to the target label value set of at least one second sample data group and at least one second sample data group to obtain a target ranking model.
According to an embodiment of the present disclosure, the at least one first sample data group may include M first sample data groups.
According to an embodiment of the present disclosure, partitioning the sample data set into at least one first sample data group using a no-duplication partitioning policy may include repeatedly performing the following operations M times, and the operation M times 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 The nth sample data is determined in the sample data set. And determining the nth sample data as the sample data of the mth first sample data group. From the (m-1) n-1 Deleting the nth sample data from the sample data set to obtain the (m-1) th sample data n A set of sample data.
According to an embodiment 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 set of sample data.
According to an embodiment of the present disclosure, M ∈ {1,2, … …, M-1,M }. The M first sample data groups are different from each other. The mth first sample data group may include sample data corresponding to the mth first predetermined number threshold. The sum of the 1 st first predetermined number threshold, the 2 nd first predetermined number threshold, … …, the mth first predetermined number threshold, … …, the (M-1) th first predetermined number threshold, and the Mth 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. 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, then (m-1) th n-1 Determining the nth sample data in the sample data set, determining the nth sample data as the sample data of the mth first sample data set, and determining the sample data from the (m-1) th sample data set n-1 Deleting the nth sample data from the sample data set to obtain the (m-1) th sample data n A set of sample data. 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 groups.
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, partitioning the sample data set into at least one second sample data group using the partitioning-by-repetition policy may include repeatedly performing the following operations R times, and the operation R times may include repeatedly performing the following operations until the number of sample data in the second sample data group R is equal to a second predetermined number threshold R:
in the event that it is determined that the number of sample data in the r-th second sample data group is less than the r-th second predetermined number threshold, the s-th sample data is determined from the (s-1) -th set of sample data. 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 the sample data of the r-th second sample data group. And deleting the s sample data from the (s-1) th sample data set to obtain the s 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 set of sample data.
According to an embodiment of the present disclosure, R ∈ {1,2, … …, R-1,R }. The first sample data set may comprise sample data corresponding to a first predetermined number threshold. The sum of the 1 st second predetermined number threshold, the 2 nd first predetermined number threshold, … …, the R-th first predetermined number threshold, … …, the (R-1) th first predetermined number threshold, and the R-th first predetermined number threshold is less than or equal to P.
According to an embodiment of the present disclosure, the r-th second sample data group may be obtained as follows. It is determined whether the number of sample data in the r-th second sample data group is less than an r-th second predetermined number threshold. And if the number of the sample data in the r second sample data group is smaller than the r second preset number threshold, determining the s sample data in the (s-1) th sample data set obtained by deleting (s-1) sample data from the sample data set, determining the s sample data as the sample data of the r second sample data group, and deleting the s sample data from the (s-1) th sample data set to obtain the s sample data set. The above operations are repeatedly performed until it is determined that the sample data in the r-th second sample data group is equal to the r-th second predetermined number threshold. The operation procedure R times may be repeatedly performed to obtain the 1 st second sample data group to the R th second sample data group.
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:
and training the g-th tree model by utilizing the output result of the previous (g-1) tree model, at least one sample data group and the target label value set of at least one sample data group to obtain the output result of the g-th tree model.
According to an embodiment of the present disclosure, the output result may characterize an ordered output value of the sample data comprised by the sample data set. G can 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 is epsilon {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 include a decision tree based regression tree. The Regression Tree may include a MART (Multiple Additive Regression Tree) (i.e., GBDT (Gradient Boosting Decision Tree)). The classification tree may comprise a decision tree based classification tree. The predetermined termination condition may include at least one of: the predetermined number of training operations of the tree model and the convergence of the target loss function value are completed. The target loss function value may be determined from the sorted output value and the sorted tag value of the sample data. The form of the objective loss function may be configured according to actual service requirements, and is not limited herein. For example, the target loss function may include a cross-entropy loss function.
According to an embodiment of the present disclosure, the order model may include G cascaded tree models. The g-th tree model can be used to fit the residual values of the first (g-1) tree models. The residual value may be a partial derivative of the previous full sorted output result according to the objective loss function.
According to an embodiment of the present disclosure, the set of sample data may include at least two sample data.
According to an embodiment of the present disclosure, training the g-th tree model using the output results of the first (g-1) tree models, the at least one sample data group, and the target tag value set of the at least one sample data group to obtain the output result of the g-th tree model may include the following operations.
And aiming at the sample data group in at least one sample data group, determining a gradient value and a weight value corresponding to at least two sample data respectively according to 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 the target label value, the gradient value and the weight value which are respectively corresponding to at least two sample data in at least one sample data group.
According to an embodiment of the present disclosure, the ranking evaluation index may include at least one of: normalized Discount Cumulative revenue Average (NDCG), mean Reciprocal Rank (MRR), and accuracy (MAP).
According to an embodiment of the present disclosure, a partial order probability function may be determined based on an order evaluation index function. And determining a gradient function according to the partial order probability function. And processing the sample data, the sample data and any other sample data in the sample data group by using a gradient function aiming at each sample data in each sample data group to obtain the 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 partial order probability function and the gradient function may be functions for the sample data and any other sample data in the set of sample data.
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 embodiment of the disclosure is further described with reference to fig. 3A to 3B.
FIG. 3A schematically illustrates an example schematic of a training process for a ranking model according to an embodiment of this disclosure.
As shown in fig. 3A, in 300A, a tag type 302 of an original set of tag values 301 corresponding to a sample set of data 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 set of sample data 305 may be partitioned into at least one set of sample data 306 using one of a no duplication partitioning policy and a with duplication partitioning policy. The ranking model 307 is trained using at least one sample data set 306 and the target sample tag value sets 304 corresponding to the at least one sample data set 306, resulting in a target ranking model 308.
FIG. 3B schematically shows an example schematic of a ranking model according to an embodiment of the disclosure.
As shown in FIG. 3B, in 300B, the order model 309 can include G tree models, such as tree model 309_1, tree model 309_2, … …, tree model 309_g, … …, tree model 309_G-1, and tree model 309_G. And training the g-th tree model (namely the tree model 309 \ug) by utilizing the output results of the first (g-1) tree models, the at least one sample data group 310 and the target label value set of the at least one sample data group 310 to obtain the output result of the tree model 309 \ug.
Fig. 4 schematically shows 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-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 an embodiment of the present disclosure, the target ranking model may be obtained by training using a training method of the ranking model according to an embodiment of the present disclosure.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The above is only an exemplary embodiment, but not limited to this, and other training methods and ranking methods of the ranking model known in the art may also be included, as long as the reasonableness of the label value can be improved, the ranking accuracy of the target ranking model for the full amount of sample data can be improved, and the resource consumption can be reduced.
FIG. 5 schematically shows a block diagram of a training apparatus for a ranking model according to an embodiment of the present 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, configured to obtain a sample data set and an original tag set from a data source by using a data interface. The sample data set is a sample data set of the target application scenario. The target application scenario characterizes an application scenario that concerns a relative ordering relationship of the respective sample data with respect to each other.
The second obtaining module 520 is configured to process the original tag value set of the sample data set according to a tag processing policy corresponding to the tag type, to obtain a target tag value set of the sample data set.
A partitioning module 530 configured to partition the sample data set into at least one sample data group.
The second obtaining module 540 is configured to train a ranking model according to the at least one sample data group and the target label value set of the at least one sample data group, 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 tags and discrete tags. The continuous type label represents that the expected values of the original label value set are continuous numerical values. The discrete type label represents that the expected value of the original label value set is a discrete numerical 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.
And the determining submodule is used for determining the label type of the original label value set of the sample data set.
And the first obtaining submodule is used for processing the original label value set of the sample data set by using a discretization processing strategy to obtain a target label value set of the sample data set under the condition that the label type is determined to be the continuous type label.
And the second obtaining submodule is used for processing the original label value set of the sample data set by utilizing a mapping processing strategy to obtain a target label value set of the sample data set under the condition that the label type is determined to be a discrete label.
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 using a box separation processing 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.
The first determining subunit is configured to determine a global boundary tag value corresponding to an original tag value set of the sample data set.
And a second determining subunit, configured to determine, according to the global boundary tag value and the expected number of intervals, an interval boundary tag value corresponding to at least one interval.
The first obtaining subunit is configured to obtain a target tag value set of the sample data set according to an interval boundary tag value and an original tag value set corresponding to at least one interval.
According to an embodiment of the present disclosure, the second obtaining sub-module may include a second obtaining unit.
And the second obtaining unit is used for mapping the original tag value set of the sample data set into a predetermined 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 partitioning module 530 may include one of a first partitioning submodule and a second partitioning submodule.
The system comprises a first partitioning module and a second partitioning module, wherein the first partitioning module is used for partitioning the sample data set into at least one first sample data group by using a non-repetition partitioning strategy. The respective first sample data groups are different from each other.
And the second division submodule is used for dividing the sample data set into at least one second sample data group by utilizing the repeated division strategy. There is at least one sample data group in which at least one sample data is divided into at least two second sample data groups.
According to an embodiment of the present disclosure, the at least one first sample data group includes M first sample data groups. M is an integer greater than or equal to 1.
According to an embodiment of the present disclosure, the partitioning the sample data set into at least one first sample data group by using a no-duplication partitioning policy includes repeatedly performing the following operations M times, and the mth operation includes 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 And determining the nth sample data in the sample data set, wherein n is an integer which is greater than or equal to 1 and less than or equal to P, P is an integer which is greater than or equal to 1, and P represents the number of the sample data included in the sample data set. And determining the nth sample data as the sample data of the mth first sample data group. From (m-1) n-1 Deleting the nth sample data in the sample data set to obtain the (m-1) th sample data 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 present disclosure, the dividing the sample data set into at least one second sample data group by using the repeated dividing policy includes repeatedly performing the following operations R times, and the operation R times includes repeatedly performing the following operations until the number of sample data in the second sample data group R is equal to the second predetermined number threshold R times:
in the event that it is determined that the number of sample data in the r-th second sample data set is less than the r-th second predetermined number threshold, 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 set of sample data. And determining the s sample data as the sample data of the r second sample data group. And deleting the s sample data from the (s-1) th sample data set to obtain the s sample data set.
According to the embodiment of the disclosure, training a ranking model according to at least one sample data group and a target label value set of at least one sample data group to obtain a target ranking model, repeating the following operations until a predetermined end condition is met, and obtaining the target ranking model including G tree models:
and training the g-th tree model by using the output result of the previous (g-1) tree models, 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-th tree model. The output result represents the sorted output value of the sample data included in 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 set of sample data comprises at least two sample data.
According to an embodiment of the present disclosure, training the g-th tree model using the output results of the first (g-1) tree models, the at least one sample data group, and the target tag value set of the at least one sample data group to obtain the output result of the g-th tree model may include the following operations.
And aiming at the sample data group in the at least one sample data group, determining a gradient value and a weight value corresponding to each of the at least two sample data according to 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 the target label value, the gradient value and the weight value which are respectively 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: the system comprises a resource recommendation scene, a question and answer scene, a reward issuing scene, a personnel record scene, a service provider selection scene, an abnormality detection scene, a fault tracing scene and a potential safety hazard scene.
Fig. 6 schematically shows 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 obtaining module 610 and a fourth obtaining module 620.
An obtaining module 610, configured to obtain a data set to be sorted.
A fourth obtaining module 620, configured to input the data set to be sorted into the target sorting model, so as to obtain a sorting result.
According to an embodiment of the present disclosure, the target ranking model is trained according to a training apparatus of a ranking model of an embodiment of the present disclosure.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
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 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 having stored thereon computer instructions for causing a computer to perform the method as described above.
According to an embodiment of the disclosure, a computer program product comprising a computer program which, when executed by a processor, implements the method as described above.
FIG. 7 schematically illustrates a block diagram of an electronic device suitable for implementing 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples 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, which may 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 necessary for the operation of the electronic device 700 can be stored. The calculation unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
A number of 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, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, 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 via a computer network such as the internet and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 701 performs the respective methods and processes described above, such as the training method and the ranking method of the ranking model. For example, in some embodiments, the training method and the ranking method of the ranking model may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as 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 of the ranking model and the ranking method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured by any other suitable means (e.g., by means of firmware) to perform the training method and the ranking method of the ranking model.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. 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. A 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 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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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 with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (27)

1. A method of training a ranking model, comprising:
in response to detecting a data acquisition instruction, acquiring a sample data set and an original label set from a data source by using 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 which focuses on the relative ordering relation between sample data;
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;
dividing the sample data set into at least one sample data group; and
training the ranking model according to the at least one sample data group and the target label value set of the at least one sample data group to obtain a target ranking model.
2. The method of claim 1, wherein the tag type comprises at least one of: the continuous type label represents that the expected value of the original label value set is a continuous numerical value, and the discrete type label represents that the expected value of the original label value set is a discrete numerical value;
wherein, 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 the target tag value set of the sample data set includes:
determining a label type of an original label value set of the sample data set;
under the condition that the label type is determined to be the continuous label, processing the original label value set of the sample data set by utilizing a discretization processing strategy to obtain a target label value set of the sample data set; and
and under the condition that the label type is determined to be the discrete label, processing the original label value set of the sample data set by using a mapping processing strategy to obtain a target label value set of the sample data set.
3. The method of claim 2, wherein said processing the original set of tag values of the sample data set using a discretization processing policy to obtain a target set of tag values of the sample data set comprises:
and processing the original tag value set of the sample data set by utilizing a box separation processing strategy to obtain a target tag value set of the sample data set.
4. The method of claim 3, wherein the processing the original set of tag values of the sample data set using the binning processing policy to obtain the target set of tag values of 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.
5. The method according to any one of claims 2 to 4, wherein the processing the original set of tag values of the sample data set by using the mapping processing policy to obtain the target set of tag values of the sample data set includes:
and mapping the original tag value set of the sample data set into a predetermined value set by using the mapping processing strategy to obtain a target tag value set of the sample data set.
6. The method of any of claims 2 to 5, wherein said 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 of the sample data set into at least one sample data group comprises one of:
dividing the sample data set into at least one first sample data group by using a non-repetition division strategy, wherein the first sample data groups are different from one another; and
and partitioning the sample data set into the at least one second sample data group by using a repeated partitioning strategy, wherein at least one sample data in the at least one second sample data group is partitioned into at least two second sample data groups.
7. The method of claim 6, wherein the at least one first sample data group includes M first sample data groups, 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 by using the no-repeat division policy includes repeatedly performing the following operations M times, and the mth operation includes 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 the sample data set, 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, and P represents the number of sample data included in the sample data set;
determining the nth sample data as the sample data of the mth first sample data group; and
from the (m-1) n-1 Deleting the nth sample data from the sample data set to obtain the (m-1) th sample data n A set of sample data.
8. A method according to claim 6 or 7, wherein said 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 partitioning the set of sample data into said at least one second sample data group using the repartitioning policy comprises repeatedly performing the following operations R times, and the R-th operation comprises repeatedly performing the following operations until the number of sample data in the R-th second sample data group is equal to an R-th second predetermined number threshold:
in the event that it is determined that the number of sample data in the r-th second sample data set is less than the r-th second predetermined number threshold, determining s-th sample data from an (s-1) -th sample data set, wherein the (s-1) -th sample data set is derived by deleting (s-1) 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 characterizing the number of sample data that the sample data set comprises;
determining the s sample data as the sample data of the r second sample data group; and
and deleting the s sample data from the (s-1) th sample data set to obtain an s sample data set.
9. The method according to any one of claims 1 to 8, wherein said training said ranking model according to said at least one sample data set and said target set of tag values of said at least one sample data set to obtain a target ranking model comprises repeating the following operations until a predetermined termination condition is met, resulting in a target ranking model comprising G tree models:
training a G-th tree model by using output results of the first (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 an output result of the G-th tree model, wherein the output result represents an ordering output value of sample data included in the sample data group, G is an integer which is greater than or equal to 1 and less than or equal to G, and G is an integer which is greater than or equal to 1.
10. The method of claim 9, wherein the set of sample data comprises at least two sample data;
wherein, the training of the g-th tree model by using the output results 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 set of sample data of said at least one set of sample data,
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 ranking evaluation index function; and
training the g-th tree model by using the output results of the first (g-1) tree models and target label values, gradient values and weight values corresponding to the at least two sample data in the at least one sample data group.
11. The method of any of claims 1-10, wherein the application scenario comprises one of: the system comprises a resource recommendation scene, a question and answer scene, a reward issuing scene, a personnel record scene, a service provider selection scene, an abnormality detection scene, a fault tracing scene and a potential safety hazard scene.
12. A method of sorting, comprising:
acquiring a data set to be sorted; and
inputting the data set to be sorted into a target sorting model to obtain a sorting result,
wherein the target ranking model is trained using the method according to any one of claims 1 to 11.
13. A training apparatus for ranking models, comprising:
the system comprises a first obtaining module, a second obtaining module and a third obtaining module, wherein the first obtaining module is used for obtaining a sample data set and an original label value set from a data source by utilizing a data interface in response to detecting a data obtaining instruction, the sample data set is a sample data set of a target application scene, and the target application scene represents an application scene which focuses on the relative ordering relation between sample data;
a second obtaining module, configured to process the original tag value set of the sample data set according to a tag processing policy corresponding to a tag type, to obtain a target tag value set of the sample data set;
a partitioning module, configured to partition the sample data set into at least one sample data group; and
and the third obtaining module is used for training the ranking model according to the at least one sample data group and the target label value set of the at least one sample data group to obtain a target ranking model.
14. The apparatus of claim 13, wherein the tag type comprises at least one of: the continuous label represents that the expected values of the original label value set are continuous numerical values, and the discrete label represents that the expected values of the original label value set are discrete numerical values;
wherein the second obtaining module includes:
the determining submodule is used for determining the label type of the original label 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
and the second obtaining submodule is used for processing the original tag value set of the sample data set by utilizing a mapping processing strategy to obtain a target tag value set of the sample data set under the condition that the tag type is determined to be the discrete tag.
15. The apparatus of claim 14, wherein the first obtaining submodule comprises:
the first obtaining unit is used for processing the original tag value set of the sample data set by using a box separation processing strategy to obtain a target tag value set of the sample data set.
16. The apparatus of claim 15, 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, according to the global boundary tag value and the expected number of intervals, an interval boundary tag value corresponding to at least one interval; and
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.
17. The apparatus of any one of claims 14-16, wherein the second obtaining submodule includes:
and a second obtaining unit, configured to map the original tag value set of the sample data set to a predetermined value set by using the mapping processing policy, so as to obtain a target tag value set of the sample data set.
18. Apparatus according to any of claims 14 to 17, in which 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 module, configured to partition the sample data set into the at least one first sample data group by using a non-duplicate partitioning policy, where the first sample data groups are different from each other; and
a second partitioning sub-module, configured to partition the sample data set into the at least one second sample data group by using a repeated partitioning policy, where at least one sample data in the at least one second sample data group is partitioned into at least two second sample data groups.
19. The apparatus of claim 18, wherein the at least one first sample data group comprises M first sample data groups, M being an integer greater than or equal to 1;
wherein the partitioning the sample data set into the at least one first sample data group by using the no-duplication partitioning policy includes repeatedly performing the following operations M times, and the mth operation includes 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 the sample data set, 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, and P represents the number of sample data included in the sample data set;
determining the nth sample data as the sample data of the mth first sample data group; and
from the (m-1) n-1 Deleting the nth sample data in the sample data set to obtain the (m-1) th sample data n A set of sample data.
20. Apparatus according to claim 18 or 19, wherein said 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 partitioning the set of sample data into said at least one second sample data group using a repeated partitioning policy comprises repeatedly performing the following operations R times, and the operation R times comprises repeatedly performing the following operations until the number of sample data in the second sample data group R is equal to a second predetermined number threshold R:
determining a(s) th sample data from an (s-1) th sample data set in the case that it is determined that the number of sample data in an (r) th second sample data set is less than the r second predetermined number threshold, wherein the (s-1) th sample data set is obtained by deleting (s-1) sample data from the sample data set, s is an integer which is greater than or equal to 1 and less than or equal to P, P is an integer which is greater than or equal to 1, and P characterizes the number of sample data included in the sample data set;
determining the s sample data as the sample data of the r second sample data group; and
and deleting the s sample data from the (s-1) th sample data set to obtain an s sample data set.
21. The apparatus according to any one of claims 13 to 20, wherein said training 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 comprises repeating the following operations until a predetermined termination condition is met to obtain a target ranking model comprising G tree models:
training a G-th tree model by using output results of the first (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 an output result of the G-th tree model, wherein the output result represents an ordering output value of sample data included in the sample data group, G is an integer which is greater than or equal to 1 and less than or equal to G, and G is an integer which is greater than or equal to 1.
22. The apparatus of claim 21, wherein said set of sample data comprises at least two sample data;
wherein, the training the g-th tree model by using the output results of the previous (g-1) tree models, the at least one sample data group and the target tag value set of the at least one sample data group to obtain the output result of the g-th tree model comprises:
for a set of sample data of said at least one set of sample data,
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 ranking evaluation index function; and
training the g-th tree model by using the output results of the first (g-1) tree models and target label values, gradient values and weight values corresponding to the at least two sample data in the at least one sample data group.
23. The apparatus of any of claims 13-22, wherein the application scenario comprises one of: the method comprises the following steps of resource recommendation scene, question and answer scene, reward issuing scene, personnel record scene, service provider selection scene, abnormal detection scene, fault tracing scene and potential safety hazard scene.
24. A sequencing apparatus, comprising:
the acquisition module is used for acquiring a data set to be sorted; 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 target ranking model is trained using the apparatus according to any one of claims 13 to 23.
25. 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 11 or claim 12.
26. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-11 or claim 12.
27. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11 or claim 12.
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 true CN115293291A (en) 2022-11-04
CN115293291B 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)

Cited By (1)

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

Citations (14)

* 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
US20210374344A1 (en) * 2020-05-29 2021-12-02 Beijing Baidu Netcom Science And Technology Co., Ltd. Method for resource sorting, method for training sorting model and corresponding apparatuses
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
CN114419397A (en) * 2022-01-20 2022-04-29 中山大学·深圳 Data set construction method and device based on data cleaning and data generation
CN114417194A (en) * 2021-12-30 2022-04-29 北京百度网讯科技有限公司 Recommendation system sorting method, parameter prediction model training method and device
CN114443948A (en) * 2021-12-16 2022-05-06 贝壳找房网(北京)信息技术有限公司 Ranking model training method, ranking method and device based on multi-scene data

Patent Citations (14)

* 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
US20210374344A1 (en) * 2020-05-29 2021-12-02 Beijing Baidu Netcom Science And Technology Co., Ltd. Method for resource sorting, method for training sorting model and corresponding apparatuses
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 (4)

* Cited by examiner, † Cited by third party
Title
GUANGLI LI 等: "Multi-modal visual adversarial Bayesian personalized ranking model for recommendation", 《INFORMATION SCIENCES》, pages 378 - 403 *
JIAXI TANG 等: "Ranking Distillation: Learning Compact Ranking Mo dels With High Performance for Re commender System", 《PROCEEDINGS OF THE 24TH ACM SIGKDD INTERNATIONAL CONFERENCE ON KNOWLEDGE DISCOVERY & DATA MINING》, pages 2289 *
李金忠 等: "排序学习研究进展与展望", 《自动化学报》, vol. 44, no. 8, pages 1345 - 1369 *
毕瀚元: "不完整数据分类算法及其在建筑能耗预测中的应用", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》, pages 038 - 477 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN115293291B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN111401777B (en) Enterprise risk assessment method, enterprise risk assessment device, terminal equipment and storage medium
US10679178B2 (en) Big data sourcing simulator
US20200234218A1 (en) Systems and methods for entity performance and risk scoring
CN109636430A (en) Object identifying method and its system
CN111414376A (en) Data early warning method and device
US20230089850A1 (en) Real-time product environmental impact scoring
US20200074509A1 (en) Business data promotion method, device, terminal and computer-readable storage medium
CN113312512B (en) Training method, recommending device, electronic equipment and storage medium
CN110674620A (en) Target file generation method, device, medium and electronic equipment
Weingarten et al. Shortening delivery times by predicting customers’ online purchases: A case study in the fashion industry
CN115293291B (en) Training method and device for sequencing model, sequencing method and device, electronic equipment and medium
CN110059172B (en) Method and device for recommending answers based on natural language understanding
CN113361240B (en) Method, apparatus, device and readable storage medium for generating target article
US10678800B2 (en) Recommendation prediction based on preference elicitation
CN111782850B (en) Object searching method and device based on hand drawing
WO2020150597A1 (en) Systems and methods for entity performance and risk scoring
US9760655B2 (en) Systems and methods for discovering temporal patterns in time variant bipartite graphs
CN110796520A (en) Commodity recommendation method and device, computing equipment and medium
CN116010707A (en) Commodity price anomaly identification method, device, equipment and storage medium
CN115827994A (en) Data processing method, device, equipment and storage medium
CN114818843A (en) Data analysis method and device and computing equipment
CN113158032A (en) Information pushing method and device
CN111738789A (en) Article information pushing method, device, equipment and storage medium
US20180068249A1 (en) Using customer profiling and analytics to understand, rank, score, and visualize best practices
CN113360765B (en) Event information processing method and device, electronic equipment and 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