Processing method and device and electronic equipment

Through the generative model trained by adversarial networks, the combination of generative modules and discriminative modules solves the limitations of the existing technology when dealing with counterfactual problems, and achieves more accurate product profit margin prediction.

CN119477395APending Publication Date: 2025-02-18LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411548274.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing product pricing algorithm has limitations in dealing with counterfactual issues, and it is difficult to effectively deal with customers' adjustments to product factor values ​​during negotiations, resulting in insufficient predicted profit margins.

Method used

The generative model is used based on adversarial network training, and the generation module and discriminative module are combined to reason about the expected value information corresponding to the counterfactual element values ​​through the distinction between fact and counterfactual sample element values.

Benefits of technology

It improves the effectiveness of deep learning algorithms in prediction and decision-making, can better deal with counterfactual problems and achieve more accurate product profit margin prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477395A_ABST
    Figure CN119477395A_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and device and electronic equipment, and the method comprises the steps: obtaining target information which comprises the attribute characteristics of a target object, fact value information, a fact element value and an anti-fact element value; and reasoning the anti-fact factor value by using the generative model based on the attribute features, the fact value information and the fact factor value to obtain expected value information corresponding to the anti-fact factor value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a processing method, device and electronic equipment. Background Art

[0002] Currently, it is very common to predict product data through data processing platforms or servers.

[0003] However, how to make better predictions on product data becomes a problem. Summary of the invention

[0004] The technical solution of this application is as follows:

[0005] The first aspect of the present application provides a processing method, comprising:

[0006] Obtaining target information, the target information including attribute characteristics, fact value information, fact element values, and counterfactual element values ​​of a target object;

[0007] The generative model is used to infer the counterfactual element value based on the attribute feature, the fact value information and the fact element value to obtain the expected value information corresponding to the counterfactual element value.

[0008] The counterfactual element value is obtained in the following way:

[0009] Obtaining fact element adjustment description information, wherein the fact element adjustment description information is used to adjust the fact element value according to the user intention description;

[0010] Based on the fact element adjustment description information, the fact element value is adjusted to obtain a counterfactual element value.

[0011] The generative model is obtained based on adversarial network training;

[0012] The adversarial network at least includes:

[0013] A generating module, at least for determining, based on the sample attribute characteristics of the target object, the fact sample value information, the fact sample element value and at least one counterfactual sample element value, first predicted value information corresponding to the fact sample element value and at least one second predicted value information corresponding to the at least one counterfactual sample element value;

[0014] A discriminant module, configured to determine a set of probabilities based on the first prediction value information and the at least one second prediction value information; the set of probabilities represents the probability that the first prediction value information and the at least one second prediction value information are derived from the fact sample element value;

[0015] Parameters of the generation module and the determination module are adjusted based on at least the loss determined by the fact sample value information, the first prediction value information and the set of probabilities.

[0016] The generative model is based on the adversarial network training process, including:

[0017] Keeping the parameters of the discrimination module unchanged, updating the parameters of the generation module based on at least a first loss and a second loss; the first loss represents the difference between the first prediction value information and the fact sample value information; the second loss represents the difference between the set of probabilities and a set of true labels; the set of true labels is used to mark the input from the fact sample element value as a fact, and to mark the input from the counterfactual sample element value as a counterfactual;

[0018] Keep the parameters of the generation module unchanged, and update the parameters of the discrimination module based on the second loss.

[0019] The adversarial network also includes:

[0020] a value control module, configured to determine control value information corresponding to the at least one second predicted value information;

[0021] Keeping the parameters of the discrimination module unchanged, and updating the parameters of the generation module based on at least the first loss and the second loss, comprising:

[0022] Keep the parameters of the discrimination module unchanged, and update the parameters of the generation module based on the first loss, the second loss and the third loss; the third loss represents the difference between the at least one second prediction value information and the regulation value information.

[0023] The value control module includes:

[0024] A supervision module, used to process the sample attribute characteristics and fact sample element values ​​of the target object to obtain the supervision value information of the target object;

[0025] The price increase module is used to perform price increase processing on the supervision value information to obtain the regulation value information.

[0026] The generating module is at least used to determine, based on the sample attribute characteristics of the target object, the fact sample value information, the fact sample element value and the at least one counterfactual sample element value, the first predicted value information corresponding to the fact sample value information and the at least one second predicted value information corresponding to the at least one counterfactual sample element value, including:

[0027] The generation module is used to determine the first predicted value information corresponding to the factual sample value information and at least one second predicted value information corresponding to the at least one counterfactual sample element value based on the sample attribute characteristics of the target object, the factual sample value information, the factual sample element value, random noise and at least one counterfactual sample element value.

[0028] The at least one counterfactual sample element value is obtained by:

[0029] Determining a uniform distribution based on the fact sample element values ​​of the target object;

[0030] Random sampling is performed in the uniform distribution, and at least one random number obtained by random sampling is used as at least one counterfactual sample element value.

[0031] Another aspect of the present application provides a processing device, comprising:

[0032] An obtaining unit, configured to obtain target information, wherein the target information includes attribute characteristics, fact value information, fact element values, and counterfactual element values ​​of a target object;

[0033] The reasoning unit is used to use the generation model to infer the counterfactual element value based on the attribute characteristics, the fact value information and the fact element value to obtain the expected value information corresponding to the counterfactual element value.

[0034] A third aspect of the present application provides an electronic device, including:

[0035] A memory for storing at least one set of instructions;

[0036] The processor is used to call and execute the instruction set in the memory, and execute any one of the processing methods described above by executing the instruction set. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0038] Figure 1 A schematic flow chart of a processing method provided for the first embodiment of the present application;

[0039] Figure 2 A schematic diagram of an implementation scenario of a processing method provided in this application;

[0040] Figure 3A schematic diagram of another implementation scenario of a processing method provided in this application;

[0041] Figure 4 A schematic diagram of another implementation scenario of a processing method provided in this application;

[0042] Figure 5 A schematic diagram of another implementation scenario of a processing method provided in this application;

[0043] Figure 6 A schematic diagram of another implementation scenario of a processing method provided in this application;

[0044] Figure 7 It is a structural schematic diagram of a processing device provided in this application. DETAILED DESCRIPTION

[0045] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0046] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0047] The terms "first", "second" etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, and this is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, object or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, objects or equipment.

[0048] In product sales, sales or pricing personnel often need to make flexible price adjustments based on customer inquiries. The factor values ​​such as the purchase volume, transaction size, and duration of the product listed on the inquiry are important bases for estimating profit margins in pricing strategies. However, customers often try to adjust these factor values ​​in negotiations to get a more favorable price. This adjustment of factor values ​​and the price changes caused by it can be called a "counterfactual problem."

[0049] To address this problem, existing product pricing algorithms, such as segmented pricing algorithms, can provide profit margin estimates for RFQs based on historical order data, but they have obvious limitations when dealing with counterfactual problems. Segmented pricing algorithms usually divide historical RFQs into several categories and estimate profit margins based on historical order data for each category. However, when key elements of an RFQ change, it may be difficult to find a matching category, making it impossible to give effective profit margin recommendations.

[0050] Therefore, the present application provides a processing method to improve the prediction and decision-making effects of deep learning algorithms, so that they can better deal with counterfactual problems and achieve more accurate prediction of product profit margins.

[0051] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0052] Reference Figure 1 , is a flowchart of a processing method provided in the first embodiment of the present application. The method can be applied to electronic devices. The present application does not limit the product type of the electronic device. For example, Figure 1 As shown, the method may include but is not limited to the following steps:

[0053] Step S101: Obtain target information, where the target information includes attribute characteristics, fact value information, fact element values, and counterfactual element values ​​of a target object.

[0054] In this embodiment, the attribute characteristics of the target object can be used to describe the attributes of the target object. For example, if the target object may include a laptop computer, the attribute characteristics of the target object can be used to describe the configuration of the laptop computer (e.g., brand, model, processor type, memory size, screen size, etc.) and customer purchase behavior (e.g., customer region, company size, purchase frequency, etc.).

[0055] The fact element value can be understood as the objectively existing value of the element of the target object under specific scenarios or conditions. The fact element value can include one type or multiple types of fact element values. For example, if the target object can include a target product (such as a mobile phone, a laptop, etc.), the fact element value can include the objective purchase quantity value of the target product in the inquiry form (such as 20 pieces), the transaction size value (such as the total transaction amount is 60,000 yuan), and the duration value (such as the payment period is 6 months).

[0056] Factual value information can be understood as the value that can be obtained based on the factual element value. For example, if the factual element value can include: the value of the purchase quantity, transaction scale and duration of the objectively existing inquiry form of the target product, the factual value information can include the profit rate that can be obtained by trading the target product through the purchase quantity, transaction scale and duration values ​​in the inquiry form.

[0057] The counterfactual element value can be understood as: the value obtained after a hypothetical change to the factual element value. Corresponding to the factual element value that can include a type or multiple types of factual element values, each counterfactual element value can also include a type or multiple types of counterfactual element values. For example, assuming that the purchase quantity in the inquiry increases from 20 to 30 pieces, assuming that the transaction scale in the inquiry increases from 60,000 yuan to 80,000 yuan, assuming that the duration in the inquiry is shortened from 6 months to 4 months, the counterfactual element value is the purchase quantity of 30 pieces, the transaction scale of 80,000 yuan and the duration of 4 months.

[0058] Step S102: Use the generative model to infer the counterfactual element value based on the attribute characteristics, fact value information and fact element value to obtain the expected value information corresponding to the counterfactual element value.

[0059] In this embodiment, the generative model can be trained based on the sample attribute characteristics of the target object, the fact sample value information, the fact sample element value and at least one counterfactual sample element value, so that the generative model can learn the common features between the fact space (i.e., the data space constructed based on the fact sample element value, the sample attribute characteristics and the fact sample value information) and the counterfactual space (i.e., the data space constructed based on the counterfactual sample element value), and improve the ability of the fact space to generalize to the counterfactual space, that is, improve the ability of the generative model to apply the knowledge learned from the fact space to the counterfactual space. For example, in the laptop pricing scenario, the generative model can learn the impact of the purchase volume, transaction size, duration, configuration and purchase behavior of the laptop on the profit margin, and then apply the learned knowledge to infer the expected profit margin under the purchase volume, transaction size and duration in the counterfactual space.

[0060] In this embodiment, target information is obtained, and the target information includes attribute characteristics, fact value information, fact element values ​​and counterfactual element values ​​of the target object. The generative model is used to infer the counterfactual element values ​​based on the attribute characteristics, the fact value information and the fact element values. During the inference process, the common features between the fact space and the counterfactual space learned by the generative model can be used to ensure the rationality of the expected value information corresponding to the inferred counterfactual element values.

[0061] As another optional embodiment of the present application, a processing method is provided for the second embodiment of the present application. This embodiment is mainly an implementation method of the process of determining the counterfactual element value in the first embodiment above. The counterfactual element value can be obtained by but not limited to the following methods:

[0062] Step S11: obtaining fact element adjustment description information, wherein the fact element adjustment description information is used to adjust the fact element value according to the user intention description;

[0063] In this embodiment, the fact factor adjustment description information may include but is not limited to: adjustment factors: clearly indicating the fact factors that need to be adjusted, such as purchase volume, transaction scale, duration, etc.; adjustment method: describing the specific method of adjustment, whether it is increase, decrease, extension or shortening, etc.; adjustment range: giving the specific value or proportion of the adjustment, such as the purchase volume increases by 10 items, the transaction scale increases by 20%, the duration is shortened by 1 month, etc.

[0064] In this embodiment, the fact element adjustment description information can be obtained through a variety of methods such as user interface, voice input, text input, etc.

[0065] Step S12: Based on the fact element adjustment description information, the fact element value is adjusted to obtain a counterfactual element value.

[0066] In this embodiment, the fact element adjustment description information can be parsed to obtain the adjustment elements, methods and amplitudes. According to the parsed adjustment elements, methods and amplitudes, the fact element value is adjusted to obtain the adjusted counterfactual element value. For example, the fact element value may include a purchase quantity of 20 pieces, a transaction scale of 60,000 yuan, and a duration of 6 months. The user intends to increase the purchase quantity by 10 pieces, keep the transaction scale unchanged, and shorten the duration by 1 month. The parsed adjustment information may include: purchase quantity +10 pieces, transaction scale unchanged, and duration -1 month. The counterfactual element value obtained after adjusting the fact element value may include: purchase quantity 30 pieces, transaction scale 60,000 yuan, and duration 5 months.

[0067] In this embodiment, by obtaining the fact element adjustment description information, the user's adjustment intention can be accurately understood, including the fact elements that need to be adjusted, the specific adjustment method and the adjustment range, which helps to ensure that the automatic adjustment of the fact element value can meet the user's expectations and obtain the counterfactual element value that meets the user's intention.

[0068] As another optional embodiment of the present application, a processing method is provided for the third embodiment of the present application. This embodiment is mainly an implementation method of the generation model in the above-mentioned first embodiment. The generation model can be obtained based on adversarial network training.

[0069] Adversarial networks can include at least:

[0070] The generation module can at least be used to determine the first predicted value information corresponding to the factual sample element value and at least one second predicted value information corresponding to the at least one counterfactual sample element value based on the sample attribute characteristics of the target object, the factual sample value information, the factual sample element value and at least one counterfactual sample element value.

[0071] In this embodiment, the sample attribute characteristics, the fact sample value information, and the fact sample element value can be determined based on the historical information of the target object.

[0072] For an understanding of the sample attribute characteristics, please refer to the relevant introduction to the attribute characteristics of the target object mentioned above, which will not be repeated here.

[0073] The fact sample element value can be understood as the value of the element of the target object that actually occurred in a specific scenario or condition.

[0074] The fact sample value information can be understood as the value actually obtained based on the fact sample element value.

[0075] The first predicted value information can be understood as the value that the target object may obtain under the fact sample element value generated by the generation module.

[0076] The second predicted value information can be understood as: the value that the target object may obtain under the counterfactual sample element value generated by the generation module.

[0077] In this embodiment, there may be multiple fact sample element values, and the generation module may include: an input layer, a sharing layer, a self-attention layer, an attention layer, and an output layer.

[0078] For example, Figure 2 As shown, the input layer can be used to receive the sample attribute features of the target object (which can be expressed as X), the fact sample value information (which can be expressed as Y (E f )) and the fact sample element value (which can be expressed as E f ).

[0079] The shared layer can extract features from sample attribute features, fact sample value information and fact sample element values ​​to obtain a high-dimensional feature vector.

[0080] The input of the self-attention layer can include multiple counterfactual sample feature values ​​(which can be represented as E c1 、E c2 ,......,E cn-1) and the high-dimensional feature vector output by the sharing layer, the self-attention layer can rearrange the data of the high-dimensional feature vector and multiple counterfactual element values ​​to obtain multiple element groups (which can be expressed as element heads). The correlation between the counterfactual sample element values ​​and the factual sample element values ​​of the same type can be captured in the element group. For example, corresponding to the factual sample element value, it can include: the value of the factual sample purchase amount, the value of the factual sample transaction scale, and the value of the factual sample duration. The multiple element groups may include: the purchase amount group (which can be expressed as a purchase amount head), the transaction scale group (which can be expressed as a transaction scale head), and the duration group (which can be expressed as a duration head). In the purchase amount group, the correlation between the value of the counterfactual sample purchase amount and the value of the factual sample purchase amount can be captured, and in the transaction scale group, the correlation between the value of the counterfactual sample transaction scale and the value of the factual sample transaction scale can be captured. In the duration group, the correlation between the value of the counterfactual sample duration and the value of the factual sample duration can be captured.

[0081] The attention layer can be used to capture the data relationship between each element group, determine how the values ​​of each type of elements jointly affect the value of the target object, and further enrich the generation module's ability to predict the value of the target object.

[0082] The output layer can be used to output the first prediction value information (which can be expressed as ) and at least one second prediction value information (which can be expressed as ).

[0083] The discriminant module may be used to determine a set of probabilities (which may be expressed as P ) based on the first prediction value information and at least one second prediction value information. g1 , P g2 , P g3 …P gn ). g1 Corresponding to the first prediction value information, P g2 , P g3 …P gn Corresponding to each second prediction value information in sequence.

[0084] The discriminant module may include: an input layer, a multi-layer network and an output layer.

[0085] The input layer can be used to receive the sample attribute characteristics of the target object and the first prediction value information and at least one second prediction value information output by the generation module.

[0086] The multi-layer network can be used to extract features for distinguishing the first prediction value information and at least one second prediction value information as being from factual sample element values ​​based on the sample attribute features of the target object.

[0087] The output layer can be used to output a set of probabilities, which can represent the probability size of the first prediction value information and at least one second prediction value information coming from the fact sample element value.

[0088] Parameters of the generation module and the discrimination module may be adjusted based on at least the loss determined by the fact sample value information, the first predicted value information and the set of probabilities.

[0089] For example, the parameters of the generation module can be adjusted based on the loss determined by the fact sample value information and the first predicted value information and the loss determined by a set of probabilities. The parameters of the discrimination module can be adjusted based on the loss determined by a set of probabilities.

[0090] The generation module trained through adversarial training can be used as a generation model.

[0091] In this embodiment, the loss determined by the fact sample value information and the first prediction value information can ensure that the generation module will not arbitrarily fabricate values ​​when predicting, thereby ensuring the rationality of the second prediction value information. The loss determined by a set of probabilities can enable the discriminant module to assist the generation module in learning the common features between the fact space and the counterfactual space through adversarial training. When the discriminant module has difficulty distinguishing true and false prediction value information (i.e., the probability values ​​in the output set of probability values ​​are relatively close to each other), it can be considered that the performance of the generation module has been significantly improved.

[0092] In this embodiment, the fact sample element value may include multiple types of element values, such as purchase amount, transaction size, and duration, etc. Through adversarial training, the generation module can learn the situation where multiple types of element values ​​change at the same time, so as to more accurately predict the expected predicted value corresponding to the counterfactual element value.

[0093] As another optional embodiment of the present application, a processing method is provided for the fourth embodiment of the present application. This embodiment is mainly an implementation method of the training process of generating a model in the third embodiment above. Figure 3 The process of generating a model based on adversarial network training may include but is not limited to the following steps:

[0094] Step S21, keep the parameters of the discrimination module unchanged, and update the parameters of the generation module based on at least the first loss and the second loss.

[0095] The first loss may represent the difference between the first prediction value information and the fact sample value information. In this embodiment, the root mean square error between the first prediction value information and the fact sample value information may be determined, and the root mean square error may be used as the first loss (which may be expressed as L G1 ).

[0096] The second loss can characterize the difference between a set of probabilities and a set of true labels. A set of true labels can be used to mark inputs from factual sample element values ​​as facts, and to mark inputs from counterfactual sample element values ​​as counterfactual. Inputs from factual sample element values ​​can be marked as 1, and inputs from counterfactual sample element values ​​can be marked as 0. For example, if the inputs of the discriminant module are the first prediction value information (which can be expressed as ) and each second prediction value information (which can be expressed as ), a set of true labels can be 100…0.

[0097] In this embodiment, the cross entropy between a set of probabilities and a set of true labels can be determined, and the cross entropy is used as the second loss (which can be expressed as L D ).

[0098] In this embodiment, the first loss and the second loss can be normalized to obtain the normalized first loss and the second loss, and the normalized first loss and the second loss can be weighted based on the first weight factor corresponding to the first loss and the second weight factor corresponding to the second loss to obtain the weighted loss. The parameters of the discrimination module can be kept unchanged, and the parameters of the generation module can be updated based on the weighted loss using an optimization algorithm (such as gradient descent) to minimize the weighted loss, so that the generation module can more accurately learn the common features of the fact space and the counterfactual space, thereby improving the ability of the fact space to generalize to the counterfactual space.

[0099] The first weight factor may represent the importance of the first loss, and the second weight factor may represent the importance of the second loss.

[0100] Step S22: keep the parameters of the generation module unchanged, and update the parameters of the discrimination module based on the second loss.

[0101] In this embodiment, the parameters of the generation module can be kept unchanged, and the parameters of the discrimination module can be updated based on the second loss using an optimization algorithm (e.g., gradient descent) to minimize the second loss, thereby improving the discrimination module's ability to distinguish between true and false predictive value information (i.e., predictive value information from factual sample element values ​​and predictive value information from counterfactual sample element values).

[0102] Under the alternating execution of steps S21 and S22, the generation module attempts to generate more and more realistic prediction value information to deceive the discrimination module, and the discrimination module can continuously improve its ability to distinguish to more accurately identify true and false prediction value information. The generation module and the discrimination module are gradually optimized. When the training end condition is met (such as the first loss and the second loss converge), steps S21 and S22 can be ended. The generation module obtained after the training can be used as a generation model.

[0103] In this embodiment, by alternately updating the parameters of the generation module and the discrimination module, the performance of the generation module and the discrimination module can be continuously optimized, the reasoning ability and robustness of the generation module can be improved, the generation module can learn the common characteristics of the fact space and the counterfactual space, and improve the ability of the fact space to generalize to the counterfactual space, thereby ensuring the accuracy of the generation module's reasoning on the counterfactual element values ​​and the rationality of the expected value information corresponding to the counterfactual element values.

[0104] As another optional embodiment of the present application, a processing method is provided for the fifth embodiment of the present application. This embodiment is mainly an implementation method of the generation model in the above-mentioned first embodiment. The generation model can be obtained based on adversarial network training; the adversarial network can include: a generation module, a discrimination module and a value regulation module.

[0105] In this embodiment, the understanding of the generation module and the discrimination module can refer to the relevant introduction in the third embodiment, which will not be repeated here.

[0106] The value control module can be used to determine the control value information corresponding to at least one second predicted value information.

[0107] The value regulation module can determine a potential value higher or lower than the second predicted value information as needed, that is, the regulated value information.

[0108] Reference Figure 4 The process of generating a model based on adversarial network training may include but is not limited to the following steps:

[0109] Step S31, keep the parameters of the discrimination module unchanged, and update the parameters of the generation module based on the first loss, the second loss and the third loss.

[0110] In this embodiment, the understanding of the first loss and the second loss can refer to the relevant introduction of the first loss and the second loss in the fourth embodiment, which will not be repeated here.

[0111] The third loss may characterize a difference between at least one second predictive value information and the regulatory value information.

[0112] In this embodiment, the root mean square error between at least one second prediction value information and the control value information can be determined, and the root mean square error is used as the third loss (which can be expressed as L G2 ).

[0113] In this embodiment, the first loss, the second loss, and the third loss can be normalized to obtain the normalized first loss, the second loss, and the third loss. Based on the first weight factor corresponding to the first loss, the second weight factor corresponding to the second loss, and the third weight factor corresponding to the third loss, the normalized first loss, the second loss, and the third loss can be weighted to obtain the weighted loss. The parameters of the discrimination module can be kept unchanged, and the parameters of the generation module can be updated based on the weighted loss using an optimization algorithm (such as gradient descent) to minimize the weighted loss, so that the generation module can more accurately learn the common features of the factual space and the counterfactual space, improve the ability of the factual space to generalize to the counterfactual space, and guide the generation module to perform value information regulation (such as value information enhancement).

[0114] The first weight factor may represent the importance of the first loss, the second weight factor may represent the importance of the second loss, and the third weight factor may represent the importance of the third loss.

[0115] Step S31 is an implementation of step S21 in the fourth implementation.

[0116] Step S32: keep the parameters of the generation module unchanged, and update the parameters of the discrimination module based on the second loss.

[0117] The detailed process of step S32 can refer to the relevant introduction of step S22 in the fourth embodiment, which will not be repeated here.

[0118] Under the alternating execution of steps S31 and S32, the generation module performs low-risk value information regulation (e.g., value information enhancement) while trying to generate more and more realistic prediction value information to deceive the discrimination module, and the discrimination module can continuously improve its ability to distinguish to more accurately identify true and false prediction value information. The generation module and the discrimination module are gradually optimized. When the training end condition is met (e.g., the first loss, the second loss, and the third loss converge), steps S31 and S32 can be terminated. The generation module obtained after the training can be used as a generation model.

[0119] In this embodiment, by alternately updating the parameters of the generation module and the discrimination module, the performance of the generation module and the discrimination module can be continuously optimized, the reasoning ability and robustness of the generation module can be improved, and the generation module can learn the common characteristics of the factual space and the counterfactual space, and enhance the ability of the factual space to generalize to the counterfactual space. The generation module can also learn value information regulation (such as value information enhancement), while ensuring the rationality of the expected value information corresponding to the counterfactual element value, and achieving the enhancement of the expected value information.

[0120] As another optional embodiment of the present application, a processing method is provided for the sixth embodiment of the present application. This embodiment is mainly an implementation method of the value control module in the fifth embodiment above. Figure 5 ,The value regulation module may include but is not limited to: a supervision module and a price increase module.

[0121] The supervision module can be used to process the sample attribute characteristics and fact sample element values ​​of the target object to obtain the supervision value information of the target object.

[0122] The supervision module can be pre-trained based on the historical data of the target object, which can include: the attribute characteristics of the target object, the value of historical fact elements, and the value information of historical facts. Through pre-training, the supervision module can learn the potential relationship between the historical fact value information of the target object and the attribute characteristics and the value of historical fact elements, thereby improving its prediction ability.

[0123] The supervision module can predict a value information based on the sample attribute characteristics of the target object and the fact sample element value as the supervision value information.

[0124] The supervision module can contain an input layer, a multi-layer network, and an output layer.

[0125] The input layer can be used to receive sample attribute features and fact sample element values ​​of the target object.

[0126] The multi-layer network can be used to extract and fuse the input sample attribute features and fact sample element values, and output a high-dimensional feature vector. This feature vector can be used to predict supervisory value information.

[0127] The output layer can be used to output supervisory value information.

[0128] The price increase module can be used to improve the supervision value information and obtain the regulation value information.

[0129] In this embodiment, the price increase module can obtain a price increase parameter, and perform price increase processing on the supervision value information based on the price increase parameter to obtain the control value information. The price increase parameter can be used to indicate the extent to which the price index value of the target object is increased under different price increase strategies.

[0130] The process of obtaining the price increase parameters by the price increase module may include but is not limited to:

[0131] Step S41: Determine an average price elasticity matrix of at least one object based on historical data of at least one object.

[0132] The at least one object may include a target object. The average price elasticity matrix may be used to quantify the impact of a price change of the at least one object on a change in its demand or sales volume.

[0133] In order to focus on the target object, the values ​​in the average price elasticity matrix except for the target object are set to zero, thereby reflecting the price elasticity of the target object more clearly.

[0134] Step S42: transform the average price elasticity matrix to obtain an Uplift matrix.

[0135] The Uplift matrix can be used to represent the extent to which the price index value of the target object increases under different price increase strategies.

[0136] Corresponding to the implementation method that the price increase parameter may include the Uplift matrix, the supervision value information can be obtained through the following relationship:

[0137] matrix

[0138] Y sp Indicates the control value information, Represents supervisory value information.

[0139] In this embodiment, the supervision module uses the historical data of the target object for pre-training, and effectively learns the potential relationship between the value information and the attribute characteristics and fact element values, which can improve the prediction ability of the supervision module and ensure that the supervision value information is more accurate. On this basis, the supervision value information is increased in price based on the price increase module, which can ensure that the obtained control value information is not only improved but also reasonable.

[0140] By introducing price increase parameters (such as the Uplift matrix), the supervisory value information is upgraded and the resulting regulated value information is used to determine the third loss, so as to guide the generative model to regulate the value information. This allows the generative model to take into account the customer's willingness to pay during the price increase process, thereby controlling the price increase risk within an acceptable range and achieving low-risk price increases.

[0141] As another optional embodiment of the present application, a processing method is provided for the seventh embodiment of the present application. This embodiment is mainly an embodiment of generating a module in the third embodiment, at least for determining a first predicted value information corresponding to the factual sample value information and at least one second predicted value information corresponding to the at least one counterfactual sample element value based on the sample attribute characteristics, factual sample value information, factual sample element value and at least one counterfactual sample element value of the target object. Specifically:

[0142] A generation module is used to determine first predicted value information corresponding to the factual sample value information and at least one second predicted value information corresponding to at least one counterfactual sample element value based on sample attribute characteristics of the target object, factual sample value information, factual sample element value, random noise and at least one counterfactual sample element value.

[0143] In this implementation, random noise can be obtained by, but not limited to, the following methods:

[0144] Use a random number generator to generate random noise; alternatively, sample a specific probability distribution (such as normal distribution, uniform distribution, etc.) and use the sampled value as random noise.

[0145] In this embodiment, the process of training the generation module through the adversarial network can be seen in Figure 6 ,like Figure 6 As shown, the input layer of the generation module can receive the sample attribute characteristics of the target object (which can be expressed as X), the fact sample value information (which can be expressed as Y (E f )), fact sample element value (which can be expressed as E f ), random noise (which can be expressed as Z).

[0146] The training process of the generation module and the discrimination module can be found in the relevant introduction of each implementation method, which will not be repeated here.

[0147] In this embodiment, during the training process of the generation module and the discrimination module, the training data may be overfitted, resulting in poor performance on unseen data. By introducing random noise, the generation module can learn more generalized features, so that the generation module can generate more diverse outputs, thereby improving the robustness of the generation module.

[0148] As another optional embodiment of the present application, a processing method is provided for the eighth embodiment of the present application. This embodiment is mainly an implementation of at least one counterfactual sample element value in the aforementioned embodiment. The at least one counterfactual sample element value can be obtained by, but is not limited to, the following method:

[0149] Step S51: Determine uniform distribution based on the fact sample element values ​​of the target object.

[0150] In this embodiment, the fact sample element values ​​of the target object may be analyzed to determine the value range of the fact sample element values, and the uniform distribution may be determined based on the value range of the fact sample element values.

[0151] Step S52: Perform random sampling in a uniform distribution, and use at least one random number obtained by random sampling as at least one counterfactual sample element value.

[0152] Random sampling is performed in a uniform distribution, that is, at least one value is randomly selected from the uniform distribution as at least one counterfactual sample element value.

[0153] In this embodiment, a uniform distribution is determined based on the factual sample element values ​​of the target object, and random sampling is performed in the uniform distribution to generate counterfactual sample element values. The counterfactual sample element values ​​are used to train the generation module, which can improve the generalization ability of the generation module and reduce the risk of overfitting.

[0154] Next, the processing device provided in the present application is introduced. The processing device introduced below and the processing method introduced above can be referenced to each other.

[0155] Reference Figure 7 The processing device includes: an obtaining unit 100 and an inference unit 200.

[0156] The obtaining unit 100 is used to obtain target information, where the target information includes attribute characteristics, fact value information, fact element values ​​and counterfactual element values ​​of a target object.

[0157] The reasoning unit 200 is used to use the generation model to infer the counterfactual element value based on the attribute characteristics, the fact value information and the fact element value to obtain the expected value information corresponding to the counterfactual element value.

[0158] The processing device may also include:

[0159] A first determining unit is configured to:

[0160] Obtaining fact element adjustment description information, wherein the fact element adjustment description information is used to adjust the fact element value according to the user intention description;

[0161] Based on the fact element adjustment description information, the fact element value is adjusted to obtain a counterfactual element value.

[0162] The generative model can be obtained based on adversarial network training;

[0163] The adversarial network may at least include:

[0164] A generating module, at least for determining, based on the sample attribute characteristics of the target object, the fact sample value information, the fact sample element value and at least one counterfactual sample element value, first predicted value information corresponding to the fact sample element value and at least one second predicted value information corresponding to the at least one counterfactual sample element value;

[0165] A discriminant module, configured to determine a set of probabilities based on the first prediction value information and the at least one second prediction value information; the set of probabilities represents the probability that the first prediction value information and the at least one second prediction value information are derived from the fact sample element value;

[0166] Parameters of the generation module and the determination module are adjusted based on at least the loss determined by the fact sample value information, the first prediction value information and the set of probabilities.

[0167] The processing device may also include:

[0168] Training unit for:

[0169] Keeping the parameters of the discrimination module unchanged, updating the parameters of the generation module based on at least a first loss and a second loss; the first loss represents the difference between the first prediction value information and the fact sample value information; the second loss represents the difference between the set of probabilities and a set of true labels; the set of true labels is used to mark the input from the fact sample element value as a fact, and to mark the input from the counterfactual sample element value as a counterfactual;

[0170] Keep the parameters of the generation module unchanged, and update the parameters of the discrimination module based on the second loss.

[0171] The adversarial network may also include:

[0172] The value control module is used to determine the control value information corresponding to the at least one second predicted value information.

[0173] The training unit keeps the parameters of the discrimination module unchanged and updates the parameters of the generation module based on at least the first loss and the second loss, which may specifically include:

[0174] Keep the parameters of the discrimination module unchanged, and update the parameters of the generation module based on the first loss, the second loss and the third loss; the third loss represents the difference between the at least one second prediction value information and the regulation value information.

[0175] The value control module may include:

[0176] A supervision module, used to process the sample attribute characteristics and fact sample element values ​​of the target object to obtain the supervision value information of the target object;

[0177] The price increase module is used to perform price increase processing on the supervision value information to obtain the regulation value information.

[0178] The generating module is configured to determine, based on the sample attribute characteristics of the target object, the fact sample value information, the fact sample element value, and the at least one counterfactual sample element value, the first predicted value information corresponding to the fact sample value information and the at least one second predicted value information corresponding to the at least one counterfactual sample element value, and may include:

[0179] The generation module is used to determine the first predicted value information corresponding to the factual sample value information and at least one second predicted value information corresponding to the at least one counterfactual sample element value based on the sample attribute characteristics of the target object, the factual sample value information, the factual sample element value, random noise and at least one counterfactual sample element value.

[0180] The processing device may also include:

[0181] The second determining unit is configured to:

[0182] Determining a uniform distribution based on the fact sample element values ​​of the target object;

[0183] Random sampling is performed in the uniform distribution, and at least one random number obtained by random sampling is used as at least one counterfactual sample element value.

[0184] In another embodiment of the present application, an electronic device is provided.

[0185] Electronic equipment may include:

[0186] A memory for storing at least one set of instructions;

[0187] The processor is used to call and execute the instruction set in the memory, and execute the processing method introduced in any one of the first to eighth embodiments by executing the instruction set.

[0188] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries a computer program. When the computer program is executed by an electronic device, the electronic device can implement a processing method as described in any one of the first to eighth embodiments.

[0189] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0190] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software object, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0191] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program object.

[0192] The computer program object includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A processing method comprising: Obtaining target information, the target information including attribute characteristics, fact value information, fact element values, and counterfactual element values ​​of a target object; The generative model is used to infer the counterfactual element value based on the attribute feature, the fact value information and the fact element value to obtain the expected value information corresponding to the counterfactual element value.

2. The processing method according to claim 1, wherein the counterfactual element value is obtained by: Obtaining fact element adjustment description information, wherein the fact element adjustment description information is used to adjust the fact element value according to the user intention description; Based on the fact element adjustment description information, the fact element value is adjusted to obtain a counterfactual element value.

3. The processing method according to claim 1, wherein the generative model is obtained based on adversarial network training; The adversarial network at least includes: A generating module, at least for determining, based on the sample attribute characteristics of the target object, the fact sample value information, the fact sample element value and at least one counterfactual sample element value, first predicted value information corresponding to the fact sample element value and at least one second predicted value information corresponding to the at least one counterfactual sample element value; A discriminant module, configured to determine a set of probabilities based on the first prediction value information and the at least one second prediction value information; the set of probabilities represents the probability that the first prediction value information and the at least one second prediction value information are derived from the fact sample element value; Parameters of the generation module and the determination module are adjusted based on at least the loss determined by the fact sample value information, the first prediction value information and the set of probabilities.

4. The processing method according to claim 3, wherein the generation model is based on a process of adversarial network training, comprising: Keeping the parameters of the discrimination module unchanged, updating the parameters of the generation module based on at least the first loss and the second loss; The first loss represents the difference between the first prediction value information and the fact sample value information; the second loss represents the difference between the set of probabilities and a set of true labels; the set of true labels is used to mark the input from the fact sample element value as a fact, and to mark the input from the counterfactual sample element value as a counterfactual; Keep the parameters of the generation module unchanged, and update the parameters of the discrimination module based on the second loss.

5. The processing method according to claim 4, wherein the adversarial network further comprises: a value control module, configured to determine control value information corresponding to the at least one second predicted value information; Keeping the parameters of the discrimination module unchanged, and updating the parameters of the generation module based on at least the first loss and the second loss, comprising: Keeping the parameters of the discrimination module unchanged, and updating the parameters of the generation module based on the first loss, the second loss and the third loss; The third loss represents a difference between the at least one second predictive value information and the regulation value information.

6. The processing method according to claim 5, wherein the value control module comprises: A supervision module, used to process the sample attribute characteristics and fact sample element values ​​of the target object to obtain the supervision value information of the target object; The price increase module is used to perform price increase processing on the supervision value information to obtain the regulation value information.

7. The processing method according to claim 3, wherein the generating module is configured to determine, based on the sample attribute characteristics of the target object, the fact sample value information, the fact sample element value, and at least one counterfactual sample element value, the first predicted value information corresponding to the fact sample value information and at least one second predicted value information corresponding to the at least one counterfactual sample element value, including: The generation module is used to determine the first predicted value information corresponding to the factual sample value information and at least one second predicted value information corresponding to the at least one counterfactual sample element value based on the sample attribute characteristics of the target object, the factual sample value information, the factual sample element value, random noise and at least one counterfactual sample element value.

8. The processing method according to any one of claims 3 to 7, wherein the at least one counterfactual sample element value is obtained by: Determining a uniform distribution based on the fact sample element values ​​of the target object; Random sampling is performed in the uniform distribution, and at least one random number obtained by random sampling is used as at least one counterfactual sample element value.

9. A processing device comprising: An obtaining unit, configured to obtain target information, wherein the target information includes attribute characteristics, fact value information, fact element values, and counterfactual element values ​​of a target object; The inference unit is used to use the generation model to infer the counterfactual element value based on the attribute characteristics, the fact value information and the fact element value to obtain the expected value information corresponding to the counterfactual element value.

10. An electronic device comprising: A memory for storing at least one set of instructions; The processor is used to call and execute the instruction set in the memory, and execute the processing method according to any one of claims 1 to 8 by executing the instruction set.