Training data generation method, training method, device, equipment, medium and program product
By adjusting the proportion of popular and unpopular products on the product recommendation model, the training data with balanced samples is generated, which solves the problems of insufficient training data and poor recommendation accuracy, and improves the recommendation effect of the model.
Patent Information
- Application Number
- CN202510741368.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-01
AI Technical Summary
The training data of the product recommendation model mainly comes from the log data of popular products, resulting in insufficient training data and poor accuracy of model recommendations, and insufficient learning of unpopular products, resulting in continuous shrinking of the recommendation range.
By converting the original object resource data, generating object resource tables, filtering out target popular and unpopular object resources, adjusting their proportions, and generating object resource training data to ensure sample balance between popular and unpopular products.
It improves the sample balance of the training data, improves the recommendation accuracy of the product recommendation model, and avoids the problems of excessive recommendation of popular products and insufficient learning of unpopular products.
Smart Images

Figure CN120408201A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method for generating training data, a training method, a device, a device, a medium, and a program product. Background Art
[0002] A product recommendation model understands user interests based on user characteristics and screens out products that users are interested in from a large number of products.
[0003] In the process of implementing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technologies: the training data of the product recommendation model (including the recall model and the ranking model) comes from the log data recorded during the previous system service. Since the log data recorded during the system service is mainly hot product data, there is a shortage of training data and poor accuracy in model recommendation during model training. Summary of the Invention
[0004] In view of this, the present disclosure provides a method for generating training data, a training method, a device, a device, a medium, and a program product.
[0005] One aspect of the present disclosure provides a method for generating training data, including: performing data conversion on the original object resource data to generate an object resource table, where the object resource table includes original hot object resources and original cold object resources;
[0006] Determining a first number of target hot object resources from the original hot object resources according to the operation characteristics of the original hot object resources;
[0007] Determining a second number of target cold object resources from the original cold object resources according to the operation characteristics of the original cold object resources, where the ratio between the original hot object resources and the original cold object resources is greater than the ratio between the target hot object resources and the target cold object resources;
[0008] Generating object resource training data according to the target hot object resources and the target cold object resources.
[0009] According to an embodiment of the present disclosure, the object resource table includes an object resource data table, and the original object resource data carries an operation date; performing data conversion on the original object resource data to generate an object resource table includes:
[0010] Extracting a resource identifier from the original object resource data to obtain an object resource identifier;
[0011] Grouping the original object resource data according to the object resource identifier to generate original object resource data corresponding to the object resource identifier;
[0012] Number the original object resource data corresponding to the same object resource identifier according to the operation date and the object resource identifier, to obtain the numbering information of the original object resource data;
[0013] Store the original object resource data in dimensions of the object resource identifier, the original object resource data, the numbering information, and the operation date, to generate an object resource data table.
[0014] According to an embodiment of the present disclosure, the object resource table further includes an object resource count table; performing data conversion on the original object resource data to generate the object resource table further includes:
[0015] Obtain the number of the original object resource data corresponding to the same object resource identifier according to the numbering information;
[0016] Store the number of the original object resource data in dimensions of the object resource identifier, the number of the original object resource data, and the operation date, to generate an object resource count table.
[0017] According to an embodiment of the present disclosure, determining a first number of target popular object resources from the original popular object resources according to the operation characteristics of the original popular object resources includes:
[0018] Determine a first preset number threshold and a second preset number threshold for the target popular object resources, where the first preset number threshold is greater than the second preset number threshold;
[0019] Determine the first number of the target popular object resources according to the first preset number threshold, the second preset number threshold, and the operation characteristics of the original popular object resources;
[0020] Determine the target popular object resources from the original popular object resources according to the first number of the target popular object resources.
[0021] According to an embodiment of the present disclosure, determining the target popular object resources from the original popular object resources according to the first number of the target popular object resources includes:
[0022] Determine a filtering parameter from the object resource count table according to the first number of the target popular object resources, where the filtering parameter represents an operation date threshold and a numbering information threshold for determining the target popular object resources;
[0023] Determine the target popular object resources from the original popular object resources according to the operation date threshold and the numbering information threshold.
[0024] According to an embodiment of the present disclosure, determining the filtering parameter from the object resource count table according to the first number of the target popular object resources includes:
[0025] Query the operation date corresponding to the object resource identifier from the object resource count table according to the object resource identifier corresponding to the original popular object resource;
[0026] Sum up the numbers of the original object resources corresponding to the operation dates in sequence according to the preset operation date order;
[0027] When the summation result and the first number satisfy the first preset relationship, use the last operation date in the summation as the operation date threshold of the target popular object resource;
[0028] Determine the number information threshold according to the first number and the numbers of the original object resources corresponding to the other operation dates except the last operation date in the summation result, where the number information threshold is one of the associated number information in the original popular object resource corresponding to the last operation date.
[0029] According to the embodiments of the present disclosure, determining the target popular object resource from the original popular object resources according to the operation date threshold and the number information threshold includes:
[0030] Traverse the operation date corresponding to the object resource identifier from the object resource data table according to the object resource identifier of the original popular object resource;
[0031] When the operation date corresponding to the object resource identifier and the operation date threshold satisfy the second preset relationship, store the original popular object resource corresponding to the operation date to obtain the first target popular object resource;
[0032] When the operation date corresponding to the object resource identifier and the operation date threshold satisfy the third preset relationship, obtain the number information corresponding to the operation date from the object resource data table;
[0033] Determine the target number information from the number information corresponding to the operation date according to the number information threshold, and store the original popular object resource corresponding to the target number information to obtain the second target popular object resource;
[0034] Determine the target popular object resource according to the first target popular object resource and the second target popular object resource.
[0035] According to the embodiments of the present disclosure, determining the second number of target unpopular object resources from the original unpopular object resources according to the operation characteristics of the original unpopular object resources includes:
[0036] Determine the third preset number threshold and the fourth preset number threshold of the target unpopular object resources, where the third preset number threshold is greater than the fourth preset number threshold;
[0037] Determine the second number of target cold-start object resources according to the third preset number threshold, the fourth preset number threshold, and the operation characteristics of the original cold-start object resources;
[0038] Determine the target cold-start object resources from the original cold-start object resources according to the second number of the target cold-start object resources.
[0039] According to an embodiment of the present disclosure, generate object resource training data according to the target popular object resources and the target cold-start object resources, including:
[0040] Perform data format conversion on the target popular object resources and the target cold-start object resources;
[0041] Reorder the converted target popular object resources and the converted target cold-start object resources to generate object resource training data.
[0042] Another aspect of the present disclosure provides a method for training an object resource recommendation model, including:
[0043] Use the object resource training data to train the model to be trained to obtain a trained object resource recommendation model, where the object resource training data is generated by using the method described above.
[0044] Another aspect of the present disclosure provides a training data generation device, including:
[0045] A data conversion module for performing data conversion on the original object resource data to generate an object resource table, where the object resource table includes original popular object resources and original cold-start object resources;
[0046] A target popular object resource determination module for determining the first number of target popular object resources from the original popular object resources according to the operation characteristics of the original popular object resources;
[0047] A target cold-start object resource determination module for determining the second number of target cold-start object resources from the original cold-start object resources according to the operation characteristics of the original cold-start object resources, where the ratio between the original popular object resources and the original cold-start object resources is greater than the ratio between the target popular object resources and the target cold-start object resources;
[0048] A data generation module for generating object resource training data according to the target popular object resources and the target cold-start object resources.
[0049] Another aspect of the present disclosure provides a training device for an object resource recommendation model, including:
[0050] A model training module for training a model to be trained using object resource training data to obtain a trained object resource recommendation model, wherein the object resource training data is generated using the above-mentioned device.
[0051] Another aspect of the present disclosure provides an electronic device, including:
[0052] One or more processors;
[0053] A memory for storing one or more programs,
[0054] wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0055] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that are used to implement the method as described above when executed.
[0056] Another aspect of the present disclosure provides a computer program product that includes computer-executable instructions that are used to implement the method as described above when executed.
[0057] According to an embodiment of the present disclosure, by analyzing the operation characteristics of the original popular object resources, a first number of target popular object resources are determined from the original popular object resources, and by analyzing the operation characteristics of the original unpopular object resources, a second number of target unpopular object resources are determined from the original unpopular object resources, generating object resource training data, such that the ratio between the target popular object resources and the target unpopular object resources is less than the ratio between the original popular object resources and the original unpopular object resources, at least partially solving the technical problem in the related art that when training a model, using popular commodity data as the main training data results in insufficient training data and poor model recommendation accuracy. By making full use of popular and unpopular commodities, the technical effect of improving the sample balance of the number of popular and unpopular commodities in the training data and improving the recommendation accuracy of the object resource recommendation model is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Through the following description of the embodiments of the present disclosure with reference to the drawings, the above and other objects, features, and advantages of the present disclosure will become clearer. In the drawings:
[0059] Figure 1A Schematically shows a flowchart of a common recommendation system;
[0060] Figure 1B Schematically shows an exemplary system architecture to which the training data generation method, training method, and device according to the embodiments of the present disclosure can be applied;
[0061] Figure 2 Schematically shows a flowchart of a training data generation method according to an embodiment of the present disclosure;
[0062] Figure 3 Schematically shows a flowchart of a method for determining a first number of target popular object resources according to an embodiment of the present disclosure;
[0063] Figure 4 Schematically shows a schematic diagram of a training data generation method according to an embodiment of the present disclosure;
[0064] Figure 5 Schematically shows a block diagram of a training data generation apparatus according to an embodiment of the present disclosure; and
[0065] Figure 6 Schematically shows a block diagram of an electronic device suitable for implementing a training data generation method and an object resource recommendation model training method according to an embodiment of the present disclosure. Detailed implementation manners
[0066] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.
[0067] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0068] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0069] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include, but is not limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0070] In the embodiments of the present disclosure, in aspects such as the collection, update, analysis, processing, use, transmission, provision, disclosure, and storage of the involved data (for example, including but not limited to user personal information), all comply with the provisions of relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and to safeguard user personal information security and network security.
[0071] In the embodiments of the present disclosure, before obtaining or collecting user personal information, the authorization or consent of the user is obtained.
[0072] Figure 1A A schematic diagram of the process of a common recommendation system is schematically shown. In the recall stage of the product recommendation model in the recommendation system, generally thousands of candidate products are recalled from a huge (hundreds of millions) product pool according to the input keywords. In the ranking stage, the thousands of candidate products will be scored to determine the products (or product advertisements) finally shown to the user.
[0073] The training data for the current product recommendation model training comes from all the log data recorded during the previous system service. Since the log data mainly consists of popular products and rarely includes unpopular products, in the related art, when conducting model training, no differential screening strategy is implemented based on the different quantity distributions of popular products and unpopular products. As a result, the number of unpopular products appearing as positive samples in the training dataset is very small, and the product recommendation model does not learn sufficiently about such unpopular products, leading to poor recommendation effects for such products. Moreover, popular products account for too high a proportion in the training dataset, dominating the update of the parameters of the product recommendation model. When the product recommendation model is in service, it is more inclined to recommend popular products, resulting in the consequence that popular products become hotter and hotter, and unpopular products become colder and colder. The range of products recommended by the product recommendation model enters a vicious cycle of continuous contraction.
[0074] In view of this, the embodiments of the present disclosure provide a training data generation method, including: performing data conversion on the original object resource data to generate an object resource table, where the object resource table includes original popular object resources and original unpopular object resources; determining a first number of target popular object resources from the original popular object resources according to the operation characteristics of the original popular object resources; determining a second number of target unpopular object resources from the original unpopular object resources according to the operation characteristics of the original unpopular object resources, where the ratio between the original popular object resources and the original unpopular object resources is greater than the ratio between the target popular object resources and the target unpopular object resources; generating object resource training data according to the target popular object resources and the target unpopular object resources.
[0075] Figure 1BSchematically shown is an exemplary system architecture to which the training data generation method, training method, and apparatus according to embodiments of the present disclosure can be applied. It should be noted that Figure 1B The illustration is only an example of the system architecture to which embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that embodiments of the present disclosure cannot be used in other devices, systems, environments, or scenarios.
[0076] As shown in FIG. 1, the system architecture according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0077] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only examples).
[0078] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.
[0079] The server 105 may be a server that provides various services, such as a background management server that supports the websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (only an example). The background management server may analyze and process data such as received user requests, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0080] It should be noted that the training data generation method and training method provided in the embodiments of the present disclosure can generally be executed by the server 105. Correspondingly, the training data generation device and training device provided in the embodiments of the present disclosure can generally be set in the server 105. The training data generation method and training method provided in the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the training data generation device and training device provided in the embodiments of the present disclosure can also be set in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Alternatively, the training data generation method and training method provided in the embodiments of the present disclosure can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or can also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Correspondingly, the training data generation device and training device provided in the embodiments of the present disclosure can also be set in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or set in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0081] For example, the original object resource data can be originally stored in any one of the first terminal device 101, the second terminal device 102, or the third terminal device 103 (for example, the first terminal device 101, but not limited thereto), or stored on an external storage device and can be imported into the first terminal device 101. Then, the first terminal device 101 can execute the training data generation method and training method provided in the embodiments of the present disclosure locally, or send the original object resource data to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the original object resource data execute the training data generation method and training method provided in the embodiments of the present disclosure.
[0082] It should be understood that Figure 1B the numbers of the terminal devices, networks, and servers in
[0083] Figure 2 FIG. schematically shows a flowchart of a training data generation method according to an embodiment of the present disclosure.
[0084] As Figure 2 shown, the method includes operations S210~S240.
[0085] In operation S210, data conversion is performed on the original object resource data to generate an object resource table. Among them, the object resource table includes original popular object resources and original unpopular object resources.
[0086] According to an embodiment of the present disclosure, the original object resource data may be data recorded by the system service when the user browses the goods. For example, it may be goods with a relatively large number of user clicks, goods with a relatively small number of user clicks, and goods shown to the user that the user has never clicked.
[0087] According to an embodiment of the present disclosure, the original popular object resources may be goods that the user has clicked on relatively many times and is interested in; the original unpopular object resources may be goods shown to the user that the user has clicked on relatively few times or has not been clicked by the user.
[0088] According to an embodiment of the present disclosure, the object resource table may be a data statistical table with the object resource identifier as the key and other features as the value for the original object resource data. For example, other features may be the operation date carried by the original object resource, the numbering information of the original object resource, or the quantity information of the original object resource, etc.
[0089] According to an embodiment of the present disclosure, in the object resource table, the original object resource data corresponding to the same object resource identifier with a relatively large quantity may be regarded as the original popular object resources, and the original object resource data corresponding to the same object resource identifier with a relatively small quantity may be regarded as the original unpopular object resources.
[0090] According to an embodiment of the present disclosure, for example, if the quantity of the original object resource data with the object resource identifier of 11111 is significantly larger than that of the original object resource data with the object resource identifier of 22222, then the original object resource data with the object resource identifier of 11111 may be regarded as the original popular object resources, and the original object resource data with the object resource identifier of 22222 may be regarded as the original unpopular object resources.
[0091] In operation S220, according to the operation characteristics of the original popular object resources, a first number of target popular object resources are determined from the original popular object resources.
[0092] In operation S230, according to the operation characteristics of the original unpopular object resources, a second number of target unpopular object resources are determined from the original unpopular object resources, where the ratio between the original popular object resources and the original unpopular object resources is greater than the ratio between the target popular object resources and the target unpopular object resources.
[0093] According to an embodiment of the present disclosure, the operation feature may be the number of transactions of a user with respect to the original popular object resources. The object resource table may include multiple original popular object resources and multiple original unpopular object resources. For each of the multiple original popular object resources, each original popular object resource may include multiple original popular object resource data. Based on the number of transactions carried in each original popular object resource data, a first number of target popular object resources may be determined from the multiple original popular object resource data.
[0094] According to an embodiment of the present disclosure, for each of the multiple original unpopular object resources, each original unpopular object resource may include multiple original unpopular object resource data. Based on the number of transactions carried in each original unpopular object resource data, a second number of target unpopular object resources may be determined from the multiple original unpopular object resource data.
[0095] According to an embodiment of the present disclosure, the ratio between the original popular object resources and the original unpopular object resources in the object resource table is greater than the ratio between the first number of target popular object resources and the second number of target unpopular object resources, so as to improve the data balance between popular and unpopular items in the training data and enhance the recommendation effect of the recommendation model.
[0096] In operation S240, object resource training data is generated according to the target popular object resources and the target unpopular object resources.
[0097] According to an embodiment of the present disclosure, the first number of target popular object resources and the second number of target unpopular object resources may be subjected to data format conversion and reordering to generate object resource training data.
[0098] According to an embodiment of the present disclosure, the balance between the popular object resources and the unpopular object resources in the object resource training data is better than the balance between the original popular object resources and the original unpopular object resources, which can improve the sufficiency of the model for training the unpopular object resources.
[0099] According to an embodiment of the present disclosure, by operating characteristics of the original popular object resources, a first number of target popular object resources are determined from the original popular object resources, and by operating characteristics of the original unpopular object resources, a second number of target unpopular object resources are determined from the original unpopular object resources, so as to generate object resource training data, such that the ratio between the target popular object resources and the target unpopular object resources is less than the ratio between the original popular object resources and the original unpopular object resources, which at least partially solves the technical problem in the related art that when performing model training, using popular commodity data as the main training data results in insufficient training data and poor accuracy of model recommendation. By making full use of popular commodities and unpopular commodities, the technical effect of improving the sample balance of the number of popular commodities and the number of unpopular commodities in the training data and improving the recommendation accuracy of the object resource recommendation model is achieved.
[0100] According to an embodiment of the present disclosure, data conversion is performed on the original object resource data to generate an object resource table, including: extracting a resource identifier from the original object resource data to obtain an object resource identifier; grouping the original object resource data according to the object resource identifier to generate original object resource data corresponding to the object resource identifier; numbering the original object resource data corresponding to the same object resource identifier according to the operation date and the object resource identifier to obtain numbering information of the original object resource data; and storing the original object resource data with the object resource identifier, the original object resource data, the numbering information, and the operation date as dimensions to generate an object resource data table.
[0101] According to an embodiment of the present disclosure, the object resource table may include an object resource data table, and the original object resource data carries an operation date, and the operation date may be time information when a user operates on the original object resource.
[0102] According to an embodiment of the present disclosure, the original object resource data also carries an object resource identifier, the object resource identifier can be extracted from the object resource data, and each piece of original object resource data carries a corresponding object resource identifier. The object resource identifier is the unique identifier of the original object resource. Each original object resource may correspond to multiple pieces of original object resource data.
[0103] According to an embodiment of the present disclosure, the original object resource data can be grouped based on the object resource identifier to generate original object resource data corresponding to the object resource identifier. The same object resource identifier may correspond to multiple pieces of original object resource data, that is to say, one original object resource may correspond to multiple pieces of original object resource data.
[0104] According to an embodiment of the present disclosure, the generated raw object resource data corresponding to the object resource identifier can be sorted according to the operation date from the most recent to the most recent operation date, and the raw object resource data corresponding to the same object resource identifier can be numbered. For example, for an operation date of xx / xx / xx, the N pieces of raw object resource data corresponding to the object resource identifier 11111 can be numbered from 0 to N-1; and the M pieces of raw object resource data corresponding to the object resource identifier 22222 can be numbered from 0 to M-1.
[0105] According to an embodiment of the present disclosure, the original object resource data of each operation date may be stored with object resource identification, original object resource data, number information, and operation date as dimensions to generate an object resource data table, as shown in Table 1.
[0106] Table 1
[0107]
[0108] According to an embodiment of the present disclosure, based on the current time in Table 1, xx / x / z is closer to the current time than xx / x / y / x. The operation date in Table 1 is based on the current time, and the original object resource data is sorted from near to far.
[0109] According to an embodiment of the present disclosure, as can be seen from the example in Table 1, the number of original object resource data corresponding to object resource identifier 11111 is significantly greater than the number of original object resource data corresponding to object resource identifier 22222. Therefore, it can be considered that the original object resource corresponding to object resource identifier 11111 is the original popular object resource, and the original object resource corresponding to object resource identifier 22222 is the original unpopular object resource. For each operation date, for example, for xx year x month z day, the original object resource data corresponding to object resource identifier 11111 is numbered to obtain numbering information from 0 to 1000, and the original object resource data corresponding to object resource identifier 22222 is numbered to obtain numbering information from 0 to 2.
[0110] According to an embodiment of the present disclosure, the object resource table may further include an object resource count table; performing data conversion on the original object resource data to generate the object resource table may further include:
[0111] According to the numbering information, the number of original object resource data corresponding to the same object resource identifier is obtained; the number of original object resource data is stored with the object resource identifier, the number of original object resource data and the operation date as dimensions to generate an object resource counting table.
[0112] According to an embodiment of the present disclosure, the object resource count table may characterize the number of original object resource data corresponding to each original object resource for each operation date.
[0113] According to an embodiment of the present disclosure, based on the numbering information of the original object resource data corresponding to the object resource identifier in the object resource data table for each operation date, the number of original object resource data can be obtained.
[0114] According to an embodiment of the present disclosure, for example, with reference to Table 1 as an example, for the operation date of xx year, x month, z day, the numbering information of the original object resource data corresponding to the object resource identifier 11111 ranges from 0 to 1000, and the numbering information of the original object resource data corresponding to the object resource identifier 22222 ranges from 0 to 1. Therefore, for the operation date of xx year, x month, z day, the number of original object resource data corresponding to the object resource identifier 11111 is 1001, and the number of original object resource data corresponding to the object resource identifier 22222 is 2; similarly, for each operation date, the number of original object resource data corresponding to each object resource identifier can be counted. According to an embodiment of the present disclosure, with the object resource identifier, the number of original object resource data, and the operation date as dimensions, the number of original object resource data is stored to generate an object resource count table. As shown in Table 2 as an example.
[0115] Table 2
[0116]
[0117] According to an embodiment of the present disclosure, as can be seen from Table 2 as an example, for each operation date, the number of original object resource data corresponding to each object resource identifier.
[0118] It should be noted that the object resource identifier, the number of original object resource data, and the numbering information in Table 1 and Table 2 are all exemplary and do not limit the protection scope of the present disclosure.
[0119] Figure 3 A flowchart of a method for determining the first number of target popular object resources according to an embodiment of the present disclosure is schematically shown.
[0120] As Figure 3 shown, the method includes operations S310 to S330.
[0121] In operation S310, a first preset number threshold and a second preset number threshold for the target popular object resources are determined, where the first preset number threshold is greater than the second preset number threshold.
[0122] In operation S320, based on the first preset number threshold, the second preset number threshold, and the operation characteristics of the original popular object resources, the first number of the target popular object resources is determined.
[0123] In operation S330, determine the target popular object resource from the original popular object resources according to the first number of the target popular object resources.
[0124] According to an embodiment of the present disclosure, in combination with the example in Table 1, each object resource identifier in the object resource data table may include multiple pieces of original object resource data corresponding to the object resource identifier. For example, the number of original object resource data corresponding to the object resource identifier 11111 is 1001; if the original object resource corresponding to the object resource identifier 11111 is the original popular object resource, then for the original popular object resource with the object resource identifier 11111, the corresponding number of original popular object resource data is 1001.
[0125] According to an embodiment of the present disclosure, for example, taking the object resource identifier 11111 as an example, determine the maximum training data number and the minimum training data number of the corresponding target popular object resource required for training the recommendation model for the object resource identifier 11111, and use the maximum training data number as the first preset number threshold of the target popular object resource, and use the minimum training data number as the second preset number threshold of the target popular object resource.
[0126] According to an embodiment of the present disclosure, it should be noted that for determining the first preset number threshold and the second preset number threshold, those skilled in the art can set according to the actual situation during the training of the recommendation model, and no specific limitation is made here.
[0127] According to an embodiment of the present disclosure, the characteristics of the original popular object resource of the object resource identifier 11111 being operated by the user within the collected operation date can be obtained, for example, the number of times being clicked by the user; the characteristics of the original popular object resource of the object resource identifier 11111 being operated by the user within a certain period of time within the operation date can also be obtained, for example, the number of times being clicked by the user.
[0128] According to an embodiment of the present disclosure, the power calculation can be performed on the number of times the user clicks on the operated feature to obtain an intermediate number; then, the maximum value between the intermediate number and the second preset number threshold is calculated, and the minimum value between the maximum value determined between the intermediate number and the second preset number threshold and the first preset number threshold is calculated, and the minimum value between the obtained maximum value and the first preset number threshold is determined as the first number of the target popular object resource.
[0129] According to an embodiment of the present disclosure, according to the determined first number of the target popular object resource, the target popular object resource can be obtained from the corresponding original popular object resources of the object resource identifier 11111.
[0130] According to an embodiment of the present disclosure, for example, taking the object resource identifier 11111 as an example, the first preset number threshold of the corresponding target popular object resources required for training the recommendation model for the object resource identifier 11111 is 10000, the second preset number threshold is 20, and the click count of the operated feature is 10000 times.
[0131] According to an embodiment of the present disclosure, for example, it is possible to calculate the 0.8th power of the click count of 10000 times of the operated feature to obtain an intermediate number 1584; then find the maximum value between 1584 and the second preset number threshold 20, that is, the maximum value is 1584; then find the minimum value between 1584 and the first preset number threshold 10000, that is, the minimum value is 1584; then take the minimum value 1584 as the first number of the target popular object resources.
[0132] According to an embodiment of the present disclosure, according to the first number, data of the target popular object resources with the first number can be screened out from the original popular object resource data corresponding to the object resource identifier 11111.
[0133] According to an embodiment of the present disclosure, according to the above method, data of the target popular object resources with the first number can be screened out from the original popular object resource data corresponding to each object resource identifier.
[0134] According to an embodiment of the present disclosure, according to the operated feature of the original unpopular object resources, determining the second number of target unpopular object resources from the original unpopular object resources includes:
[0135] Determining a third preset number threshold and a fourth preset number threshold for the target unpopular object resources, where the third preset number threshold is greater than the fourth preset number threshold; determining the second number of the target unpopular object resources according to the third preset number threshold, the fourth preset number threshold, and the operated feature of the original unpopular object resources; determining the target unpopular object resources from the original unpopular object resources according to the second number of the target unpopular object resources.
[0136] According to an embodiment of the present disclosure, for the object resource identifier of each target unpopular object resource, the third preset number threshold can represent the maximum number of training data required for training the recommendation model using the target unpopular object resources corresponding to the object resource identifier; the fourth preset number threshold can represent the minimum number of training data required for training the recommendation model using the target unpopular object resources corresponding to the object resource identifier.
[0137] According to an embodiment of the present disclosure, the operation characteristics of the original unpopular object resources, for example, can be the number of user clicks. Based on the third preset number threshold, the fourth preset number threshold, and the operation characteristics, the second number of the target unpopular object resources can be determined. The implementation manner is similar to the implementation manner of determining the first number of the target popular object resources above, and details are not described herein again.
[0138] According to an embodiment of the present disclosure, it should be noted that for determining the third preset number threshold and the fourth preset number threshold, those skilled in the art can set them according to the actual situation during the training of the recommendation model, and specific limitations are not made herein.
[0139] According to an embodiment of the present disclosure, based on the determined second number, the target unpopular object resources corresponding to the object resource identifier can be determined from the original unpopular object resources.
[0140] According to an embodiment of the present disclosure, through the above method, the ratio between popular products and unpopular products in the training data can be reduced, thereby achieving the balance of the quantities of popular products and unpopular products in the training data and improving the sufficiency of the training of unpopular products by the recommendation model.
[0141] According to an embodiment of the present disclosure, determining the target popular object resources from the original popular object resources according to the first number of the target popular object resources includes:
[0142] Determining a filtering parameter from the object resource count table according to the first number of the target popular object resources, where the filtering parameter characterizes the operation date threshold and the number information threshold for determining the target popular object resources; determining the target popular object resources from the original popular object resources according to the operation date threshold and the number information threshold.
[0143] According to an embodiment of the present disclosure, determining the filtering parameter from the object resource count table according to the first number of the target popular object resources includes:
[0144] Querying the operation date corresponding to the object resource identifier from the object resource count table according to the object resource identifier corresponding to the original popular object resources; sequentially adding and summing the numbers of the original object resources corresponding to the operation dates according to the preset operation date order; in the case where the summation result and the first number satisfy the first preset relationship, using the last operation date in the summation as the operation date threshold of the target popular object resources; determining the number information threshold according to the first number and the numbers of the original popular object resources corresponding to the other operation dates except the last operation date in the summation result, where the number information threshold is one of the associated number information in the original popular object resources corresponding to the last operation date.
[0145] According to an embodiment of the present disclosure, for example, in combination with Table 2, taking the object resource identifier 11111 as an example, the first number of target popular object resources for the object resource identifier 11111 is determined to be 1584. Based on this first number, the data in Table 2 is queried, the records with the object resource identifier 11111 are filtered out from Table 2, and then based on this object resource identifier 11111, the operation date corresponding to the object resource identifier 11111 is determined from the resource count table.
[0146] According to an embodiment of the present disclosure, it is possible to start in the order of preset operation dates, for example, starting from the operation date closest to the current time (xx year x month z day), and use S += count cnt to sequentially sum up the numbers of the original popular object resources corresponding to the operation dates. For example, for the operation date xx year x month z day, the sum S1 = 1001.
[0147] According to an embodiment of the present disclosure, the first preset relationship can be that the summation result is greater than or equal to the first number. It can be determined that the summation result S1 and the first number do not satisfy the first preset relationship, so continue to sum the number of the original popular object resource data of the object resource identifier 11111 corresponding to the operation date xx year x month y day on the basis of the result of this summation S1, that is, S2 = S1 + 1501, and the summation result S2 = 2502 is obtained.
[0148] According to an embodiment of the present disclosure, it is determined that the summation result S2 and the first number satisfy the first preset relationship, then the last operation date in this summation is used as the operation date threshold of the target popular object resource, that is, xx year x month y day is the operation date threshold.
[0149] According to an embodiment of the present disclosure, the number information threshold can be determined based on the first number and the numbers of the original object resources corresponding to the other operation dates except the last operation date in the summation result that satisfies the first preset relationship. For example, the difference obtained by subtracting the number of the original popular object resources corresponding to the other operation dates (xx year x month y day) except the last operation date in the summation result from the first number can be used as the number information threshold, that is, 1584 - 1001, to get 583. Then, for the object resource identifier 11111, its filtering parameter can be (xx year x month y day, 583).
[0150] According to an embodiment of the present disclosure, the number information threshold can represent one of the numbered information associated with the original popular object resources corresponding to the last operation date. For example, it is necessary to determine 583 pieces of data (from numbered information 0 to 582) from the original object resource data corresponding to the last operation date (xx year x month y day), that is, one of the numbered information associated with the original object resources corresponding to the last operation date is 582.
[0151] According to an embodiment of the present disclosure, the implementation manner of determining the filtering parameter from the object resource count table according to the second number of target unpopular object resources is the same as the above manner and will not be elaborated in the present disclosure.
[0152] According to an embodiment of the present disclosure, according to the object resource identifier of the original popular object resource, traverse the operation date corresponding to the object resource identifier from the object resource data table; when the operation date corresponding to the object resource identifier and the operation date threshold satisfy a second preset relationship, store the original popular object resource corresponding to the operation date to obtain a first target popular object resource; when the operation date corresponding to the object resource identifier and the operation date threshold satisfy a third preset relationship, obtain the number information corresponding to the operation date from the object resource data table; according to the number information threshold, determine the target number information from the number information corresponding to the operation date, and store the original popular object resource corresponding to the target number information to obtain a second target popular object resource; determine the target popular object resource according to the first target popular object resource and the second target popular object resource.
[0153] According to an embodiment of the present disclosure, taking the object resource identifier 11111 as an example, based on the filtering parameter (operation date threshold xx year x month y day, number information threshold 583) corresponding to each object resource identifier 11111, according to the object resource identifier 11111, in the preset operation date order from the object resource data table, based on the distance from the current time, in the order from near to far, traverse the operation date corresponding to the object resource identifier 11111 in the object resource data table.
[0154] According to an embodiment of the present disclosure, the second preset relationship may be that based on the current time, the traversed operation date is closer to the current time than the operation date threshold is to the current time.
[0155] According to an embodiment of the present disclosure, if the traversed operation date and the operation date threshold satisfy the second preset relationship, then store all the original popular object resource data corresponding to the traversed operation date to obtain a first target popular object resource.
[0156] According to an embodiment of the present disclosure, when the first target popular object resource does not reach the first number, continue to traverse the operation date. When the next traversed operation date and the operation date threshold are the same time information, the original popular object resource data with the number information less than the number information threshold in the original popular object resource data corresponding to the next operation date can be stored, that is, the original popular object resource data before the number information threshold, as the second target popular object resource.
[0157] According to an embodiment of the present disclosure, if the traversed operation date is farther from the current time than the operation date threshold is from the current time, the original popular object resource data corresponding to the traversed operation date is discarded.
[0158] According to an embodiment of the present disclosure, the first target popular object resource and the second target popular object resource can be used as the final target popular object resources.
[0159] According to an embodiment of the present disclosure, the above method can be used to determine the target popular object resource corresponding to each object resource identifier. Similarly, the method for determining the target unpopular object resource is similar to the above method, and details are not elaborated herein.
[0160] According to an embodiment of the present disclosure, based on the filtering parameters, filtering the first number of target popular object resources and the second number of target unpopular object resources from the resource data table can avoid the splicing operation of large tables in the prior art, achieve only small-scale data aggregation and filtering of large table data, reduce the computing resource requirements for the data filtering task, and reduce the data filtering time-consuming.
[0161] According to an embodiment of the present disclosure, generating object resource training data according to the target popular object resource and the target unpopular object resource includes: converting the data formats of the target popular object resource and the target unpopular object resource; reordering the converted target popular object resource and the converted target unpopular object resource to generate object resource training data.
[0162] According to an embodiment of the present disclosure, the data format conversion is to convert the data of the target popular object resource and the target unpopular object resource into a format that can be read by model training; then group the converted target popular object resource and the converted target unpopular object resource based on the operation date, and randomly rearrange them within the operation date to obtain the training data.
[0163] According to an embodiment of the present disclosure, a method for training an object resource recommendation model is further provided, including:
[0164] Training the model to be trained with the object resource training data to obtain a trained object resource recommendation model, where the object resource training data is generated by using the above training data generation method.
[0165] According to an embodiment of the present disclosure, the model to be trained can be a deep learning model to be trained. Input the training data generated by using the above training data generation method into the model to be trained, train the deep learning model, and determine the trained deep learning model as the object resource recommendation model.
[0166] Figure 4Schematically shows a schematic diagram of a training data generation method according to an embodiment of the present disclosure.
[0167] As Figure 4As shown, data conversion is performed on the original object resource data to generate an object resource table 401. The object resource table 401 includes an object resource data table 401-1 and an object resource count table 401-2. The original popular object resource data and the original unpopular object resource data are stored in the object resource data table 401-1. The object resource data table 401 is generated with dimensions of object resource identifier id, original object resource data data, number information index, and operation date dt, and stores the original object resource data generated on the day of each operation date. The object resource count table 401-2 is generated with dimensions of object resource identifier id, the number cnt of the original object resource data, and operation date dt, and is used to store the number of the original object resource data generated on the day of each operation date. Based on each object resource identifier corresponding to the original popular object resource, according to the operation characteristics 402 of the original popular object resource, determine the first number 403 of the target popular object resource data corresponding to each object resource identifier. Based on each object resource identifier corresponding to the original unpopular object resource, according to the operation characteristics 404 of the original unpopular object resource, determine the second number 405 of the target unpopular object resource data corresponding to each object resource identifier. Based on the first number 403, query the object resource count table 401-2 to determine the filtering threshold 406 of the target popular object resource for each object resource identifier. Based on the second number 405, query the object resource count table 401-2 to determine the filtering threshold 407 of the target unpopular object resource for each object resource identifier. The filtering threshold includes an operation date threshold and a number information threshold. Based on the filtering threshold 406 of the target popular object resource, traverse the operation date and number information corresponding to the object resource identifier of the original popular object resource data in the object resource data table 401-1. If the operation date is closer to the current time than the operation date threshold is to the current time, that is, the operation date is greater than the operation date threshold, then retain the corresponding original popular object resource data as the first target popular object resource 408, or retain the corresponding original unpopular object resource data as the first unpopular object resource 409. If the operation date is equal to the current time as the operation date threshold is to the current time, that is, the operation date is equal to the operation date threshold, then retain the original popular object resource data with the number information less than the number information threshold as the second target popular object resource 410, or retain the original unpopular object resource data with the number information less than the number information threshold as the second unpopular object resource 411. If the operation date is farther from the current time than the operation date threshold is to the current time, that is, the operation date is less than the operation date threshold, then discard the corresponding original popular object resource data 412 or original unpopular object resource data 413.Generate a target popular object resource 414 based on a first target popular object resource 408 and a second target popular object resource 410; generate a target unpopular object resource 415 based on a first target unpopular object resource 409 and a second target unpopular object resource 411; perform data reconstruction based on the target popular object resource 414 and the target unpopular object resource 415 to generate training data 416.
[0168] Figure 5 Schematically shows a block diagram of a training data generation device according to an embodiment of the present disclosure.
[0169] As Figure 5 shown, the device 500 includes a data conversion module 510, a target popular object resource determination module 520, a target unpopular object resource determination module 530, and a data generation module 540.
[0170] The data conversion module 510 is configured to perform data conversion on the original object resource data to generate an object resource table, where the object resource table includes an original popular object resource and an original unpopular object resource.
[0171] The target popular object resource determination module 520 is configured to determine a first number of target popular object resources from the original popular object resources according to the operation characteristics of the original popular object resources.
[0172] The target unpopular object resource determination module 530 is configured to determine a second number of target unpopular object resources from the original unpopular object resources according to the operation characteristics of the original unpopular object resources, where the ratio between the original popular object resources and the original unpopular object resources is greater than the ratio between the target popular object resources and the target unpopular object resources.
[0173] The data generation module 540 is configured to generate object resource training data according to the target popular object resources and the target unpopular object resources.
[0174] According to an embodiment of the present disclosure, the object resource table includes an object resource data table, and the original object resource data carries an operation date; the data conversion module 510 includes: an identifier extraction sub-module, a grouping sub-module, a numbering sub-module, and a data table generation sub-module.
[0175] The identifier extraction sub-module is configured to extract a resource identifier from the original object resource data to obtain an object resource identifier.
[0176] The grouping sub-module is configured to group the original object resource data according to the object resource identifier to generate original object resource data corresponding to the object resource identifier.
[0177] A numbering sub-module, configured to number the original object resource data corresponding to the same object resource identifier according to the operation date and the object resource identifier, so as to obtain the numbering information of the original object resource data.
[0178] A data table generation sub-module, configured to store the original object resource data in dimensions of the object resource identifier, the original object resource data, the numbering information, and the operation date, so as to generate an object resource data table.
[0179] According to an embodiment of the present disclosure, the object resource table further includes an object resource count table; the data conversion module 510 further includes: a number obtaining sub-module and a technology table generation sub-module.
[0180] The number obtaining sub-module is configured to obtain the number of the original object resource data corresponding to the same object resource identifier according to the numbering information.
[0181] The technology table generation sub-module is configured to store the number of the original object resource data in dimensions of the object resource identifier, the number of the original object resource data, and the operation date, so as to generate an object resource count table.
[0182] According to an embodiment of the present disclosure, the target popular object resource determination module 520 includes: a first threshold determination sub-module, a first number determination sub-module, and a target popular object resource determination sub-module.
[0183] The first threshold determination sub-module is configured to determine a first preset number threshold and a second preset number threshold for the target popular object resource, wherein the first preset number threshold is greater than the second preset number threshold.
[0184] The first number determination sub-module is configured to determine the first number of the target popular object resource according to the first preset number threshold, the second preset number threshold, and the operation characteristics of the original popular object resource.
[0185] The target popular object resource determination sub-module is configured to determine the target popular object resource from the original popular object resources according to the first number of the target popular object resource.
[0186] According to an embodiment of the present disclosure, the target popular object resource determination sub-module includes: a filtering parameter determination unit and a target popular object resource determination unit.
[0187] The filtering parameter determination unit is configured to determine a filtering parameter from the object resource count table according to the first number of the target popular object resource, wherein the filtering parameter represents an operation date threshold and a numbering information threshold for determining the target popular object resource.
[0188] The target popular object resource determination unit is configured to determine the target popular object resource from the original popular object resources according to the operation date threshold and the numbering information threshold.
[0189] According to an embodiment of the present disclosure, the filtering parameter determination unit includes: an operation date query subunit, a summation subunit, an operation date threshold determination subunit, and a number information threshold determination subunit.
[0190] The operation date query subunit is configured to query, according to the object resource identifier corresponding to the original popular object resource, the operation date corresponding to the object resource identifier from the object resource count table.
[0191] The summation subunit is configured to sequentially perform superposition summation on the number of original popular object resources corresponding to the operation date according to a preset operation date order.
[0192] The operation date threshold determination subunit is configured to, when the summation result and the first number satisfy a first preset relationship, use the last operation date in the summation as the operation date threshold of the target popular object resource.
[0193] The number information threshold determination subunit is configured to determine a number information threshold according to the first number and the number of original object resources corresponding to other operation dates except the last operation date in the summation result, where the number information threshold is one of the associated number information in the original popular object resources corresponding to the last operation date.
[0194] According to an embodiment of the present disclosure, the target popular object resource determination unit includes: an operation date traversal subunit, a first target popular object resource obtaining subunit, a number information obtaining subunit, a second target popular object resource obtaining subunit, and a target popular object resource determination subunit.
[0195] The operation date traversal subunit is configured to traverse, according to the object resource identifier of the original popular object resource, the operation date corresponding to the object resource identifier from the object resource data table.
[0196] The first target popular object resource obtaining subunit is configured to, when the operation date corresponding to the object resource identifier and the operation date threshold satisfy a second preset relationship, store the original popular object resource corresponding to the operation date to obtain a first target popular object resource.
[0197] The number information obtaining subunit is configured to, when the operation date corresponding to the object resource identifier and the operation date threshold satisfy a third preset relationship, obtain the number information corresponding to the operation date from the object resource data table.
[0198] The second target popular object resource obtaining subunit is configured to determine target number information from the number information corresponding to the operation date according to the number information threshold, and store the original popular object resource corresponding to the target number information to obtain a second target popular object resource.
[0199] A target popular object resource determination subunit, configured to determine a target popular object resource according to a first target popular object resource and a second target popular object resource.
[0200] According to an embodiment of the present disclosure, the target unpopular object resource determination module includes: a third threshold determination sub-module, a second number determination sub-module, and a target unpopular object resource determination sub-module.
[0201] The third threshold determination sub-module is configured to determine a third preset number threshold and a fourth preset number threshold of the target unpopular object resource, where the third preset number threshold is greater than the fourth preset number threshold.
[0202] The second number determination sub-module is configured to determine a second number of the target unpopular object resource according to the third preset number threshold, the fourth preset number threshold, and the operation characteristics of the original unpopular object resource.
[0203] The target unpopular object resource determination sub-module is configured to determine the target unpopular object resource from the original unpopular object resource according to the second number of the target unpopular object resource.
[0204] According to an embodiment of the present disclosure, the data generation module 540 includes: a format conversion sub-module and a data generation sub-module.
[0205] The format conversion sub-module is configured to perform data format conversion on the target popular object resource and the target unpopular object resource.
[0206] The data generation sub-module is configured to reorder the converted target popular object resource and the converted target unpopular object resource to generate object resource training data.
[0207] According to an embodiment of the present disclosure, there is also provided a training device for an object resource recommendation model, including: a model training module.
[0208] The model training module is configured to train a model to be trained by using the object resource training data to obtain a trained object resource recommendation model, where the object resource training data is generated by using the above-mentioned training data generation device.
[0209] Any number of modules, sub-modules, units, and sub-units according to embodiments of the present disclosure, or at least part of the functions of any number thereof, may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to embodiments of the present disclosure may be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, and sub-units according to embodiments of the present disclosure may be at least partially implemented as a hardware circuit, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented by any other reasonable manner of integrating or packaging circuits, such as hardware or firmware, or may be implemented in any one of the three implementation manners of software, hardware, and firmware, or in a suitable combination of any several thereof. Alternatively, one or more of the modules, sub-modules, units, and sub-units according to embodiments of the present disclosure may be at least partially implemented as a computer program module, and when the computer program module is run, corresponding functions may be executed.
[0210] For example, any number of the data conversion module 510, the target popular object resource determination module 520, the target unpopular object resource determination module 530, and the data generation module 540 may be combined and implemented in one module / unit / sub-unit, or any one of the modules / units / sub-units may be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units may be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to embodiments of the present disclosure, at least one of the data conversion module 510, the target popular object resource determination module 520, the target unpopular object resource determination module 530, and the data generation module 540 may be at least partially implemented as a hardware circuit, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented by any other reasonable manner of integrating or packaging circuits, such as hardware or firmware, or may be implemented in any one of the three implementation manners of software, hardware, and firmware, or in a suitable combination of any several thereof. Alternatively, at least one of the identity recognition signal sending module, the data conversion module 510, the target popular object resource determination module 520, the target unpopular object resource determination module 530, and the data generation module 540 may be at least partially implemented as a computer program module, and when the computer program module is run, corresponding functions may be executed.
[0211] It should be noted that in the embodiments of the present disclosure, the training data generation device and the training device of the object resource recommendation model correspond to the training data generation method and the training method of the object resource recommendation model in the embodiments of the present disclosure. For the description of the data processing system part, please refer to the data processing method part specifically, and it will not be repeated here.
[0212] Figure 6 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0213] As Figure 6 shown, the electronic device according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage section 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), and so on. The processor 601 may also include on-board memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiments of the present disclosure.
[0214] In the RAM 603, various programs and data required for the operation of the electronic device 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 602 and / or the RAM 603. It should be noted that the program may also be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in one or more memories.
[0215] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, and the input / output (I / O) interface 605 is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. The drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read from it can be installed into the storage portion 608 as needed.
[0216] According to an embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure can be implemented as a computer software program. For example, the embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication portion 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described system, device, apparatus, module, unit, etc. can be implemented by computer program modules.
[0217] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0218] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0219] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include one or more memories other than the above-described ROM 602 and / or RAM 603 and / or ROM 602 and RAM 603.
[0220] An embodiment of the present disclosure also includes a computer program product, which includes a computer program. The computer program contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to cause the electronic device to implement the method provided by the embodiment of the present disclosure.
[0221] When the computer program is executed by the processor 601, the above functions defined in the system / apparatus of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described systems, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0222] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and be downloaded and installed through the communication part 609, and / or be installed from the removable medium 611. The program code contained in the computer program may be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0223] In accordance with embodiments of the present disclosure, program code for executing the computer programs provided by the embodiments of the present disclosure may be written in any combination of one or more programming languages. Specifically, these computing programs may be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming languages include, but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0224] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions. Those skilled in the art can understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.
[0225] The above describes the embodiments of the present disclosure. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present disclosure.
Claims
1. A method for generating training data, comprising: Performing data conversion on the original object resource data to generate an object resource table, wherein the object resource table includes original popular object resources and original unpopular object resources; Determining a first number of target popular object resources from the original popular object resources according to the operation characteristics of the original popular object resources; Determining a second number of target unpopular object resources from the original unpopular object resources according to the operation characteristics of the original unpopular object resources, wherein the ratio between the original popular object resources and the original unpopular object resources is greater than the ratio between the target popular object resources and the target unpopular object resources; Generating object resource training data according to the target popular object resources and the target unpopular object resources.
2. The method according to claim 1, wherein, The object resource table includes an object resource data table, and the original object resource data carries an operation date; the performing data conversion on the original object resource data to generate an object resource table includes: Extracting a resource identifier from the original object resource data to obtain an object resource identifier; Grouping the original object resource data according to the object resource identifier to generate the original object resource data corresponding to the object resource identifier; Numbering the original object resource data corresponding to the same object resource identifier according to the operation date and the object resource identifier to obtain the numbering information of the original object resource data; Storing the original object resource data in dimensions of the object resource identifier, the original object resource data, the numbering information, and the operation date to generate the object resource data table.
3. The method according to claim 2, wherein, The object resource table further includes an object resource count table; the performing data conversion on the original object resource data to generate an object resource table further includes: Obtaining the number of the original object resource data corresponding to the same object resource identifier according to the numbering information; Storing the number of the original object resource data in dimensions of the object resource identifier, the number of the original object resource data, and the operation date to generate the object resource count table.
4. The method according to claim 3, wherein The determining a first number of target popular object resources from the original popular object resources according to the operation characteristics of the original popular object resources includes: Determining a first preset number threshold and a second preset number threshold for the target popular object resources, wherein the first preset number threshold is greater than the second preset number threshold; Determining the first number of the target popular object resources according to the first preset number threshold, the second preset number threshold, and the operation characteristics of the original popular object resources; Determining the target popular object resources from the original popular object resources according to the first number of the target popular object resources.
5. The method according to claim 4, wherein, The determining the target popular object resources from the original popular object resources according to the first number of the target popular object resources includes: Determine a filtering parameter from the object resource count table according to the first number of the target popular object resources, where the filtering parameter characterizes an operation date threshold and a number information threshold for determining the target popular object resources; Determine the target popular object resources from the original popular object resources according to the operation date threshold and the number information threshold.
6. The method according to claim 5, wherein, The determining the filtering parameter from the object resource count table according to the first number of the target popular object resources includes: Query the operation date corresponding to the object resource identifier from the object resource count table according to the object resource identifier corresponding to the original popular object resources; Sequentially perform superposition summation on the numbers of the original popular object resources corresponding to the operation dates according to a preset operation date order; In the case where the summation result and the first number satisfy a first preset relationship, use the last operation date in the summation as the operation date threshold of the target popular object resources; Determine the number information threshold according to the first number and the numbers of the original object resources corresponding to the other operation dates except the last operation date in the summation result, where the number information threshold is one of the number information associated with the original popular object resources corresponding to the last operation date.
7. The method according to claim 5, wherein The determining the target popular object resources from the original popular object resources according to the operation date threshold and the number information threshold includes: Traverse the operation dates corresponding to the object resource identifier from the object resource data table according to the object resource identifier of the original popular object resources; In the case where the operation date corresponding to the object resource identifier and the operation date threshold satisfy a second preset relationship, store the original popular object resources corresponding to the operation date to obtain the first target popular object resources; In the case where the operation date corresponding to the object resource identifier and the operation date threshold satisfy a third preset relationship, obtain the number information corresponding to the operation date from the object resource data table; Determine the target number information from the number information corresponding to the operation date according to the number information threshold, and store the original popular object resources corresponding to the target number information to obtain the second target popular object resources; Determine the target popular object resources according to the first target popular object resources and the second target popular object resources.
8. The method according to claim 1, wherein The determining the second number of target unpopular object resources from the original unpopular object resources according to the operation characteristics of the original unpopular object resources includes: Determine a third preset number threshold and a fourth preset number threshold for the target unpopular object resources, where the third preset number threshold is greater than the fourth preset number threshold; Determine the second number of the target unpopular object resources according to the third preset number threshold, the fourth preset number threshold, and the operation characteristics of the original unpopular object resources; Determine the target cold object resources from the original cold object resources according to the second number of the target cold object resources.
9. The method according to claim 1, wherein The generating object resource training data according to the target hot object resources and the target cold object resources includes: Perform data format conversion on the target hot object resources and the target cold object resources; Reorder the converted target hot object resources and the converted target cold object resources to generate object resource training data.
10. A method for training an object resource recommendation model, including: Train a model to be trained using object resource training data to obtain a trained object resource recommendation model, wherein the object resource training data is generated using the method according to any one of claims 1 to 9.
11. A training data generation device, including: A data conversion module for performing data conversion on the original object resource data to generate an object resource table, where the object resource table includes original hot object resources and original cold object resources; A target hot object resource determination module for determining a first number of target hot object resources from the original hot object resources according to the operation characteristics of the original hot object resources; A target cold object resource determination module for determining a second number of target cold object resources from the original cold object resources according to the operation characteristics of the original cold object resources, where the ratio between the original hot object resources and the original cold object resources is greater than the ratio between the target hot object resources and the target cold object resources; A data generation module for generating object resource training data according to the target hot object resources and the target cold object resources.
12. An object resource recommendation model training device, including: A model training module for training a model to be trained using object resource training data to obtain a trained object resource recommendation model, wherein the object resource training data is generated using the device according to claim 11.
13. An electronic device, including: One or more processors; A memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.
14. A computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor implements the method according to any one of claims 1 to 10.
15. A computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Resource recommendation method, device and equipment and computer readable storage medium
CN116244491A
Collaborative filtering recommendation method and personalized content recommendation method, system, equipment and terminal thereof
CN119357484A
Method, apparatus and system for processing an access request in a content delivery system
US20220279036A1