Consumption prediction method and related device

By introducing multi-layer perceptron and regression processing into the neural network model, combined with feature extraction and fusion, the problem of insufficient accuracy in consumption prediction in the existing technology is solved and higher accuracy is achieved.

WO2024199404A1PCT designated stage expired Publication Date: 2024-10-03HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/084654
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-31
Filing Date
2024-03-29
Publication Date
2024-10-03

Smart Images

  • Figure CN2024084654_03102024_PF_FP_ABST
    Figure CN2024084654_03102024_PF_FP_ABST
Patent Text Reader

Abstract

A consumption prediction method and a related device. The method comprises: acquiring information associated with a user (501); performing feature extraction processing on the information to obtain a consumption probability of the user (502); performing first regression processing on the information, to obtain a first consumption limit of the user (503); performing second regression processing on the information to obtain a second consumption limit of the user, the first regression processing and the second regression processing being different regression processing (504); finally, acquiring a predicted consumption limit of the user on the basis of the consumption probability, the first consumption limit, and the second consumption limit (505).
Need to check novelty before this filing date? Find Prior Art

Description

A consumption forecasting method and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 31, 2023, with application number 202310372707.4 and invention name “A consumption forecasting method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of artificial intelligence (AI) technology, and in particular to a consumption prediction method and related equipment. Background Art

[0003] Recommendation systems are a core technology in many current internet applications. These systems can recommend products or services to users based on their consumption behavior. Therefore, predicting user spending is a crucial function of recommendation systems.

[0004] In related technologies, AI-based neural network models can be used to predict user spending. Specifically, user-related information can be input into the neural network model. The neural network model then performs a series of processing on this information to determine the user's spending probability and initial spending limit. Finally, the neural network model determines the user's final spending limit based on the user's spending probability and initial spending limit.

[0005] In the above process, since the neural network only uses the user's initial consumption amount to determine the user's final consumption amount, the factors considered are relatively simple, resulting in an inaccurate prediction of the user's final consumption amount.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a consumption prediction method and related equipment. In the process of making consumption predictions for users, the factors considered are relatively comprehensive, so that the final predicted consumption amount of the user can have a sufficiently high accuracy.

[0008] A first aspect of an embodiment of the present application provides a consumption forecasting method, the method comprising:

[0009] When consumption prediction is required for a user, information associated with the user may be obtained first.

[0010] After obtaining information related to the user, this information can be input into the target model. The target model can then perform feature extraction on this information to obtain the user's consumption probability, that is, the probability that the user is likely to make a purchase. Simultaneously, the target model can also perform a first regression on this information to obtain the user's first consumption limit. Simultaneously, the target model can also perform a second regression on this information to obtain the user's second consumption limit. The first and second regression processes are two different regression processes.

[0011] The user's consumption probability, the user's first consumption limit, and the user's second consumption limit are obtained. The target model can calculate the consumption probability, the first consumption limit, and the second consumption limit to obtain the user's predicted consumption limit. At this point, the consumption prediction for the user is completed.

[0012] The above method demonstrates that when a consumption prediction is needed for a user, information related to the user can first be obtained and input into the target model. The target model then performs feature extraction on this information to determine the user's consumption probability. Simultaneously, the target model also performs a first regression on this information to determine the user's first spending limit, and a second regression on this information to determine the user's second spending limit. Finally, the target model processes the consumption probability, the first spending limit, and the second spending limit to determine the user's predicted spending limit. In the aforementioned process, the first and second regression processes are two different regression processes. That is, the target model includes two different regression branches, which can initially determine the user's two spending limits from two different perspectives. The target model can then ultimately determine the user's predicted spending limit based on these two spending limits. This determination takes into account a comprehensive set of factors, ensuring a sufficiently high degree of accuracy in determining the user's predicted spending limit.

[0013] In one possible implementation, the method further includes: performing a third regression process on the information to obtain the user's third consumption limit, and the first regression process, the second regression process, and the third regression process are different regression processes; obtaining the user's predicted consumption limit based on the consumption probability, the first consumption limit, and the second consumption limit includes: obtaining the user's predicted consumption limit based on the consumption probability, the first consumption limit, the second consumption limit, and the third consumption limit. In the aforementioned implementation, after obtaining the information associated with the user, the target model may further perform a third regression process on the information to obtain the user's third consumption limit. Among them, the first regression process, the second regression process, and the third regression process are three different regression processes. Then, the target model may calculate the consumption probability, the first consumption limit, the second consumption limit, and the third consumption limit to obtain the user's predicted consumption limit.

[0014] In one possible implementation, performing a first regression process on the information to obtain the user's first consumption limit includes: processing the information based on a first multi-layer perceptron to obtain a first feature of the information; constructing a target distribution based on the first feature, the target distribution being used to indicate the correspondence between multiple consumption limits and multiple consumption probabilities; and performing mean processing on the multiple consumption limits indicated by the target distribution to obtain the user's first consumption limit. In the aforementioned implementation, after receiving information associated with the user, the target model may first process the information based on the first multi-layer perceptron to obtain the first feature of the information, and then calculate the first feature to obtain the core parameters of the target distribution, and use the core parameters to construct a target distribution, the target distribution being used to indicate the correspondence between multiple consumption limits and multiple consumption probabilities. After obtaining the target distribution, the target model may perform mean calculation on the multiple consumption limits indicated by the target distribution, thereby accurately obtaining the user's first consumption limit.

[0015] In one possible implementation, performing a second regression on the information to obtain the user's second spending limit includes: processing the information using a second multilayer perceptron to obtain a second feature of the information; and performing a linear correction on the second feature to obtain the user's second spending limit. In the aforementioned implementation, after receiving information associated with the user, the target model may first process the information using the second multilayer perceptron to obtain the second feature of the information, and then perform a linear correction calculation on the second feature to accurately obtain the user's second spending limit.

[0016] In one possible implementation, performing a third regression on the information to obtain the user's third spending limit includes: processing the information using a third multi-layer perceptron to obtain a third feature of the information; and normalizing the third feature to obtain the user's third spending limit. In the aforementioned implementation, after receiving information associated with the user, the target model may first process the information using the third multi-layer perceptron to obtain the third feature of the information, and then perform a normalization calculation on the third feature to accurately obtain the user's third spending limit.

[0017] In one possible implementation, extracting features from the information to obtain the user's consumption probability includes: processing the information using a fourth multi-layer perceptron to obtain a fourth feature; and performing mapping on the fourth feature to obtain the user's consumption probability. In the aforementioned implementation, upon receiving information associated with a user, the target model may first process the information using the fourth multi-layer perceptron to obtain the fourth feature, and then perform mapping calculations on the fourth feature to accurately obtain the user's consumption probability.

[0018] In one possible implementation, obtaining a user's predicted consumption limit based on the consumption probability, the first consumption limit, the second consumption limit, and the third consumption limit includes: averaging the first consumption limit, the second consumption limit, and the third consumption limit to obtain a fourth consumption limit; and multiplying the consumption probability and the fourth consumption limit to obtain the user's predicted consumption limit. In the aforementioned implementation, after obtaining the user's consumption probability, the user's first consumption limit, the user's second consumption limit, and the user's third consumption limit, the target model may first average the first consumption limit, the second consumption limit, and the third consumption limit to obtain the user's fourth consumption limit. Then, the target model may multiply the consumption probability and the fourth consumption limit to obtain and output the user's predicted consumption limit.

[0019] A second aspect of an embodiment of the present application provides a model training method, which includes: obtaining information associated with a user; processing the information through a model to be trained to obtain the user's predicted consumption amount, wherein the model to be trained is used to: perform feature extraction processing on the information to obtain the user's consumption probability; perform a first regression processing on the information to obtain the user's first consumption amount; perform a second regression processing on the information to obtain the user's second consumption amount, and the first regression processing and the second regression processing are different regression processing; based on the consumption probability, the first consumption amount and the second consumption amount, obtain the user's predicted consumption amount; based on the consumption probability, the first consumption amount and the second consumption amount, obtain the target loss; based on the target loss, update the parameters of the model to be trained until the model training conditions are met to obtain the target model.

[0020] The target model trained using the above method has the ability to predict consumption. Specifically, when a consumption prediction is needed for a user, user-related information can be first obtained and input into the target model. The target model then performs feature extraction on this information to determine the user's consumption probability. Simultaneously, the target model also performs a first regression on this information to determine the user's first spending limit, and a second regression on this information to determine the user's second spending limit. Finally, the target model processes the consumption probability, the first spending limit, and the second spending limit to determine the user's predicted spending limit. In the aforementioned process, the first and second regression processes are two different regression processes. That is, the target model includes two different regression branches, which can initially determine the user's two spending limits from two different perspectives. Based on these two spending limits, the target model can ultimately determine the user's predicted spending limit. This determination takes into account a comprehensive range of factors, ensuring a sufficiently high level of accuracy for the user's predicted spending limit.

[0021] In one possible implementation, the model to be trained is also used to perform a third regression processing on the information to obtain the user's third consumption amount, and the first regression processing, the second regression processing, and the third regression processing are different regression processing; the model to be trained is used to obtain the user's predicted consumption amount based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount; obtaining the target loss based on the consumption probability, the first consumption amount, and the second consumption amount includes: obtaining the target loss based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount.

[0022] In one possible implementation, obtaining the target loss based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount includes: obtaining the target loss based on the consumption probability, the user's actual consumption probability, the first consumption amount, the second consumption amount, the third consumption amount, and the user's actual consumption amount.

[0023] In one possible implementation, the model to be trained is used to: process information based on a first multi-layer perceptron to obtain a first feature of the information; construct a target distribution based on the first feature, where the target distribution is used to indicate a correspondence between multiple consumption amounts and multiple consumption probabilities; and average the multiple consumption amounts indicated by the target distribution to obtain the user's first consumption amount.

[0024] In one possible implementation, the model to be trained is used to: process the information based on a second multi-layer perceptron to obtain a second feature of the information; and perform linear correction processing on the second feature to obtain a second consumption amount of the user.

[0025] In one possible implementation, the model to be trained is used to: process the information based on a third multi-layer perceptron to obtain a third feature of the information; and normalize the third feature to obtain a third consumption amount of the user.

[0026] In one possible implementation, the model to be trained is used to: process the information based on a fourth multi-layer perceptron to obtain a fourth feature of the information; and perform mapping processing on the fourth feature to obtain a user's consumption probability.

[0027] In one possible implementation, the model to be trained is used to: average the first consumption amount, the second consumption amount, and the third consumption amount to obtain a fourth consumption amount; and multiply the consumption probability and the fourth consumption amount to obtain the user's predicted consumption amount.

[0028] A third aspect of an embodiment of the present application provides a consumption prediction device, which includes a target model, and the device includes: a first acquisition module for acquiring information associated with a user; a first processing module for performing feature extraction processing on the information to obtain the user's consumption probability; a second processing module for performing a first regression processing on the information to obtain the user's first consumption amount; a third processing module for performing a second regression processing on the information to obtain the user's second consumption amount, the first regression processing and the second regression processing being different regression processing; a second acquisition module for obtaining the user's predicted consumption amount based on the consumption probability, the first consumption amount and the second consumption amount.

[0029] It can be seen from the above device that when it is necessary to make a consumption prediction for a user, the information associated with the user can be obtained first and input into the target model. Then, the target model can perform feature extraction processing on the information to obtain the user's consumption probability. At the same time, the target model can also perform a first regression processing on the information to obtain the user's first consumption limit, and perform a second regression processing on the information to obtain the user's second consumption limit. Finally, the target model can process the consumption probability, the first consumption limit and the second consumption limit to obtain the user's predicted consumption limit. In the above process, the first regression processing and the second regression processing are two different regression processings, that is, the target model contains two different regression branches, which can preliminarily obtain the user's two consumption limits from two different perspectives. Then, the target model can finally determine the user's predicted consumption limit based on these two consumption limits. The factors considered in this determination process are relatively comprehensive, which can make the user's predicted consumption limit have a sufficiently high accuracy.

[0030] In one possible implementation, the device also includes: a fourth processing module, used to perform a third regression processing on the information to obtain the user's third consumption amount, the first regression processing, the second regression processing and the third regression processing are different regression processing; a second acquisition module, used to obtain the user's predicted consumption amount based on the consumption probability, the first consumption amount, the second consumption amount and the third consumption amount.

[0031] In one possible implementation, the second processing module is used to: process the information based on the first multi-layer perceptron to obtain a first feature of the information; construct a target distribution based on the first feature, where the target distribution is used to indicate the correspondence between multiple consumption amounts and multiple consumption probabilities; and average the multiple consumption amounts indicated by the target distribution to obtain the user's first consumption amount.

[0032] In one possible implementation, the third processing module is configured to: process the information based on a second multi-layer perceptron to obtain a second feature of the information; and perform linear correction processing on the second feature to obtain a second consumption amount of the user.

[0033] In one possible implementation, the fourth processing module is used to: process the information based on a third multi-layer perceptron to obtain a third feature of the information; and normalize the third feature to obtain a third consumption amount of the user.

[0034] In one possible implementation, the first processing module is configured to: process the information based on a fourth multi-layer perceptron to obtain a fourth feature of the information; and perform mapping processing on the fourth feature to obtain a consumption probability of the user.

[0035] In one possible implementation, the second acquisition module is used to: average the first consumption amount, the second consumption amount, and the third consumption amount to obtain a fourth consumption amount; and multiply the consumption probability and the fourth consumption amount to obtain the user's predicted consumption amount.

[0036] The fourth aspect of the embodiments of the present application provides a model training device, which includes: a first acquisition module for acquiring information associated with a user; a processing module for processing the information through a model to be trained to obtain the user's predicted consumption amount, and the model to be trained is used to: perform feature extraction processing on the information to obtain the user's consumption probability; perform a first regression processing on the information to obtain the user's first consumption amount; perform a second regression processing on the information to obtain the user's second consumption amount, and the first regression processing and the second regression processing are different regression processing; based on the consumption probability, the first consumption amount and the second consumption amount, the user's predicted consumption amount is obtained; a second acquisition module is used to obtain a target loss based on the consumption probability, the first consumption amount and the second consumption amount; an update module is used to update the parameters of the model to be trained based on the target loss until the model training conditions are met to obtain the target model.

[0037] The target model trained by the above-mentioned device has the function of consumption prediction. Specifically, when it is necessary to make a consumption prediction for a user, information related to the user can be first obtained and input into the target model. Next, the target model can perform feature extraction processing on this information to obtain the user's consumption probability. At the same time, the target model can also perform a first regression process on this information to obtain the user's first consumption limit, and perform a second regression process on this information to obtain the user's second consumption limit. Finally, the target model can process the consumption probability, the first consumption limit, and the second consumption limit to obtain the user's predicted consumption limit. In the above process, the first regression process and the second regression process are two different regression processes. In other words, the target model contains two different regression branches, which can preliminarily obtain the user's two consumption limits from two different perspectives. Then, the target model can ultimately determine the user's predicted consumption limit based on these two consumption limits. The factors considered in this determination process are relatively comprehensive, which can ensure that the user's predicted consumption limit has a sufficiently high accuracy.

[0038] In one possible implementation method, the model to be trained is also used to perform a third regression processing on the information to obtain the user's third consumption amount, and the first regression processing, the second regression processing and the third regression processing are different regression processing; the model to be trained is used to obtain the user's predicted consumption amount based on the consumption probability, the first consumption amount, the second consumption amount and the third consumption amount; the update module is used to obtain the target loss based on the consumption probability, the first consumption amount, the second consumption amount and the third consumption amount.

[0039] In one possible implementation, the update module is configured to obtain a target loss based on the consumption probability, the user's actual consumption probability, the first consumption amount, the second consumption amount, the third consumption amount, and the user's actual consumption amount.

[0040] In one possible implementation, the model to be trained is used to: process information based on a first multi-layer perceptron to obtain a first feature of the information; construct a target distribution based on the first feature, where the target distribution is used to indicate a correspondence between multiple consumption amounts and multiple consumption probabilities; and average the multiple consumption amounts indicated by the target distribution to obtain the user's first consumption amount.

[0041] In one possible implementation, the model to be trained is used to: process the information based on a second multi-layer perceptron to obtain a second feature of the information; and perform linear correction processing on the second feature to obtain a second consumption amount of the user.

[0042] In one possible implementation, the model to be trained is used to: process the information based on a third multi-layer perceptron to obtain a third feature of the information; and normalize the third feature to obtain a third consumption amount of the user.

[0043] In one possible implementation, the model to be trained is used to: process the information based on a fourth multi-layer perceptron to obtain a fourth feature of the information; and perform mapping processing on the fourth feature to obtain a user's consumption probability.

[0044] In one possible implementation, the model to be trained is used to: average the first consumption amount, the second consumption amount, and the third consumption amount to obtain a fourth consumption amount; and multiply the consumption probability and the fourth consumption amount to obtain the user's predicted consumption amount.

[0045] A fifth aspect of an embodiment of the present application provides a consumption forecasting device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the consumption forecasting device executes the method described in the first aspect or any possible implementation method of the first aspect.

[0046] A sixth aspect of an embodiment of the present application provides a model training device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the model training device executes the method described in the second aspect or any possible implementation method of the second aspect.

[0047] A seventh aspect of an embodiment of the present application provides a circuit system, which includes a processing circuit, and the processing circuit is configured to execute the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.

[0048] An eighth aspect of an embodiment of the present application provides a chip system, which includes a processor for calling a computer program or computer instructions stored in a memory so that the processor executes a method as described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.

[0049] In a possible implementation, the processor is coupled to the memory through an interface.

[0050] In one possible implementation, the chip system further includes a memory in which computer programs or computer instructions are stored.

[0051] A ninth aspect of an embodiment of the present application provides a computer storage medium storing a computer program, which, when executed by a computer, enables the computer to implement the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.

[0052] A tenth aspect of an embodiment of the present application provides a computer program product, which stores instructions that, when executed by a computer, enable the computer to implement the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.

[0053] In an embodiment of the present application, when it is necessary to make a consumption prediction for a user, information associated with the user can be obtained first, and the information can be input into the target model. Then, the target model can perform feature extraction processing on the information to obtain the user's consumption probability. At the same time, the target model can also perform a first regression processing on the information to obtain the user's first consumption amount, and perform a second regression processing on the information to obtain the user's second consumption amount. Finally, the target model can process the consumption probability, the first consumption amount, and the second consumption amount to obtain the user's predicted consumption amount. In the aforementioned process, the first regression processing and the second regression processing are two different regression processings, that is, the target model contains two different regression branches, which can preliminarily obtain the user's two consumption amounts from two different perspectives. Then, the target model can finally determine the user's predicted consumption amount based on these two consumption amounts. The factors considered in this determination process are relatively comprehensive, which can make the user's predicted consumption amount have a sufficiently high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a schematic diagram of the structure of the artificial intelligence main framework;

[0055] FIG2a is a schematic diagram of the structure of a consumption forecasting system provided in an embodiment of the present application;

[0056] FIG2 b is another schematic diagram of the structure of the consumption forecasting system provided in an embodiment of the present application;

[0057] FIG2c is a schematic diagram of a device related to consumption prediction provided in an embodiment of the present application;

[0058] FIG3 is a schematic diagram of the architecture of the system 100 provided in an embodiment of the present application;

[0059] FIG4 is a schematic diagram of a structure of a target model provided in an embodiment of the present application;

[0060] FIG5 is a flow chart of a consumption forecasting method provided in an embodiment of the present application;

[0061] FIG6 is another schematic diagram of the structure of the target model provided in an embodiment of the present application;

[0062] FIG7 is another schematic diagram of the structure of the target model provided in an embodiment of the present application;

[0063] FIG8 is a schematic diagram of a statistical distribution provided in an embodiment of the present application;

[0064] FIG9 is a flow chart of a model training method provided in an embodiment of the present application;

[0065] FIG10a is a schematic diagram of a structure of a model training framework provided in an embodiment of the present application;

[0066] FIG10b is another schematic diagram of the structure of the model training framework provided in an embodiment of the present application;

[0067] FIG11 is a schematic diagram of the structure of a consumption forecasting device provided in an embodiment of the present application;

[0068] FIG12 is a schematic structural diagram of a model training device provided in an embodiment of the present application;

[0069] FIG13 is a schematic diagram of the structure of an execution device provided in an embodiment of the present application;

[0070] FIG14 is a schematic structural diagram of a training device provided in an embodiment of the present application;

[0071] FIG15 is a schematic structural diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] The embodiments of the present application provide a consumption prediction method and related equipment. In the process of making consumption predictions for users, the factors considered are relatively comprehensive, so that the final predicted consumption amount of the user can have a sufficiently high accuracy.

[0073] 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 are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them 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, product 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, products or equipment.

[0074] Recommendation systems are a core technology in many current internet applications. These systems recommend products or services to users based on their consumption behavior (e.g., whether they have purchased something and how much they have spent). Therefore, predicting user spending is a crucial function of recommendation systems.

[0075] In the related art, the neural network model of AI technology can be used to realize consumption prediction for users. Specifically, the information associated with the user (for example, the user's personal information, the user's product information, the user's contextual information, etc.) can be input into the neural network model first. Then, the neural network model can perform a series of processing on the information to obtain the user's consumption probability and the user's initial consumption amount. Finally, the neural network model can determine the user's final consumption amount based on the user's consumption probability and the user's initial consumption amount. For example, suppose the user's initial consumption amount obtained by the model is 100 yuan. When the user's consumption probability obtained by the model is 0, the user's final consumption amount is 0. When the user's consumption probability obtained by the model is 1, the user's final consumption amount is equal to the user's initial consumption amount, that is, 100 yuan.

[0076] In the above process, since the neural network only uses the user's initial consumption amount to determine the user's final consumption amount, the factors considered are relatively simple, resulting in an inaccurate prediction of the user's final consumption amount.

[0077] In order to solve the above problems, the embodiment of the present application provides a consumption forecasting method, which can be implemented in combination with artificial intelligence (AI) technology. AI technology is a technical discipline that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence. AI technology obtains the best results by sensing the environment, acquiring knowledge and using knowledge. In other words, artificial intelligence technology is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Using artificial intelligence for data processing is a common application of artificial intelligence.

[0078] First, we will describe the overall workflow of an AI system. See Figure 1, which illustrates a schematic diagram of the AI ​​framework. This framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.

[0079] (1) Infrastructure

[0080] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.

[0081] (2) Data

[0082] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.

[0083] (3) Data processing

[0084] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.

[0085] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.

[0086] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0087] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.

[0088] (4) General ability

[0089] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0090] (5) Smart products and industry applications

[0091] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.

[0092] Next, several application scenarios of this application are introduced.

[0093] Figure 2a is a schematic diagram of the consumption forecasting system provided in an embodiment of the present application. The consumption forecasting system includes a user device and a data processing device. The user device includes an intelligent terminal such as a mobile phone, personal computer, or information processing center. The user device is the initiator of the consumption forecast, typically initiating a consumption forecast request through the user device.

[0094] The aforementioned data processing device can be a device or server with data processing capabilities, such as a cloud server, network server, application server, or management server. The data processing device receives consumption forecast requests from smart terminals via an interactive interface and then uses its data storage and data processing processors to perform consumption forecasting using methods such as machine learning, deep learning, search, reasoning, and decision-making. The memory in the data processing device is a general term that includes local storage and a database that stores historical data. The database can be located on the data processing device or on other network servers.

[0095] In the consumption prediction system shown in Figure 2a, a user device can receive user instructions. For example, the user device can obtain user-related information input / selected by the user and then initiate a request to a data processing device, causing the data processing device to perform consumption prediction processing on the information obtained by the user device, thereby obtaining a corresponding processing result for the information. For example, the user device can obtain user-related information input by the user and then initiate a consumption prediction request to the data processing device, causing the data processing device to perform a series of processing on the information based on the consumption prediction request, thereby obtaining a processing result of the information, namely, the user's predicted consumption limit.

[0096] In FIG2 a , the data processing device may execute the consumption prediction method according to the embodiment of the present application.

[0097] Figure 2b is another structural diagram of the consumption forecasting system provided in an embodiment of the present application. In Figure 2b, the user device directly serves as a data processing device. The user device can directly obtain input from the user and directly process it by the hardware of the user device itself. The specific process is similar to that of Figure 2a. Please refer to the above description and will not be repeated here.

[0098] In the consumption prediction system shown in Figure 2b, the user device can receive the user's instructions. For example, the user device can obtain user-related information input / selected by the user, and then perform a series of processing on the information to obtain the processing result of the information, that is, the user's predicted consumption amount.

[0099] In FIG2 b , the user equipment itself can execute the consumption prediction method of the embodiment of the present application.

[0100] FIG2c is a schematic diagram of the consumption forecasting related equipment provided in an embodiment of the present application.

[0101] The user device in the above Figures 2a and 2b can specifically be the local device 301 or the local device 302 in Figure 2c, and the data processing device in Figure 2a can specifically be the execution device 210 in Figure 2c, wherein the data storage system 250 can store the data to be processed of the execution device 210, and the data storage system 250 can be integrated on the execution device 210, or it can be set on the cloud or other network servers.

[0102] The processors in Figures 2a and 2b can perform data training / machine learning / deep learning through a neural network model or other models (for example, a model based on a support vector machine), and use the model finally trained or learned from the data to execute consumption prediction applications on the image, thereby obtaining corresponding processing results.

[0103] Figure 3 is a schematic diagram of the system 100 architecture provided in an embodiment of the present application. In Figure 3, the execution device 110 is configured with an input / output (I / O) interface 112 for data interaction with an external device. The user can input data to the I / O interface 112 through the client device 140. The input data can include: various tasks to be scheduled, callable resources and other parameters in the embodiment of the present application.

[0104] When the execution device 110 preprocesses the input data, or when the computing module 111 of the execution device 110 performs calculations and other related processing (such as implementing the functions of the neural network in this application), the execution device 110 can call the data, code, etc. in the data storage system 150 for the corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing in the data storage system 150.

[0105] Finally, the I / O interface 112 returns the processing result to the client device 140 so as to provide it to the user.

[0106] It is worth noting that the training device 120 can generate corresponding target models / rules based on different training data for different goals or tasks. The corresponding target models / rules can be used to achieve the above goals or complete the above tasks, thereby providing the user with the desired results. The training data can be stored in the database 130 and come from training samples collected by the data collection device 160.

[0107] In the scenario shown in FIG3 , the user can manually input data, which can be performed through the interface provided by I / O interface 112. Alternatively, client device 140 can automatically send input data to I / O interface 112. If user authorization is required for client device 140 to automatically send input data, the user can set the corresponding permissions in client device 140. The user can view the output of execution device 110 on client device 140, which can be presented in a display, sound, action, or other specific form. Client device 140 can also serve as a data acquisition terminal, collecting input data and output results from I / O interface 112 as new sample data and storing them in database 130. Of course, collection can also be performed without client device 140, with I / O interface 112 directly storing the input data and output results from I / O interface 112 as new sample data in database 130.

[0108] It is worth noting that FIG3 is only a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in FIG3, the data storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 can also be placed in the execution device 110. As shown in FIG3, a neural network can be trained according to the training device 120.

[0109] The present application also provides a chip including a neural network processor (NPU). The chip can be provided in the execution device 110 shown in FIG3 to complete the computational work of the computation module 111. The chip can also be provided in the training device 120 shown in FIG3 to complete the training work of the training device 120 and output the target model / rule.

[0110] The neural network processor (NPU) is a coprocessor mounted on the host central processing unit (CPU), which assigns tasks to it. The core of the NPU is the arithmetic circuit, which is controlled by a controller to extract data from memory (weight memory or input memory) and perform calculations.

[0111] In some implementations, the arithmetic circuit includes multiple processing engines (PEs). In some implementations, the arithmetic circuit is a two-dimensional systolic array. The arithmetic circuit can also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit is a general-purpose matrix processor.

[0112] For example, consider an input matrix A, a weight matrix B, and an output matrix C. The computational circuit retrieves the corresponding data for matrix B from the weight memory and caches it on each PE within the computational circuit. The computational circuit then performs a matrix operation on the matrix A data from the input memory and matrix B, storing the partial or final matrix results in the accumulator.

[0113] The vector computation unit can further process the output of the arithmetic circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. For example, the vector computation unit can be used for network calculations in non-convolutional / non-FC layers in neural networks, such as pooling, batch normalization, and local response normalization.

[0114] In some implementations, the vector computation unit can store the processed output vectors in a unified buffer. For example, the vector computation unit can apply a nonlinear function to the output of the computation circuit, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit generates normalized values, merged values, or both. In some implementations, the processed output vectors can be used as activation inputs to the computation circuit, such as for use in subsequent layers in a neural network.

[0115] The unified memory is used to store input data and output data.

[0116] The weight data is directly transferred from the external memory to the input memory and / or unified memory through the direct memory access controller (DMAC), the weight data in the external memory is stored in the weight memory, and the data in the unified memory is stored in the external memory.

[0117] The bus interface unit (BIU) is used to implement interaction between the main CPU, DMAC and instruction fetch memory through the bus.

[0118] An instruction fetch buffer connected to the controller, used to store instructions used by the controller;

[0119] The controller is used to call the instructions cached in the memory to control the working process of the computing accelerator.

[0120] Generally, unified memory, input memory, weight memory and instruction fetch memory are all on-chip memories, and external memory is memory outside the NPU, which can be double data rate synchronous dynamic random access memory (DDR SDRAM), high bandwidth memory (HBM) or other readable and writable memory.

[0121] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.

[0122] (1) Neural Network

[0123] A neural network can be composed of neural units. A neural unit can refer to an operation unit with xs and intercept 1 as input. The output of the operation unit can be:

[0124] Where s = 1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer. The activation function can be a sigmoid function. A neural network is a network formed by connecting many of the above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.

[0125] The operation of each layer in a neural network can be described by the mathematical expression y = a(Wx + b). From a physical perspective, the operation of each layer in a neural network can be understood as transforming the input space (a set of input vectors) into the output space (i.e., from the row space to the column space of a matrix) through five operations. These operations include: 1. Dimensionality increase / decrease; 2. Scaling / reduction; 3. Rotation; 4. Translation; and 5. "Bending." Operations 1, 2, and 3 are performed by Wx, 4 by +b, and 5 by a(). The word "space" is used here because the objects being classified are not individual things, but rather a class of things, and space refers to the collection of all individuals within that class. W is the weight vector, each value in which represents the weight of a neuron in that layer of the neural network. This vector W determines the spatial transformation from input space to output space described above. That is, the weights W of each layer control how the space is transformed. The goal of training a neural network is to ultimately obtain the weight matrix for all layers of the trained neural network (a weight matrix formed by the vectors W of many layers). Therefore, the training process of a neural network is essentially about learning how to control spatial transformations, and more specifically, about learning the weight matrix.

[0126] Because we want the output of the neural network to be as close as possible to the value we really want to predict, we can compare the current network's predicted value with the desired target value, and then update the weight vector of each layer of the neural network based on the difference between the two (of course, there is usually an initialization process before the first update, which is to pre-configure the parameters for each layer in the neural network). For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value, and this adjustment is continued until the neural network can predict the desired target value. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value." This is the loss function or objective function, which is an important equation used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the neural network becomes a process of minimizing this loss as much as possible.

[0127] (2) Backpropagation algorithm

[0128] Neural networks can use the back propagation (BP) algorithm to correct the size of the parameters in the initial neural network model during training, reducing the reconstruction error loss of the neural network model. Specifically, the forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial neural network model, thereby converging the error loss. The BP algorithm is a backward propagation movement dominated by error loss, aiming to obtain the optimal parameters of the neural network model, such as the weight matrix.

[0129] The method provided in this application is described below from the training side of the neural network and the application side of the neural network.

[0130] The model training method provided in the embodiment of the present application involves the processing of data sequences, and can be specifically applied to methods such as data training, machine learning, and deep learning, and performs symbolic and formalized intelligent information modeling, extraction, preprocessing, and training on the training data (for example, information associated with the user in the model training method provided in the embodiment of the present application), and finally obtains a trained neural network (for example, the target model in the model training method provided in the embodiment of the present application); and the consumption prediction method provided in the embodiment of the present application can use the above-mentioned trained neural network to input input data (for example, information associated with the user in the consumption prediction method provided in the embodiment of the present application) into the trained neural network to obtain output data (for example, the predicted consumption amount of the user in the consumption prediction method provided in the embodiment of the present application). It should be noted that the model training method and consumption prediction method provided in the embodiment of the present application are inventions based on the same concept, and can also be understood as two parts in a system, or two stages of an overall process: such as the model training stage and the model application stage.

[0131] The consumption prediction method provided in the embodiment of the present application can be implemented through a target model, as shown in Figure 4 (Figure 4 is a structural diagram of the target model provided in the embodiment of the present application), and the target model includes: a classifier, a first regressor, a second regressor, and a fusion. Among them, the classifier, the first regressor, and the second regressor are three parallel branches, and the input end of the classifier, the input end of the first regressor, and the input end of the second regressor serve as the input end of the entire target model, the output end of the classifier, the output end of the first regressor, and the output end of the second regressor are connected to the input end of the fusion, and the output end of the fusion serves as the output end of the entire target model. In order to understand the workflow of the target model, the workflow is introduced below in conjunction with Figure 5. Figure 5 is a flow chart of the consumption prediction method provided in the embodiment of the present application. As shown in Figure 5, the method includes:

[0132] 501. Obtain information associated with the user.

[0133] In this embodiment, when consumption predictions need to be made for a user, information associated with the user can be obtained first, where the information can be the user's own information (for example, the user's name, the user's age, the user's gender, the user's occupation, the user's height and weight, etc.), or it can be the goods or services that the user is interested in (for example, the software that the user is interested in, the clothing that the user is interested in, and the sports that the user is just interested in, etc.), or it can be some contextual information that the user is currently browsing, etc.

[0134] 502. Perform feature extraction on the information to obtain the user's consumption probability.

[0135] 503. Perform a first regression process on the information to obtain the user's first consumption limit.

[0136] 504. Perform a second regression process on the information to obtain a second consumption limit of the user. The first regression process and the second regression process are different regression processes.

[0137] After obtaining information associated with the user, the information can be input into the target model. Then, the classifier of the target model can perform feature extraction processing on the information to obtain the user's consumption probability (also known as the probability that the user may consume). At the same time, the first regressor of the target model can perform a first regression processing on the information to obtain the user's first consumption amount (also known as a certain amount that the user may consume). The second regressor of the target model can also perform a second regression processing on the information to obtain the user's second consumption amount (also known as another amount that the user may consume). Among them, the first regression processing and the second regression processing are two different regression processing.

[0138] Specifically, as shown in Figure 6 (Figure 6 is another structural diagram of the target model provided by an embodiment of the present application), the target model also includes a third regressor. Among them, the classifier, the first regressor, the second regressor, and the third regressor are three parallel branches, and the input end of the classifier, the input end of the first regressor, the input end of the second regressor, and the input end of the third regressor serve as the input end of the entire target model, the output end of the classifier, the output end of the first regressor, the output end of the second regressor, and the output end of the third regressor are connected to the input end of the fusion device, and the output end of the fusion device serves as the output end of the entire target model. Then, the target model can also perform the following operations:

[0139] The third regressor of the target model can perform a third regression process on the information to obtain the user's third consumption amount (also known as another amount that the user may consume). The first regression process, the second regression process, and the third regression process are three different regression processes.

[0140] More specifically, as shown in FIG6 , the first regressor may include a first multi-layer perceptron and a building block. Then, the first regressor may obtain the user's first consumption amount in the following manner:

[0141] After receiving information associated with the user, the first multilayer perceptron of the first regressor may first perform a series of processing on the information (e.g., full connection, etc.) to obtain a first feature of the information, and send the first feature of the information to the construction module. After obtaining the first feature of the information, the construction module may calculate the first feature to obtain the core parameters of the target distribution, and use the core parameters to construct a target distribution, which is used to indicate the correspondence between multiple consumption limits and multiple consumption probabilities. After obtaining the target distribution, the construction module may average the multiple consumption limits indicated by the target distribution to obtain the user's first consumption limit.

[0142] More specifically, as shown in FIG6 , the second regressor may include a second multi-layer perceptron and a linear correction module (e.g., a ReLU function, etc.). Then, the second regressor may obtain the user's second consumption amount in the following manner:

[0143] After receiving the information associated with the user, the second multilayer perceptron of the second regressor may first perform a series of processing (e.g., full connection, etc.) on the information to obtain the second feature of the information, and then send the second feature of the information to the linear correction module. After obtaining the second feature of the information, the linear correction module may calculate the second feature to obtain the second consumption limit of the user.

[0144] More specifically, as shown in FIG6 , the third regressor may include a third multi-layer perceptron and a normalization module (e.g., a softmax function, etc.). Then, the third regressor may obtain the user's third consumption amount in the following manner:

[0145] After receiving information associated with the user, the third multilayer perceptron of the third regressor may first perform a series of processing (e.g., full connection, etc.) on the information to obtain the third feature of the information, and then send the third feature of the information to the normalization module. After obtaining the third feature of the information, the normalization module may calculate the third feature to obtain the user's third consumption limit.

[0146] More specifically, as shown in FIG6 , the classifier may include a fourth multi-layer perceptron and a mapping module (e.g., a sigmoid function, etc.). Then, the classifier may obtain the user's consumption probability in the following manner:

[0147] After receiving information related to a user, the classifier's fourth multilayer perceptron performs a series of processing (e.g., full connectivity) on the information to obtain a fourth feature of the information. This feature is then sent to the mapping module. After obtaining the fourth feature, the mapping module calculates the fourth feature to determine the user's consumption probability.

[0148] For example, as shown in Figure 7 (Figure 7 is another structural diagram of the target model provided in an embodiment of the present application), let the information related to the user be x, and the target model includes a basic feature representation model, a purchase classifier, a distribution-based regressor, a logarithm-based regressor, a classification-based regressor, and a prediction fusion, wherein the basic feature representation model can be any deep learning model. Then, after x is input into the target model, the basic feature representation model can process x to obtain the feature implicit representation h and send it to the distribution-based regressor.

[0149] In the target model, the consumption classifier includes a multi-layer perceptron (MLP) and a sigmoid function. After receiving h, the multi-layer perceptron in the consumption classifier can perform the processing shown in formula (2) on h: p =w p h+b p h′ p =w p h p +b p (2)

[0150] In the above formula, w p 、b p is the parameter of the multilayer perceptron in the consumption classifier, h′ p is the feature output by the multilayer perceptron in the consumption classifier (the fourth feature mentioned above). Then, the sigmoid function in the consumption classifier can be used to calculate h′ p Perform the process shown in formula (3):

[0151] In the above formula, is the (predicted) consumption probability of the user.

[0152] In the target model, the distribution-based regressor contains a multilayer perceptron and a building block. After receiving h, the multilayer perceptron in the distribution-based regressor can perform the processing shown in formula (4) on h: d =ReLU(w d h+b d ) θ′=w d h d+b d (4)

[0153] In the above formula, w d 、b d is the parameter of the multilayer perceptron in the distribution-based regressor, and θ′ is the feature output by the multilayer perceptron in the distribution-based regressor (the first feature mentioned above). Then, the building module in the consumption classifier can process θ′ as shown in formula (5): θ = log[1 + exp(θ′)] (5)

[0154] In the above formula, θ is the core parameter of the target distribution. Subsequently, the construction module can use θ to construct the target distribution f, which represents the correspondence between multiple consumption probabilities and multiple consumption amounts. Then, the construction module can calculate the average of these multiple consumption amounts to obtain the user's consumption amount. (i.e. the first consumption amount mentioned above).

[0155] In the target model, the logarithmic-based regressor contains a multilayer perceptron and a ReLU function. After receiving h, the multilayer perceptron in the logarithmic-based regressor can perform the processing shown in formula (6) on h: l =ReLU(w l h+b l ) h l ′=w l h l +b l (6)

[0156] In the above formula, w l 、b l are the parameters of the multilayer perceptron in the logarithm-based regressor, h l ′ is the feature of the multilayer perceptron output in the logarithmic-based regressor (the second feature mentioned above). Then, the ReLU function in the logarithmic-based regressor can be used to calculate h l ' is processed as shown in formula (7):

[0157] In the above formula, The user's spending limit (i.e. the aforementioned second spending limit).

[0158] In the target model, the classification-based regressor includes a multilayer perceptron and a softmax function. After receiving h, the multilayer perceptron in the classification-based regressor can perform the processing shown in formula (8) on h: c =ReLU(w c h+b c ) hc ′=V c h c +v c (8)

[0159] In the above formula, w c 、b c 、V c 、v c is the parameter of the multilayer perceptron in the classification-based regressor, h c ′ is the feature output by the multilayer perceptron in the classification-based regressor (the third feature mentioned above). Then, the softmax function in the classification-based regressor can be used to calculate h c ' is processed as shown in formula (9):

[0160] In the above formula, The user's consumption limit (i.e. the third consumption limit mentioned above).

[0161] 505. Obtain the user's predicted consumption amount based on the consumption probability, the first consumption amount, and the second consumption amount.

[0162] After obtaining the user's consumption probability, first consumption limit, and second consumption limit, the target model's classifier can send the user's consumption probability to the aggregator. The target model's first regressor can also send the user's first consumption limit to the aggregator, and the target model's second regressor can also send the user's second consumption limit to the aggregator. The aggregator then calculates the consumption probability, first consumption limit, and second consumption limit to obtain the user's predicted consumption limit. This completes the user's consumption prediction.

[0163] Specifically, if the target model also includes a third regressor, after obtaining the user's third consumption amount, the third regressor can send the third consumption amount to the fusion device, so the fusion device can calculate the consumption probability, the first consumption amount, the second consumption amount and the third consumption amount to obtain the user's predicted consumption amount.

[0164] More specifically, the aggregator can obtain the user's predicted spending amount through the following methods:

[0165] After obtaining the user's consumption probability, the user's first consumption limit, the user's second consumption limit, and the user's third consumption limit, the aggregator can first average the first, second, and third consumption limits to obtain the user's fourth consumption limit. The aggregator can then multiply the consumption probability and the fourth consumption limit to obtain and output the user's predicted consumption limit.

[0166] As in the above example, the fusion device can be obtained Average value

[0167] Then, the fuser converts y′ a and To multiply, and thus predict the user's final consumption amount

[0168] So, It can be used as the final output of the target model, and at this point, the user's consumption prediction is completed.

[0169] It should be understood that this embodiment only illustrates the target model as including two or three regressors, and does not limit the number of regressors in the target model. In actual applications, the target model may include at least two regressors, for example, two regressors, three regressors, four regressors, and so on, and can be set according to actual needs and is not limited here.

[0170] It should also be understood that this embodiment illustrates the first regressor as a distribution-based regressor, the second regressor as a logarithm-based regressor, and the third regressor as a classification-based regressor for illustrative purposes only, and does not limit the types of regressors in the target model. In actual applications, the types of regressors in the target model can be set according to actual needs and are not described one by one here.

[0171] In addition, the target model provided in the embodiment of the present application can be tested on a certain data set to obtain the statistical distribution of the consumption amount of the model on the data set, which is shown in Figure 8 (Figure 8 is a schematic diagram of the statistical distribution provided in the embodiment of the present application).

[0172] Furthermore, the target model provided in the embodiment of the present application (i.e., CMLTV in Table 1) and the models provided by the related art (i.e., the remaining models except CMLTV in Table 1, such as Linear, MLP, etc.) can be compared on the data set. The comparison results are shown in Table 1:

[0173] Table 1

[0174] Based on Table 1, we can see that the target model achieved the best performance in terms of regression root mean squared error (RMSE), determination coefficient (R2_score), and classification (AUC) on all samples of the dataset, as well as RMSE and R2_score of positive samples.

[0175] In an embodiment of the present application, when it is necessary to make a consumption prediction for a user, information associated with the user can be obtained first, and the information can be input into the target model. Then, the target model can perform feature extraction processing on the information to obtain the user's consumption probability. At the same time, the target model can also perform a first regression processing on the information to obtain the user's first consumption amount, and perform a second regression processing on the information to obtain the user's second consumption amount. Finally, the target model can process the consumption probability, the first consumption amount, and the second consumption amount to obtain the user's predicted consumption amount. In the aforementioned process, the first regression processing and the second regression processing are two different regression processings, that is, the target model contains two different regression branches, which can preliminarily obtain the user's two consumption amounts from two different perspectives. Then, the target model can finally determine the user's predicted consumption amount based on these two consumption amounts. The factors considered in this determination process are relatively comprehensive, which can make the user's predicted consumption amount have a sufficiently high accuracy.

[0176] Furthermore, in an embodiment of the present application, the target model can also perform a third regression process on the information to obtain the user's third consumption limit. Then, the target model can process the consumption probability, the first consumption limit, the second consumption limit, and the third consumption limit to obtain the user's predicted consumption limit. Since the first regression process, the second regression process, and the third regression process are three different regression processes, that is, the target model contains three different regression branches, the three consumption limits of the user can be preliminarily obtained from three different perspectives. Then, the target model can finally determine the user's predicted consumption limit based on these three consumption limits. The factors considered in this determination process are more comprehensive, which can make the user's predicted consumption limit have a higher accuracy.

[0177] The above is a detailed description of the consumption prediction method provided by the embodiment of the present application. The following is an introduction to the model training method provided by the embodiment of the present application. Figure 9 is a flow chart of the model training method provided by the embodiment of the present application. As shown in Figure 9, the method includes:

[0178] 901. Obtain information associated with the user.

[0179] In this embodiment, when the training model needs to be trained, a batch of training data can be obtained first, which includes information associated with the user. It should be noted that for the information associated with the user, the user's actual consumption probability and the user's actual consumption amount are known.

[0180] 902. Process the information through the model to be trained to obtain the user's predicted consumption amount. The model to be trained is used to: perform feature extraction on the information to obtain the user's consumption probability; perform a first regression process on the information to obtain the user's first consumption amount; perform a second regression process on the information to obtain the user's second consumption amount, and the first regression process and the second regression process are different regression processes; obtain the user's predicted consumption amount based on the consumption probability, the first consumption amount, and the second consumption amount.

[0181] After obtaining information associated with the user, the information can be input into the model to be trained, which then performs a series of processing on the information to obtain the user's predicted spending limit. The model to be trained can first perform feature extraction on the information to obtain the user's spending probability. Simultaneously, the model to be trained can also perform a first regression process on the information to obtain the user's first spending limit, and a second regression process on the information to obtain the user's second spending limit. The first and second regression processes are different regression processes. Finally, the model to be trained can obtain the user's predicted spending limit based on the spending probability, the first spending limit, and the second spending limit.

[0182] In one possible implementation, the model to be trained is further used to perform a third regression process on the information to obtain a third consumption limit of the user, wherein the first regression process, the second regression process, and the third regression process are different regression processes; the model to be trained is used to obtain a predicted consumption limit of the user based on the consumption probability, the first consumption limit, the second consumption limit, and the third consumption limit;

[0183] In one possible implementation, obtaining the target loss based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount includes: obtaining the target loss based on the consumption probability, the user's actual consumption probability, the first consumption amount, the second consumption amount, the third consumption amount, and the user's actual consumption amount.

[0184] In one possible implementation, the model to be trained is used to: process information based on a first multi-layer perceptron to obtain a first feature of the information; construct a target distribution based on the first feature, where the target distribution is used to indicate a correspondence between multiple consumption amounts and multiple consumption probabilities; and average the multiple consumption amounts indicated by the target distribution to obtain the user's first consumption amount.

[0185] In one possible implementation, the model to be trained is used to: process the information based on a second multi-layer perceptron to obtain a second feature of the information; and perform linear correction processing on the second feature to obtain a second consumption amount of the user.

[0186] In one possible implementation, the model to be trained is used to: process the information based on a third multi-layer perceptron to obtain a third feature of the information; and normalize the third feature to obtain a third consumption amount of the user.

[0187] In one possible implementation, the model to be trained is used to: process the information based on a fourth multi-layer perceptron to obtain a fourth feature of the information; and perform mapping processing on the fourth feature to obtain a user's consumption probability.

[0188] In one possible implementation, the model to be trained is used to: average the first consumption amount, the second consumption amount, and the third consumption amount to obtain the fourth consumption amount; multiply the consumption probability and the fourth consumption amount to obtain the user's predicted consumption amount.

[0189] It should be noted that, for the introduction of step 902, reference may be made to the relevant description of steps 502 to 505 in the embodiment shown in FIG5, which will not be repeated here.

[0190] 903. Obtain a target loss based on the consumption probability, the first consumption amount, and the second consumption amount.

[0191] After obtaining the user's consumption probability, the user's first consumption amount, and the user's second consumption amount, the consumption probability, the first consumption amount, and the second consumption amount may be calculated to obtain a target loss.

[0192] Specifically, if the model to be trained not only obtains the user's consumption probability, the user's first consumption amount, and the user's second consumption amount, but also obtains the user's third consumption amount, the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount can be calculated to obtain the target loss.

[0193] More specifically, the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount may be calculated in the following manner to obtain the target loss:

[0194] (1) Calculate the user's consumption probability and the user's actual consumption probability to obtain the first loss.

[0195] (2) Calculate the user's first consumption amount and the user's actual consumption amount to obtain the second loss.

[0196] (3) Calculate the user's second consumption amount and the user's actual consumption amount to obtain the third loss.

[0197] (4) Calculate the user's third consumption amount and the user's actual consumption amount to obtain the fourth loss.

[0198] (5) Calculate the user's consumption probability to obtain the fifth loss.

[0199] (6) Calculate the user's consumption probability and the user's first consumption amount to obtain the sixth loss.

[0200] (7) Calculate the user's consumption probability and the user's second consumption amount to obtain the seventh loss.

[0201] (8) Calculate the user's consumption probability and the user's third consumption amount to obtain the eighth loss.

[0202] (9) The first loss, the second loss, the third loss, the fourth loss, the fifth loss, the sixth loss, the seventh loss, and the eighth loss are superimposed to obtain the target loss.

[0203] Still taking the above example, as shown in Figures 10a and 10b (Figure 10a is a structural diagram of the model training framework provided in an embodiment of the present application, and Figure 10b is another structural diagram of the model training framework provided in an embodiment of the present application, and Figures 10a and 10b are drawn on the basis of Figure 7), let any information associated with the user in a batch of training data be x, and after x is processed by the model to be trained (the processing process can refer to the example shown in Figure 7, which will not be repeated here), it can be obtained as well as

[0204] Then, the following formula can be used to as well as Perform the calculation: L d = -log f(y)

[0205] In the above formula, for x, z is the actual consumption probability of the user corresponding to x, and y is the actual consumption amount of the user corresponding to x. Yes Obtained by reconstruction.

[0206] Assume that the batch of training data input to the model to be trained contains K pieces of information associated with the user [x1,...,x K ], then the model to be trained is [x1,...,x K ]After processing, we can get as well as Based on formula (12), as well as After processing, we can get [Lp,1 ,...,L p,K ]、[L d,1 ,...,L d,K ]、[L l,1 ,...,L l,K ] and [L c,1 ,...,L c,K ]. In this way, the loss L′ can be calculated p =L p,1 +...+L p,K , loss L′ d =L d,1 +...+L d,K , loss L′ l =L l,1 +...+L l,K , loss L′ c =L c,1 +...+L c,K .

[0207] Furthermore, the following formula can be used to as well as Processing:

[0208] In the above formula, is the average value of the predicted consumption probability of the user corresponding to all positive samples (i.e., the actual consumption probability of the user corresponding to these samples is 1) in K information (i.e., K samples), It is the average value of the predicted consumption probability of the user corresponding to all positive samples (that is, the actual consumption probability of the user corresponding to these samples is 0) in the K information.

[0209] Finally, the target loss can be calculated by the following formula:

[0210] 904. Based on the target loss, update the parameters of the model to be trained until the model training conditions are met to obtain the target model.

[0211] After obtaining the target loss, the target loss can be used to update the parameters of the to-be-trained model, thereby obtaining the to-be-trained model with updated parameters. The to-be-trained model with updated parameters can then be trained again using the next batch of training data until the model training conditions (e.g., target loss convergence, etc.) are met, thereby obtaining the target model in the embodiment shown in FIG5 .

[0212] The target model obtained by training in the embodiment of the present application has the function of consumption prediction. Specifically, when it is necessary to make a consumption prediction for a user, information associated with the user can be obtained first, and the information can be input into the target model. Then, the target model can perform feature extraction processing on the information to obtain the user's consumption probability. At the same time, the target model can also perform a first regression processing on the information to obtain the user's first consumption limit, and perform a second regression processing on the information to obtain the user's second consumption limit. Finally, the target model can process the consumption probability, the first consumption limit and the second consumption limit to obtain the user's predicted consumption limit. In the above process, the first regression processing and the second regression processing are two different regression processings, that is, the target model contains two different regression branches, and the two consumption limits of the user can be preliminarily obtained from two different perspectives. Then, the target model can finally determine the user's predicted consumption limit based on these two consumption limits. The factors considered in this determination process are relatively comprehensive, which can make the user's predicted consumption limit have a sufficiently high accuracy.

[0213] The above is a detailed description of the model training method provided in the embodiment of the present application. The following will introduce the consumption forecasting device and model training device provided in the embodiment of the present application. Figure 11 is a structural diagram of the consumption forecasting device provided in the embodiment of the present application. As shown in Figure 11, the device includes a target model, and the device includes:

[0214] A first acquisition module 1101 is used to acquire information associated with a user;

[0215] The first processing module 1102 is used to perform feature extraction processing on the information to obtain the user's consumption probability;

[0216] The second processing module 1103 is configured to perform a first regression process on the information to obtain a first consumption limit of the user;

[0217] The third processing module 1104 is configured to perform a second regression process on the information to obtain a second consumption limit of the user, wherein the first regression process and the second regression process are different regression processes;

[0218] The second acquisition module 1105 is configured to acquire the user's predicted consumption amount based on the consumption probability, the first consumption amount, and the second consumption amount.

[0219] In an embodiment of the present application, when it is necessary to make a consumption prediction for a user, information associated with the user can be obtained first, and the information can be input into the target model. Then, the target model can perform feature extraction processing on the information to obtain the user's consumption probability. At the same time, the target model can also perform a first regression processing on the information to obtain the user's first consumption amount, and perform a second regression processing on the information to obtain the user's second consumption amount. Finally, the target model can process the consumption probability, the first consumption amount, and the second consumption amount to obtain the user's predicted consumption amount. In the aforementioned process, the first regression processing and the second regression processing are two different regression processings, that is, the target model contains two different regression branches, which can preliminarily obtain the user's two consumption amounts from two different perspectives. Then, the target model can finally determine the user's predicted consumption amount based on these two consumption amounts. The factors considered in this determination process are relatively comprehensive, which can make the user's predicted consumption amount have a sufficiently high accuracy.

[0220] In one possible implementation, the device also includes: a fourth processing module, used to perform a third regression processing on the information to obtain the user's third consumption amount, the first regression processing, the second regression processing and the third regression processing are different regression processing; a second acquisition module 1105, used to obtain the user's predicted consumption amount based on the consumption probability, the first consumption amount, the second consumption amount and the third consumption amount.

[0221] In one possible implementation, the second processing module 1103 is used to: process the information based on the first multi-layer perceptron to obtain the first feature of the information; construct a target distribution based on the first feature, and the target distribution is used to indicate the correspondence between multiple consumption amounts and multiple consumption probabilities; and average the multiple consumption amounts indicated by the target distribution to obtain the user's first consumption amount.

[0222] In one possible implementation, the third processing module 1104 is configured to: process the information based on a second multi-layer perceptron to obtain a second feature of the information; and perform linear correction processing on the second feature to obtain a second consumption amount of the user.

[0223] In one possible implementation, the fourth processing module is used to: process the information based on a third multi-layer perceptron to obtain a third feature of the information; and normalize the third feature to obtain a third consumption amount of the user.

[0224] In one possible implementation, the first processing module 1102 is configured to: process the information based on a fourth multi-layer perceptron to obtain a fourth feature of the information; and perform mapping processing on the fourth feature to obtain a consumption probability of the user.

[0225] In one possible implementation, the second acquisition module 1105 is configured to: average the first consumption amount, the second consumption amount, and the third consumption amount to obtain a fourth consumption amount; and multiply the consumption probability and the fourth consumption amount to obtain a predicted consumption amount of the user.

[0226] FIG12 is a schematic diagram of a structure of a model training device provided in an embodiment of the present application. As shown in FIG12 , the device includes:

[0227] A first acquisition module 1201 is used to acquire information associated with a user;

[0228] Processing module 1202 is configured to process the information using a to-be-trained model to obtain a user's predicted spending limit. The to-be-trained model is configured to: perform feature extraction on the information to obtain the user's spending probability; perform a first regression process on the information to obtain the user's first spending limit; perform a second regression process on the information to obtain the user's second spending limit, wherein the first and second regression processes are different regression processes; and obtain the user's predicted spending limit based on the spending probability, the first spending limit, and the second spending limit.

[0229] The second acquisition module 1203 is configured to acquire a target loss based on the consumption probability, the first consumption amount, and the second consumption amount;

[0230] The updating module 1204 is used to update the parameters of the to-be-trained model based on the target loss until the model training conditions are met to obtain the target model.

[0231] The target model obtained by training in the embodiment of the present application has the function of consumption prediction. Specifically, when it is necessary to make a consumption prediction for a user, information associated with the user can be obtained first, and the information can be input into the target model. Then, the target model can perform feature extraction processing on the information to obtain the user's consumption probability. At the same time, the target model can also perform a first regression processing on the information to obtain the user's first consumption limit, and perform a second regression processing on the information to obtain the user's second consumption limit. Finally, the target model can process the consumption probability, the first consumption limit and the second consumption limit to obtain the user's predicted consumption limit. In the above process, the first regression processing and the second regression processing are two different regression processings, that is, the target model contains two different regression branches, and the two consumption limits of the user can be preliminarily obtained from two different perspectives. Then, the target model can finally determine the user's predicted consumption limit based on these two consumption limits. The factors considered in this determination process are relatively comprehensive, which can make the user's predicted consumption limit have a sufficiently high accuracy.

[0232] In one possible implementation, the model to be trained is also used to perform a third regression processing on the information to obtain the user's third consumption amount, and the first regression processing, the second regression processing, and the third regression processing are different regression processing; the model to be trained is used to obtain the user's predicted consumption amount based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount; the update module 1204 is used to obtain the target loss based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount.

[0233] In one possible implementation, the updating module 1204 is configured to obtain a target loss based on the consumption probability, the user's actual consumption probability, the first consumption amount, the second consumption amount, the third consumption amount, and the user's actual consumption amount.

[0234] In one possible implementation, the model to be trained is used to: process information based on a first multi-layer perceptron to obtain a first feature of the information; construct a target distribution based on the first feature, where the target distribution is used to indicate a correspondence between multiple consumption amounts and multiple consumption probabilities; and average the multiple consumption amounts indicated by the target distribution to obtain the user's first consumption amount.

[0235] In one possible implementation, the model to be trained is used to: process the information based on a second multi-layer perceptron to obtain a second feature of the information; and perform linear correction processing on the second feature to obtain a second consumption amount of the user.

[0236] In one possible implementation, the model to be trained is used to: process the information based on a third multi-layer perceptron to obtain a third feature of the information; and normalize the third feature to obtain a third consumption amount of the user.

[0237] In one possible implementation, the model to be trained is used to: process the information based on a fourth multi-layer perceptron to obtain a fourth feature of the information; and perform mapping processing on the fourth feature to obtain a user's consumption probability.

[0238] In one possible implementation, the model to be trained is used to: average the first consumption amount, the second consumption amount, and the third consumption amount to obtain a fourth consumption amount; and multiply the consumption probability and the fourth consumption amount to obtain the user's predicted consumption amount.

[0239] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the embodiment of the present application, and no further details will be given here.

[0240] The embodiment of the present application also relates to an execution device, and Figure 13 is a structural diagram of the execution device provided by the embodiment of the present application. As shown in Figure 13, the execution device 1300 can be specifically manifested as a mobile phone, a tablet, a laptop computer, an intelligent wearable device, a server, etc., which is not limited here. Among them, the consumption prediction device described in the embodiment corresponding to Figure 11 can be deployed on the execution device 1300 to implement the function of consumption prediction in the embodiment corresponding to Figure 5. Specifically, the execution device 1300 includes: a receiver 1301, a transmitter 1302, a processor 1303 and a memory 1304 (wherein the number of processors 1303 in the execution device 1300 can be one or more, and Figure 13 takes one processor as an example), wherein the processor 1303 may include an application processor 13031 and a communication processor 13032. In some embodiments of the present application, the receiver 1301, the transmitter 1302, the processor 1303 and the memory 1304 can be connected via a bus or other means.

[0241] Memory 1304 may include read-only memory and random access memory, and provides instructions and data to processor 1303. A portion of memory 1304 may also include non-volatile random access memory (NVRAM). Memory 1304 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.

[0242] Processor 1303 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.

[0243] The methods disclosed in the above embodiments of the present application can be applied to or implemented by processor 1303. Processor 1303 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in processor 1303. The above processor 1303 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and can further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 1303 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 1304, and processor 1303 reads the information in memory 1304 and, in conjunction with its hardware, completes the steps of the above method.

[0244] Receiver 1301 can be used to receive input digital or character information and generate signal input related to executing device-related settings and function control. Transmitter 1302 can be used to output digital or character information through the first interface. Transmitter 1302 can also be used to send instructions to the disk pack through the first interface to modify data in the disk pack. Transmitter 1302 can also include a display device such as a display screen.

[0245] In an embodiment of the present application, in one case, the processor 1303 is configured to obtain the user's consumption amount through the target model in the embodiment corresponding to FIG5 .

[0246] The present application also relates to a training device. FIG14 is a schematic diagram of the structure of the training device provided by the present application. As shown in FIG14 , the training device 1400 is implemented by one or more servers. The training device 1400 may vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1414 (e.g., one or more processors) and memory 1432, and one or more storage media 1430 (e.g., one or more mass storage devices) storing application programs 1442 or data 1444. The memory 1432 and storage medium 1430 may be temporary storage or permanent storage. The program stored in the storage medium 1430 may include one or more modules (not shown), each module may include a series of instruction operations in the training device. Furthermore, the CPU 1414 may be configured to communicate with the storage medium 1430 to execute the series of instruction operations in the storage medium 1430 on the training device 1400.

[0247] The training device 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458; or, one or more operating systems 1441, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0248] Specifically, the training device can execute the model training method in the embodiment corresponding to Figure 9.

[0249] An embodiment of the present application also relates to a computer storage medium, which stores a program for signal processing. When the computer storage medium is run on a computer, it enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.

[0250] An embodiment of the present application also relates to a computer program product, which stores instructions that, when executed by a computer, enable the computer to execute the steps executed by the aforementioned execution device, or enable the computer to execute the steps executed by the aforementioned training device.

[0251] The execution device, training device or terminal device provided in the embodiments of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0252] Specifically, see Figure 15 , which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip may be a neural network processor (NPU) 1500. NPU 1500 is mounted on a host CPU (host CPU) as a coprocessor, with tasks assigned by the host CPU. The core of the NPU is arithmetic circuit 1503, which is controlled by controller 1504 to extract matrix data from memory and perform multiplication operations.

[0253] In some implementations, arithmetic circuit 1503 includes multiple processing units (PEs). In some implementations, arithmetic circuit 1503 is a two-dimensional systolic array. Arithmetic circuit 1503 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, arithmetic circuit 1503 is a general-purpose matrix processor.

[0254] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1502 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1501 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1508.

[0255] Unified memory 1506 is used to store input and output data. Weight data is directly transferred to weight memory 1502 through the Direct Memory Access Controller (DMAC) 1505. Input data is also transferred to unified memory 1506 through the DMAC.

[0256] BIU stands for Bus Interface Unit, i.e., bus interface unit 1513 , which is used for interaction between the AXI bus, DMAC, and instruction fetch buffer (IFB) 1509 .

[0257] The bus interface unit 1513 (BIU) is used for the instruction fetch memory 1509 to obtain instructions from the external memory, and is also used for the storage unit access controller 1505 to obtain the original data of the input matrix A or the weight matrix B from the external memory.

[0258] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 1506 or transfer weight data to the weight memory 1502 or transfer input data to the input memory 1501.

[0259] The vector calculation unit 1507 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit 1503, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of the predicted label plane.

[0260] In some implementations, the vector calculation unit 1507 can store the processed output vector to the unified memory 1506. For example, the vector calculation unit 1507 can apply a linear function or a nonlinear function to the output of the operation circuit 1503, such as linear interpolation of the predicted label plane extracted by the convolution layer, or another example is a vector of accumulated values ​​to generate an activation value. In some implementations, the vector calculation unit 1507 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1503, for example, for use in subsequent layers in a neural network.

[0261] An instruction fetch buffer 1509 connected to the controller 1504 is used to store instructions used by the controller 1504;

[0262] Unified memory 1506, input memory 1501, weight memory 1502, and instruction fetch memory 1509 are all on-chip memories. External memories are private to the NPU hardware architecture.

[0263] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.

[0264] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, 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 across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0265] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this 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 product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0266] 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 product.

[0267] The computer program product 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 can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can 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 can be transmitted from a website, computer, training equipment or data center to another website, computer, training equipment or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training equipment, data center, etc. that includes one or more available media integrations. The available medium can 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)).

Claims

1. A consumption forecasting method, characterized in that: The method is implemented by a target model, and the method comprises: Obtain information associated with a user; Performing feature extraction processing on the information to obtain the consumption probability of the user; Performing a first regression process on the information to obtain a first consumption amount of the user; Performing a second regression process on the information to obtain a second consumption amount of the user, wherein the first regression process and the second regression process are different regression processes; Based on the consumption probability, the first consumption amount, and the second consumption amount, a predicted consumption amount of the user is obtained.

2. The method according to claim 1, characterized in that: The method further comprises: Performing a third regression process on the information to obtain a third consumption amount of the user, wherein the first regression process, the second regression process and the third regression process are different regression processes; The acquiring the predicted consumption amount of the user based on the consumption probability, the first consumption amount, and the second consumption amount includes: Based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount, a predicted consumption amount of the user is obtained.

3. The method according to claim 1 or 2, characterized in that: The performing a first regression process on the information to obtain the first consumption amount of the user includes: Processing the information based on a first multi-layer perceptron to obtain a first feature of the information; constructing a target distribution based on the first feature, where the target distribution is used to indicate a corresponding relationship between a plurality of consumption amounts and a plurality of consumption probabilities; The plurality of consumption amounts indicated by the target distribution are averaged to obtain a first consumption amount of the user.

4. The method according to any one of claims 1 to 3, characterized in that: The performing a second regression process on the information to obtain the second consumption amount of the user comprises: Processing the information based on a second multi-layer perceptron to obtain a second feature of the information; Perform linear correction processing on the second feature to obtain a second consumption amount of the user.

5. The method according to claim 2, characterized in that: The performing third regression processing on the information to obtain the third consumption amount of the user comprises: Processing the information based on a third multi-layer perceptron to obtain a third feature of the information; The third feature is normalized to obtain the third consumption amount of the user.

6. The method according to claim 2 or 5, characterized in that: The acquiring the predicted consumption amount of the user based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount includes: averaging the first consumption amount, the second consumption amount, and the third consumption amount to obtain a fourth consumption amount; The consumption probability and the fourth consumption amount are multiplied to obtain the predicted consumption amount of the user.

7. A model training method, characterized in that: The method comprises: Obtain information associated with a user; The information is processed by a model to be trained to obtain a predicted consumption amount of the user, wherein the model to be trained is used to: perform feature extraction processing on the information to obtain a consumption probability of the user; perform a first regression processing on the information to obtain a first consumption amount of the user; perform a second regression processing on the information to obtain a second consumption amount of the user, wherein the first regression processing and the second regression processing are different regression processing; based on the consumption probability, the first consumption amount and the second consumption amount, obtain a predicted consumption amount of the user; Obtaining a target loss based on the consumption probability, the first consumption amount, and the second consumption amount; Based on the target loss, the parameters of the model to be trained are updated until the model training conditions are met to obtain the target model.

8. The method according to claim 7, characterized in that The model to be trained is further used to perform a third regression process on the information to obtain a third consumption amount of the user, wherein the first regression process, the second regression process and the third regression process are different regression processes; The model to be trained is used to obtain the predicted consumption amount of the user based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount; The acquiring the target loss based on the consumption probability, the first consumption amount, and the second consumption amount includes: A target loss is obtained based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount.

9. The method according to claim 8, characterized in that The acquiring the target loss based on the consumption probability, the first consumption amount, the second consumption amount, and the third consumption amount includes: A target loss is obtained based on the consumption probability, the actual consumption probability of the user, the first consumption amount, the second consumption amount, the third consumption amount, and the actual consumption amount of the user.

10. The method according to any one of claims 7 to 9, characterized in that: The model to be trained is used for: Processing the information based on a first multi-layer perceptron to obtain a first feature of the information; constructing a target distribution based on the first feature, where the target distribution is used to indicate a corresponding relationship between a plurality of consumption amounts and a plurality of consumption probabilities; The multiple consumption amounts indicated by the target distribution are averaged to obtain a first consumption amount of the user.

11. The method according to any one of claims 7 to 10, characterized in that: The model to be trained is used for: Processing the information based on a second multi-layer perceptron to obtain a second feature of the information; Perform linear correction processing on the second feature to obtain a second consumption amount of the user.

12. The method according to claim 8 or 9, characterized in that: The model to be trained is used for: Processing the information based on a third multi-layer perceptron to obtain a third feature of the information; The third feature is normalized to obtain the third consumption amount of the user.

13. The method according to claim 8, 9 or 12, characterized in that The model to be trained is used for: averaging the first consumption amount, the second consumption amount, and the third consumption amount to obtain a fourth consumption amount; The consumption probability and the fourth consumption amount are multiplied to obtain the predicted consumption amount of the user.

14. A consumption prediction device, characterized in that: The device comprises a target model, and the device comprises: A first acquisition module, used to acquire information associated with a user; A first processing module is used to perform feature extraction processing on the information to obtain the consumption probability of the user; A second processing module, configured to perform a first regression process on the information to obtain a first consumption amount of the user; A third processing module is used to perform a second regression process on the information to obtain a second consumption amount of the user, wherein the first regression process and the second regression process are different regression processes; The second acquisition module is used to acquire the predicted consumption amount of the user based on the consumption probability, the first consumption amount and the second consumption amount.

15. A model training device, characterized in that: The device comprises: A first acquisition module, used to acquire information associated with a user; a processing module, configured to process the information through a model to be trained to obtain a predicted consumption amount of the user, wherein the model to be trained is configured to: perform feature extraction processing on the information to obtain a consumption probability of the user; perform a first regression processing on the information to obtain a first consumption amount of the user; perform a second regression processing on the information to obtain a second consumption amount of the user, wherein the first regression processing and the second regression processing are different regression processing; and obtain a predicted consumption amount of the user based on the consumption probability, the first consumption amount, and the second consumption amount; A second acquisition module, configured to acquire a target loss based on the consumption probability, the first consumption amount, and the second consumption amount; The updating module is used to update the parameters of the model to be trained based on the target loss until the model training conditions are met to obtain the target model.

16. A consumption prediction device, characterized in that: The device includes a memory and a processor; the memory stores codes, and the processor is configured to execute the codes. When the codes are executed, the consumption prediction device executes the method according to any one of claims 1 to 13.

17. A computer storage medium, characterized in that: The computer storage medium stores one or more instructions, which, when executed by one or more computers, enable the one or more computers to implement the method of any one of claims 1 to 13.

18. A computer program product, characterized in that The computer program product stores instructions, which, when executed by a computer, enable the computer to implement the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Consumption prediction method and related equipment thereof

    CN116611861A

  • Consumer consumption prediction method, device, electronic device, and storage medium

    CN109214585A

  • Consumption level prediction method and device, electronic equipment and storage medium

    CN110880127A

  • User consumption ability prediction method and device, electronic equipment and storage medium

    CN113313538A

  • Method and device for predicting consumption time

    CN115630985A