Sample generation method and apparatus, computer-readable storage medium, and computer device
By obtaining the resource transfer data and time after the network media information is released and determining the target feature data, the problem of feature crossing in machine learning model training is solved, and the model training efficiency and prediction accuracy are improved.
Patent Information
- Application Number
- CN201911365416.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-26
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2040-09-13
AI Technical Summary
There is a feature crossing problem in the existing machine learning model training process, which leads to low model training efficiency and poor prediction accuracy.
By obtaining the resource transfer data of the target product after the network media information is released, the information release time and resource transfer time are determined, the target feature data is determined from the pre-stored candidate feature data, and the model training samples are generated.
It improves the efficiency of model training samples, enhances the model prediction ability, and improves the accuracy of model prediction results.
Smart Images

Figure CN111160566B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a sample generation method and device, a computer readable storage medium and a computer equipment. BACKGROUND
[0002] At present, with the rapid development of artificial intelligence technology, using artificial intelligence methods such as machine learning or deep learning to solve practical problems has gradually become a trend of the times.
[0003] However, in the modeling process of the existing machine learning model, feature crossing often occurs, which leads to very poor online effect of the model. For example, during model training, the result is incorrectly used as the cause, which not only leads to low accuracy of the data used for model training, but also leads to inconsistency between the current learning rule of the model and the fact, thereby leading to poor prediction accuracy of the final model and other problems.
[0004] Therefore, the model training sample in the prior art has the problem of low efficiency of training the model. SUMMARY
[0005] Therefore, it is necessary to provide a sample generation method and device, a computer readable storage medium and a computer equipment to solve the technical problem of low efficiency of training the model in the prior art.
[0006] In one aspect, the present application provides a sample generation method, comprising: obtaining resource transfer data of a target commodity after network media information is put into the market; the resource transfer data includes resource transfer time; determining the information putting time of the network media information, and determining the target feature data from at least two groups of candidate feature data according to the information putting time and the resource transfer time; and generating a model training sample according to the target feature data and the resource transfer data.
[0007] In another aspect, the present application provides a sample generation device, comprising: a data acquisition module for acquiring resource transfer data of a target commodity after network media information is put into the market; the resource transfer data includes resource transfer time; a feature determination module for determining the information putting time of the network media information, and determining the target feature data from at least two groups of candidate feature data according to the information putting time and the resource transfer time; and a sample generation module for generating a model training sample according to the target feature data and the resource transfer data.
[0008] In yet another aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the following steps: obtaining resource transfer data of a target commodity after network medium information is put into the network; the resource transfer data comprising resource transfer time; determining information putting time of the network medium information, and determining target feature data from at least two groups of candidate feature data pre-stored according to the information putting time and the resource transfer time; and generating model training samples according to the target feature data and the resource transfer data.
[0009] In yet another aspect, an embodiment of the present application provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program: obtaining resource transfer data of a target commodity after network medium information is put into the network; the resource transfer data comprising resource transfer time; determining information putting time of the network medium information, and determining target feature data from at least two groups of candidate feature data pre-stored according to the information putting time and the resource transfer time; and generating model training samples according to the target feature data and the resource transfer data.
[0010] The above sample generation method, device, computer readable storage medium and computer device can obtain resource transfer data of a target commodity after network medium information is put into the network, obtain resource transfer time in the resource transfer data, and then determine target feature data from at least two groups of candidate feature data pre-stored according to the information putting time and the resource transfer time after determining information putting time of the network medium information, so as to generate model training samples by combining the target feature data and the resource transfer data obtained in the previous steps. By using the method, the efficiency of model training samples can be improved by obtaining target feature data at a specific time, and the prediction ability of the model can be enhanced, and the accuracy of the prediction result of the model can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 An application environment diagram of the sample generation method in an embodiment;
[0012] Figure 2 A structural block diagram of the computer device in an embodiment;
[0013] Figure 3 A flowchart of the sample generation method in an embodiment;
[0014] Figure 4 A flowchart of the target feature data determination step in an embodiment;
[0015] Figure 5 A flowchart of the resource transfer data obtaining step in an embodiment;
[0016] Figure 6 a flowchart of a prediction result obtaining step in an embodiment;
[0017] Figure 7 a flowchart of model training data construction in an embodiment;
[0018] Figure 8 a structural block diagram of a sample generation apparatus in an embodiment. DETAILED DESCRIPTION
[0019] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0020] First of all, it needs to be pointed out that the sample generation method proposed in the present application can be actually applied to a delayed consumption scenario, which specifically refers to a scenario in which the effect of network media information placement cannot be immediately obtained after the network media information is placed for a target commodity, but the success or failure of the network media information placement can be determined within a predetermined period of time, for example, a delayed consumption scenario of issuing a coupon, a delayed consumption scenario of placing an advertisement, etc., which may have a user not consuming at the time of the current network media information placement, but consuming using the network media information after a period of time.
[0021] Figure 1 An application environment diagram of the sample generation method in an embodiment. The sample generation method provided by the present application can be applied to an application environment as shown in Figure 1 The user terminal 110 communicates with the server 120 through a network, and the user terminal 110 can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a mobile phone, a tablet computer, a notebook computer, etc., the server 120 can be implemented by an independent server or a server cluster composed of multiple servers, and the network includes but is not limited to a wide area network, a metropolitan area network or a local area network.
[0022] In actual application, the server 120 can place specified network media information to the user terminal 110, and after the user terminal 110 receives the network media information, the user terminal 110 can operate the network media information within a predetermined period of time, thereby generating information operation behavior data, and the server 120 can convert the information operation behavior data into model training available data, i.e., model training samples, after obtaining the information operation behavior data. The model referred to can be a machine learning model or a deep learning model.
[0023] Figure 2 An internal structure diagram of a computer device in an embodiment is shown. The computer device specifically can beFigure 1 The server 120 in the computer device 100 is configured to execute a computer program to implement a sample generation method. Figure 2 As shown in the figure, the computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with external computer devices through network connection. The computer program is executed by the processor to implement a sample generation method.
[0024] Those skilled in the art can understand that the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. Figure 2 As shown in the figure, in one embodiment, a sample generation method is provided. This embodiment mainly takes the method applied to the server 120 in the computer device 100 described above as an example.
[0025] Figure 3 The sample generation method specifically includes the following steps: Figure 1 Figure 3 S302, obtaining resource transfer data of the target commodity after the network medium information is put; the resource transfer data includes resource transfer time.
[0026] The target commodity can be a virtual network object that needs to be extracted as a monitoring object to generate model training samples in a sample generation process. The virtual network object can be classified according to commodity attributes, such as cars, food, clothes, etc.
[0027] The network medium information can be network promotion medium information for the target commodity, such as coupons, advertisements, etc.
[0028] The resource transfer data can be resource transfer related data when the user transfers or exchanges values between the network medium information and the target commodity, such as value exchange time (resource transfer time), value exchange amount (resource transfer amount), value transfer order number (resource transfer order number), etc.
[0029] The resource transfer data can be resource transfer related data when the user transfers or exchanges values between the network medium information and the target commodity, such as value exchange time (resource transfer time), value exchange amount (resource transfer amount), value transfer order number (resource transfer order number), etc.
[0030] The resource transfer time can be referred to as a sampling time (a time of collecting a sample), and specifically can refer to a time when the user transfers or exchanges values with the target commodity through the network medium information, for example, the user purchases a car using a coupon on October 10, 2019, and the resource transfer time is October 10, 2019.
[0031] Specifically, the server 120 can first construct the network medium information of the target commodity before obtaining the resource transfer data of the target commodity, and then put the network medium information, that is, upload the network medium information to the Internet for network publicity, so that when the user transfers resources with the target commodity through the network medium information, the server 120 can further obtain the resource transfer data generated by the target commodity.
[0032] For example, the current target commodity is a car, and the server 120 controls the advertisement of the car to be online on September 25, 2019, and the user purchases the car on October 10, 2019, so the server 120 can determine that the resource transfer time of the car is October 10, 2019.
[0033] S304, determining an information putting time of the network medium information, and determining target feature data from at least two groups of candidate feature data according to the information putting time and the resource transfer time.
[0034] The information putting time can be referred to as a sample time (a time of constructing the network medium information to be put), and specifically can refer to a time of generating the network medium information of the target commodity and putting, for example, an online coupon putting time, an advertisement broadcast time, etc.
[0035] The candidate feature data can be user features, commodity features, and activity keyword features pre-set and stored in the database of the server 120, for example, user gender, user age, commodity attention, commodity attribute, shopping festival activity keyword (such as holiday keyword), etc.
[0036] The target feature data can be candidate feature data associated with the information putting time as a sample generation reason in a sample generation process.
[0037] Specifically, after the server 120 obtains the resource transfer data of the target commodity, the server 120 can further determine the information putting time of the network medium information corresponding to the target commodity, and then determine the target feature data of the sample required for generating the model for training by comparing the information putting time and the resource transfer time in the at least two groups of candidate feature data.
[0038] It should be noted that the at least two groups of candidate feature data pre-stored by the server 120 each have a corresponding feature generation time, that is, there is a mapping relationship between a group of candidate feature data and a feature generation time. After the server 120 determines the information delivery time of the network medium information, the server 120 needs to further extract the sample used for training the feature data generation model. Then, the feature generation time can be determined by comparing the information delivery time and the resource transfer time, and the target feature data currently used can be further determined by using the feature generation time.
[0039] For example, the online delivery time of the coupon is September 25, 2019, and the resource transfer time of the target commodity is October 10, 2019. Therefore, the information delivery time and the resource transfer time are not the same time point. At this time, the sample generation method is applied to construct a prediction model in a delayed consumption scenario. The information delivery time (online delivery time of the coupon) can be used to determine the target feature data from the candidate feature data pre-stored by the server 120, that is, the feature generation time of the target feature data is mapped to September 25, 2019.
[0040] S306, generating a model training sample according to the target feature data and the resource transfer data.
[0041] The model training sample can be data required for model training, that is, data generated when a user uses network medium information to transfer resources to a target commodity, for example, the user uses a coupon to purchase a target commodity.
[0042] Specifically, the model training sample can be used to train a machine learning prediction model or a deep learning prediction model applied in a delayed consumption scenario. To generate the model training sample, the target feature data and the resource transfer data need to be determined, and the combination of the two can obtain data used for model training.
[0043] More specifically, after the model training sample is used to train a machine learning prediction model or a deep learning prediction model, in a delayed consumption scenario, the user demand degree of the target commodity corresponding to the network medium information can be obtained by using the trained prediction model, so as to realize accurate delivery of the network medium information by using the user demand degree.
[0044] In this embodiment, the server can obtain the resource transfer time in the resource transfer data after the target commodity is put in the network medium information, and then determine the target feature data from the pre-stored at least two groups of candidate feature data by using the information putting time and the resource transfer time after determining the information putting time of the network medium information, so as to generate the model training sample by using the target feature data and the resource transfer data combination obtained in the previous step. By using this method, the efficiency of the model training sample can be improved by obtaining the target feature data at a specific time, and the model prediction ability can be enhanced, and the accuracy of the model prediction result can be improved.
[0045] As shown in Figure 4 In one embodiment, the information putting time of the network medium information is determined in step S304, and the target feature data is determined from the pre-stored at least two groups of candidate feature data according to the information putting time and the resource transfer time, which specifically includes the following steps:
[0046] S3042, determining the information putting time of the network medium information.
[0047] Specifically, the server 120 can obtain the information putting time of the network medium information by obtaining the historical log data of the target commodity after determination, that is, the historical log data records information data related to the operation of the target commodity, and the information data includes the information putting time of the network medium information.
[0048] S3044, matching the information putting time with the resource transfer time.
[0049] Specifically, the server 120 can compare the information putting time with the resource transfer time to realize the matching task of the information putting time and the resource transfer time.
[0050] For example, the time relationship between the information putting time September 25, 2019 and the resource transfer time October 10, 2019 is compared.
[0051] S3046, if the information putting time and the resource transfer time are not matched, the target feature data is determined from the pre-stored at least two groups of candidate feature data according to the information putting time.
[0052] Specifically, if the server 120 determines that the information putting time and the resource transfer time are not matched, that is, the sampling time (resource transfer time) and the sample time (information putting time) are not the same time point, the sample time (information putting time) can be used to extract the target feature data when constructing the sample data, and then the model training sample is generated.
[0053] For example, the information delivery time for generating the model training sample is September 25, 2019, and the resource transfer time is October 10, 2019, which are not at the same time point. Therefore, the information delivery time September 25, 2019 is selected as the determination time of the target feature data, and the data having a mapping relationship with September 25, 2019 is obtained from the pre-stored candidate feature data as the target feature data.
[0054] In this embodiment, the target feature data is determined by matching the information delivery time and the resource transfer time, which can avoid feature traversal in the model training process, that is, the result is not used as the cause in the model training, which not only can further reproduce the situation in the model prediction, so that the data used in the model training matches the fact, but also can further improve the model prediction ability and the accuracy of the model prediction result.
[0055] In one embodiment, if the information delivery time and the resource transfer time do not match in step S3046, the target feature data is determined from the pre-stored at least two groups of candidate feature data according to the information delivery time, which specifically includes the following steps:
[0056] S30462, if the information delivery time and the resource transfer time do not match, the candidate feature data matching the information delivery time is determined from the pre-stored at least two groups of candidate feature data as the target feature data.
[0057] Specifically, the server 120 further determines the candidate feature data matching the information delivery time as the target feature data, which can be to first determine the feature generation time of each candidate feature data, and then match the feature generation time with the information delivery time to determine the candidate feature data corresponding to the feature generation time matching the information delivery time as the target feature data, which is used to generate the model training sample when the current information delivery time and the resource transfer time do not match.
[0058] In this embodiment, the server determines the target feature data using the information delivery time when the information delivery time and the resource transfer time do not match, which not only can further improve the efficiency of the model training sample, but also can improve the model prediction ability using the effective model training sample, and further improve the accuracy of the model prediction result.
[0059] As shown in FIG. 2, in one embodiment, the resource transfer data of the target commodity after the network media information delivery is obtained in step S302, which specifically includes the following steps: Figure 5
[0060] S3022, the historical log data of the target commodity after the network media information delivery is obtained.
[0061] The historical log data may refer to the real-time status data of the target product.
[0062] Specifically, the resource transfer data of the target product is generated when the resource transfer occurs in the target product, and the resource transfer action includes the role of network media information. The server 120 obtains the resource transfer data of the target product after the network media information is released, which can be executed by obtaining and monitoring the historical log data of the target product after the network media information is released.
[0063] S3024, read the resource transfer status in the historical log data.
[0064] The resource transfer status may refer to the value transfer storage status of the target product, for example, a transferred status or an untransferred status.
[0065] Specifically, the server 120 may obtain the resource transfer data of the target product by monitoring the changes in the resource transfer status in the historical log data in real time.
[0066] S3026: When the resource transfer state is the transferred state, determine the historical log data as the resource transfer data.
[0067] Specifically, when the server 120 reads and monitors that the resource transfer status is the transferred status, it may determine the currently existing historical log data as the resource transfer data of the target product.
[0068] In this embodiment, the server can obtain the resource transfer status of the target product, determine the timing of obtaining the resource transfer data, and then obtain the resource transfer data of the target product after the network media information is released. This can not only improve the efficiency of obtaining the resource transfer data, but also further improve the efficiency of the model training samples, thereby improving the model prediction ability and the accuracy of the model prediction results.
[0069] like Figure 6 As shown, in one embodiment, after generating the model training samples according to the target feature data and the resource transfer data in step S306, the following steps are specifically included:
[0070] S3082: Input the model training samples into the user demand prediction model.
[0071] Among them, the user demand prediction model can refer to an algorithm model used to calculate the user's demand for the current network media information. This model can be applied to delayed consumption scenarios to realize user demand prediction for the network media information corresponding to the target product.
[0072] Specifically, after the server 120 generates the model training sample by using the target feature data and the resource transfer data, the server 120 can input the model training sample into the user demand degree prediction model to calculate the demand degree of the user for the current network medium information.
[0073] For example, whether the user is interested in a certain coupon is predicted.
[0074] S3084, obtaining the prediction result output by the user demand degree prediction model to obtain the user demand degree of the network medium information.
[0075] Specifically, the output result of the user demand degree prediction model, i.e., the user demand degree of the network medium information currently targeted at the target commodity, is obtained, and the user demand degree is used to perform information delivery to the targeted user group to improve the business index of the actual application scenario.
[0076] In this embodiment, the server can input the generated model training sample into the user demand degree prediction model to obtain the user demand degree of the network medium information, so as to determine the targeted delivery population of the network medium information by using the user demand degree, thereby improving the business index of the actual application scenario and meeting the user demand.
[0077] In one embodiment, in step S3084, the prediction result output by the user demand degree prediction model is obtained to obtain the user demand degree of the target commodity after the network medium information is delivered, and specifically includes the following steps:
[0078] S30842, obtaining the prediction result output by the user demand degree prediction model by using a preset recommendation algorithm to obtain the user demand degree of the network medium information.
[0079] Specifically, by using the preset recommendation algorithm, the prediction ability of the server 120 for the user demand degree of the network medium information can be improved, and the server 120 can calculate the real demand of the user for the network medium information corresponding to the target commodity.
[0080] In this embodiment, the server can calculate the user demand degree of the network medium information by using the preset recommendation algorithm, thereby improving the prediction ability of the model and improving the accuracy of the prediction result of the model.
[0081] In one embodiment, the preset recommendation algorithm includes any one of a content-based recommendation algorithm, a collaborative filtering algorithm, a rule-based recommendation algorithm, a utility-based recommendation algorithm, and a knowledge-based recommendation algorithm.
[0082] The content-based recommendation algorithm can be an algorithm that discovers the relevance of an item or content according to the metadata of the recommended item or content, and then recommends similar items to the user based on the user's past preference records.
[0083] The collaborative filtering algorithm can refer to an algorithm for making recommendations by only understanding the relationship between users and items without considering the attributes of the items themselves.
[0084] The rule-based recommendation algorithm can be an association rule-based recommendation algorithm, that is, an algorithm that takes association rules as the basis and takes the purchased goods as the rule head and the recommended objects as the rule body.
[0085] The utility-based recommendation algorithm can refer to an algorithm established on the basis of the utility of the use of items by users, the core problem of which is how to create a utility function for each user, and therefore, the user profile model is largely determined by the utility function used by the system.
[0086] The knowledge-based recommendation algorithm can refer to a reasoning technology.
[0087] Specifically, in actual application, the server 120 can determine to use any one of the above recommendation algorithms according to the project requirements to calculate the user demand degree of the network medium information corresponding to the target goods.
[0088] In this embodiment, a plurality of recommendation algorithms are provided for the server to use when actually calculating and predicting the control model, which can further improve the prediction efficiency and accuracy of the model.
[0089] In order to facilitate those skilled in the art to further understand the embodiments of the present application, the following will combine Figure 7 a specific example to explain. Figure 7 is a flowchart of model training data construction in the embodiments of the present application, which is applied to the "WeChat payment coupon recommendation business scenario" in the delayed consumption scenario.
[0090] As can be seen from Figure 7 , it includes three stages of model modeling: data preparation, model training, and model prediction. Among them, the present application mainly provides a model training data construction scheme in the data preparation stage, that is, how to generate sample data for model training. First, the timeline content in the Figure 7 will be explained, including "WeChat payment side designated coupon putting plan" (a kind of coupon putting plan is constructed) on September 25, 2019, "exposure of a user to a coupon" (exposure of network medium information-coupon) on September 30, 2019, "user redemptions the coupon received in a store" (the user uses the coupon to make a transaction) on October 10, 2019, and "constructing model training data" on October 11, 2019.
[0091] It can be determined that on October 10, 2019, when the user uses the coupon to perform the resource transfer operation on the target commodity, the model training sample is generated, but the sample generation time is actually the sampling time. The feature data generated using the sampling time is prone to feature crossing problems, and therefore the target feature data generated at the sample time, i.e., the feature data generated at the sample time associated with September 25, 2019, needs to be further acquired.
[0092] After determining that September 25, 2019 is the sample time, the target feature data generated on September 24, 2019 is actually used, because before September 25, 2019, the "WeChat payment side designated coupon distribution plan" (a kind of coupon distribution plan is constructed), the server 120 actually has pre-stored feature data at this time point. Therefore, the server 120 currently constructs the model training data using the "T+N" combined feature sample mode, i.e., using the features at time T (September 24, 2019) and the samples at time T+N (October 10, 2019) to construct the model training data, rather than the "T+1" combined feature sample mode: the features at time T (October 9, 2019) and the samples at time T+1 (October 10, 2019).
[0093] In the above embodiments, the efficiency of the model training sample can be improved by acquiring the target feature data at a specific time, thereby enhancing the model prediction capability and further improving the accuracy of the model prediction result.
[0094] It should be understood that, although Figures 3-6 The steps in the flowchart of the method are displayed in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, Figures 3-6 At least part of the steps in the method can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0095] As shown in Figure 8 In one embodiment, a sample generation apparatus 800 is provided, which can be arranged in a sample generation system and used to execute the above-mentioned sample generation method. The sample generation apparatus 800 specifically includes a data acquisition module 802, a feature determination module 804, and a sample generation module 806, wherein:
[0096] The data acquisition module 802 is configured to acquire resource transfer data of the target commodity after the network medium information is put into the market, and the resource transfer data comprises a resource transfer time.
[0097] The feature determination module 804 is configured to determine an information putting time of the network medium information, and determine target feature data from the pre-stored at least two groups of candidate feature data according to the information putting time and the resource transfer time.
[0098] The sample generation module 806 is configured to generate a model training sample according to the target feature data and the resource transfer data.
[0099] In one embodiment, the feature determination module 804 is further configured to determine the information putting time of the network medium information, match the information putting time with the resource transfer time, and if the information putting time and the resource transfer time do not match, determine the target feature data from the pre-stored at least two groups of candidate feature data according to the information putting time.
[0100] In one embodiment, the feature determination module 804 is further configured to, if the information putting time and the resource transfer time do not match, determine candidate feature data matching the information putting time from the pre-stored at least two groups of candidate feature data as the target feature data.
[0101] In one embodiment, the data acquisition module 802 is further configured to acquire historical log data of the target commodity after the network medium information is put into the market, read a resource transfer state in the historical log data, and determine the historical log data as the resource transfer data when the resource transfer state is a transferred state.
[0102] In one embodiment, the sample generation apparatus 800 further comprises a prediction result acquisition module configured to input the model training sample into a user demand degree prediction model, and acquire a prediction result output by the user demand degree prediction model to obtain a user demand degree of the network medium information.
[0103] In one embodiment, the prediction result acquisition module is further configured to acquire the prediction result output by the user demand degree prediction model by using a preset recommendation algorithm to obtain the user demand degree of the network medium information.
[0104] In this embodiment, the server can obtain the resource transfer time in the resource transfer data by obtaining the resource transfer data of the target commodity after the network medium information is put, and then determine the target feature data from the pre-stored at least two groups of candidate feature data by using the information putting time and the resource transfer time after determining the information putting time of the network medium information, so as to generate the model training sample by using the target feature data and the resource transfer data combination obtained in the previous step. By using this scheme, the efficiency of the model training sample can be improved by obtaining the target feature data at a specific time, and the model prediction ability is further enhanced, and the accuracy of the model prediction result can be further improved.
[0105] In one embodiment, the sample generation apparatus provided by the present application can be implemented in the form of a computer program, which can run on a computer device as shown in the drawings. Figure 2 The memory of the computer device can store various program modules constituting the sample generation apparatus, such as the data acquisition module 802, the feature determination module 804, and the sample generation module 806 as shown in the drawings. The computer program composed of various program modules makes the processor execute the steps in the sample generation method of each embodiment of the present application described in the specification. Figure 8
[0106] For example, Figure 2 The computer device can execute step S302 by the data acquisition module 802 in the sample generation apparatus as shown in the drawings. The computer device can execute step S304 by the feature determination module 804. The computer device can execute step S306 by the sample generation module 806. Figure 8
[0107] In one embodiment, a computer device is provided, which includes a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the above-mentioned sample generation method. The steps of the sample generation method can be the steps in the sample generation method of each embodiment described above.
[0108] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the above-mentioned sample generation method. The steps of the sample generation method can be the steps in the sample generation method of each embodiment described above.
[0109] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiment methods can be included. Any reference to memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0110] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0111] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method of sample generation, characterized by, The method is applied to a delayed consumption scenario of issuing coupons, and a model training sample construction of the delayed consumption scenario adopts a T+N combined feature sample mode, and includes the following steps. Obtain resource transfer data generated by a target user when the target user purchases a target product using network medium information after the network medium information is issued to the target user for a period of time; the resource transfer data includes a resource transfer time; the resource transfer time is a T+N time in the T+N combined feature sample mode; and the network medium information includes a coupon; Determine an information delivery time of the network medium information, compare the information delivery time with the resource transfer time, and if the information delivery time and the resource transfer time do not match, determine candidate feature data with a feature generation time earlier than the information delivery time from at least two groups of pre-stored candidate feature data as target feature data; the target feature data is used as a sample generation reason in a sample generation process; the information delivery time is a time when the network medium information is generated and delivered for a target product; the feature generation time of the target feature data is a T time in the T+N combined feature sample mode; and the candidate feature data is user features, product features, and activity keyword features pre-set and stored in a server database, wherein each group of candidate feature data has a mapping relationship with a corresponding feature generation time; Generate a model training sample according to the target feature data and the resource transfer data; the model training sample is used to train a prediction model, and the trained prediction model is used to predict user demand for the network medium information.
2. The method of claim 1, wherein, The obtaining of the resource transfer data generated by the target user when the target user purchases the target product using the network medium information after the network medium information is issued to the target user for a period of time includes: Obtain historical log data of the target product after the network medium information is delivered; Read a resource transfer state in the historical log data; When the resource transfer state is a transferred state, determine the historical log data as the resource transfer data.
3. The method of claim 1, wherein, After the model training sample is generated according to the target feature data and the resource transfer data, the method further includes: Input the model training sample into a user demand prediction model; Obtain a prediction result output by the user demand prediction model to obtain user demand for the network medium information.
4. The method of claim 3, wherein, The obtaining of the prediction result output by the user demand prediction model includes: Obtain the prediction result output by the user demand prediction model through a preset recommendation algorithm to obtain user demand for the network medium information.
5. The method of claim 4, wherein, The preset recommendation algorithm includes any one of a content-based recommendation algorithm, a collaborative filtering algorithm, a rule-based recommendation algorithm, a utility-based recommendation algorithm, and a knowledge-based recommendation algorithm.
6. A sample generating apparatus, characterized by comprising: The device is used for model training sample construction of a delayed consumption scenario of issuing coupons, the model training sample construction of the delayed consumption scenario adopts a T+N combination feature sample mode, and the device comprises: a data acquisition module, configured to acquire resource transfer data generated by a target user when the target user purchases a target product by using network medium information after the network medium information is issued to the target user for a period of time; the resource transfer data comprises a resource transfer time; the resource transfer time is a T+N time in the T+N combination feature sample mode; and the network medium information comprises a coupon; a feature determination module, configured to determine an information issuing time of the network medium information, compare the information issuing time with the resource transfer time, and determine candidate feature data with a feature generation time earlier than the information issuing time as target feature data from at least two groups of candidate feature data pre-stored in a server database if the information issuing time and the resource transfer time do not match; the target feature data is used as a sample generation reason in a sample generation process; the information issuing time is a time when the network medium information is generated and issued for the target product; the feature generation time of the target feature data is a T time in the T+N combination feature sample mode; and the candidate feature data is user features, product features, and activity keyword features pre-set and stored in the server database, wherein each group of candidate feature data has a mapping relationship with a corresponding feature generation time; a sample generation module, configured to generate a model training sample according to the target feature data and the resource transfer data; and the model training sample is used for training a prediction model, and the trained prediction model is used for predicting a user demand degree for the network medium information.
7. The apparatus of claim 6, wherein, The data acquisition module is further configured to: acquire historical log data of the target product after the network medium information is issued; read a resource transfer state in the historical log data; and when the resource transfer state is a transferred state, determine the historical log data as the resource transfer data.
8. The apparatus of claim 6, wherein, The device further comprises a prediction result acquisition module, configured to: input the model training sample into a user demand degree prediction model; acquire a prediction result output by the user demand degree prediction model to obtain a user demand degree for the network medium information.
9. The apparatus of claim 8, wherein, The prediction result acquisition module is further configured to: acquire the prediction result output by the user demand degree prediction model by using a preset recommendation algorithm to obtain the user demand degree for the network medium information.
10. The apparatus of claim 9, wherein, The preset recommendation algorithm comprises any one of a content-based recommendation algorithm, a collaborative filtering algorithm, a rule-based recommendation algorithm, a utility-based recommendation algorithm, and a knowledge-based recommendation algorithm.
11. A computer readable storage medium, storing a computer program, the computer program being executed by a processor to make the processor execute steps of the method in any one of claims 1 to 5.
12. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement steps of the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Differential discount coupon issuing method based on user access time period
CN110135899A