Market equilibrium model training method and analysis method based on deep learning, equipment, medium and product

Through the market equilibrium analysis model training method based on deep learning, it solves the problems of high calculation cost and large resource consumption in the existing technology, realizes efficient market equilibrium analysis, is suitable for large-scale market scenarios, and improves the accuracy of analysis. and robustness.

CN118537040AInactive Publication Date: 2024-08-23北京大学武汉人工智能研究院 +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410513225.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing market equilibrium analysis methods are computationally expensive, consume too much time and processor resources, and are difficult to implement in scenarios where the number of consumers and markets is huge.

Method used

Using the market equilibrium analysis model training method based on deep learning, by constructing multi-market training data, the deep learning model is trained to output the allocation plan and commodity prices, and the model parameters are adjusted through the loss function until the preset conditions are met, and the market equilibrium analysis is obtained Model.

Benefits of technology

It significantly reduces the calculation cost, saves running time and processor resources, improves the accuracy and generalization ability of market equilibrium analysis, and is suitable for different market sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537040A
    Figure CN118537040A
Patent Text Reader

Abstract

The embodiment of the invention provides a market equilibrium model training method and analysis method based on deep learning, equipment, a medium and a product. The model training method comprises the steps that S1, training data of multiple markets are constructed, and the training data comprise consumer data and commodity data of each market; s2, training a deep learning model based on the training data, and outputting a distribution scheme and commodity prices; s3, calculating a loss function according to the distribution scheme and the commodity price; s4, adjusting parameters of the deep learning model based on the loss function; and S5, repeatedly executing the steps S2-S4 until a calculation result of the loss function meets a preset condition, and obtaining a market equilibrium analysis model. According to the embodiment of the invention, the deep learning model is trained for market equilibrium analysis, the time cost consumed in the analysis process is greatly reduced, and processor resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of deep learning technology, and in particular to a market equilibrium model training method, analysis method, equipment, medium and product based on deep learning. Background Art

[0002] Market equilibrium analysis refers to the study of how individuals exchange goods in a group so that everyone can obtain better utility and the allocation of social resources reaches the group's optimal level. Some methods of market equilibrium analysis have been proposed in multiple specific markets. For example, the Chinese patent application "A method, device, equipment and medium for optimizing power market equilibrium" (application number: 201810190293.2) proposes a method for optimizing power market equilibrium, and "A method for obtaining a carbon emission trading market equilibrium simulation system" (application number: 201910671254.9) uses existing data to simulate and analyze the dynamic equilibrium of the carbon market.

[0003] Existing research has proven that when everyone's utility function is linear, the solution to the EG-convex optimization problem constitutes a market equilibrium, and the solution to the EG-convex optimization problem is also applicable to all continuous, concave, non-negative, homogeneous (CCNH) utility functions. When calculating the market equilibrium problem of CCNH utility functions, existing methods usually use traditional optimization or online learning techniques, which can accurately solve the market equilibrium for a market of about 400 consumers and commodities.

[0004] However, in reality, there may be many markets in a relatively short period of time, and each market has a large number of consumers and goods. For example, if there are K markets, each market has n consumers and m goods, then the existing method requires at least O(KNM) computational cost. In such a scenario with a large number of markets, the existing method consumes too high a time cost and processor resources, and is difficult to be implemented in practice. Summary of the invention

[0005] The embodiments of the present application provide a market equilibrium model training method, analysis method, device, medium and product based on deep learning. By training a deep learning model for market equilibrium analysis, the technical problems of the related technology that the analysis process has a huge amount of calculation and consumes too high a time cost and processor resources are solved.

[0006] In a first aspect, an embodiment of the present application provides a market equilibrium analysis model training method based on deep learning, comprising:

[0007] S1. Construct training data for multiple markets, wherein the training data includes consumer data and product data for each market;

[0008] S2. Training the deep learning model based on the training data, and outputting the allocation plan and commodity prices;

[0009] S3. Calculate the loss function according to the allocation plan and commodity prices;

[0010] S4. Adjusting the parameters of the deep learning model based on the loss function;

[0011] S5. Repeat steps S2 to S4 until the calculation result of the loss function meets the preset conditions, thereby obtaining a market equilibrium analysis model.

[0012] In a second aspect, an embodiment of the present application provides a market equilibrium analysis method based on deep learning, including:

[0013] Obtain consumer data and product data for the market to be analyzed;

[0014] Inputting the consumer data and commodity data into a market equilibrium analysis model, and outputting an allocation plan and commodity prices;

[0015] Wherein, the market equilibrium analysis model is trained according to the market equilibrium analysis model training method described in the first aspect.

[0016] In a third aspect, an embodiment of the present application provides a computer device, including: a memory and one or more processors;

[0017] The memory is used to store one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the market equilibrium analysis model training method as described in the first aspect or the market equilibrium analysis method as described in the second aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a non-volatile storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the market equilibrium analysis model training method as described in the first aspect or the market equilibrium analysis method as described in the second aspect.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the market equilibrium analysis model training method as described in the first aspect or the market equilibrium analysis method as described in the second aspect.

[0021] In one or more technical solutions provided in the embodiments of the present application, a new analysis method based on deep learning is proposed. By constructing training data including multiple markets, a deep learning model is trained to obtain a market equilibrium analysis model, and then the trained market equilibrium analysis model is used to perform analysis calculations, which greatly reduces the computational cost and saves running time and processor resources. It successfully solves the problem of huge computational complexity that is difficult to handle in scenarios with a large number of consumers and a large number of markets. Moreover, by designing the structure and constraints of the deep learning model, the embodiments of the present application have good generalization ability and robustness under different market sizes. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of application scenarios of the model training method and the market equilibrium analysis method provided in the embodiments of the present application;

[0023] Figure 2 It is a flow chart of a market equilibrium analysis model training method based on deep learning provided in an embodiment of the present application;

[0024] Figure 3 is a flow chart of a market equilibrium analysis method based on deep learning provided in an embodiment of the present application;

[0025] Figure 4 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The above process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The above process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0027] Artificial Intelligence (AI) is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. It has been widely used in many fields. Deep Learning (DL) is a technology used to realize artificial intelligence. It enables machines to have analytical capabilities by learning the inherent laws and representation levels of sample data. A deep learning model is actually a neural network with multiple hidden layers, including, for example, convolutional neural networks (CNNs), deep belief networks (DBNs), recurrent neural networks (RNNs), etc.

[0028] Figure 1 Schematic diagram of application scenarios of the model training method and market equilibrium analysis method provided in the embodiments of the present application. In this exemplary application scenario, the model training method is executed by server 11, which uses pre-built training data as input, trains the deep learning model to generate a market equilibrium analysis model, and sends the generated market equilibrium analysis model to the terminal device or other server end. Taking sending to server 12 as an example, server 12 can receive market data to be analyzed submitted by users or from other sources, call the generated market equilibrium analysis model, and output the allocation plan and commodity prices of the market.

[0029] It should be understood that the market equilibrium analysis model training method and analysis method provided in the embodiments of the present application can be applied to any electronic device with corresponding processing capabilities, such as terminal devices, servers, etc. Among them, the terminal device can specifically be a smart phone, a computer, a personal digital assistant (PDA), a tablet computer, etc.; the server can specifically be an application server or a Web server. In actual application deployment, the server can be an independent server or a cluster server.

[0030] Figure 2 A flowchart of a market equilibrium analysis model training method provided in an embodiment of the present application. The execution subject of the model training method is a device with model training capabilities, including a terminal device, a server or a server cluster.

[0031] like Figure 2 As shown, the model training method includes:

[0032] S1. Construct training data for multiple markets, wherein the training data includes consumer data and product data for each market;

[0033] The consumer data includes the context data b of each consumer i. i, including one or more of age, gender, job, income, marital status, etc. The product data includes the context data g of each product j j , including one or more of the type, efficacy, brand, features, shelf life, etc. of the product

[0034] S2. Train a deep learning model based on the training data, and output an allocation plan and product prices

[0035] In one embodiment, the step S2 includes

[0036] Randomly sample the training data of M markets from the training data to train the deep learning model. If S1 constructs the training data including K markets, then M < K. By randomly sampling the training data of M markets in each iteration to train the network, the computational cost of the loss function can be reduced, thereby further reducing the time cost and processing resource consumption

[0037] In one embodiment, the deep learning model has permutation equivariance and satisfies the following constraint conditions

[0038]

[0039]

[0040] Among them, n represents the number of consumers, m represents the number of product types, x ij represents the quantity of product j allocated to consumer i, p j represents the price of product j, B(i) represents the budget of consumer i, and c represents the quantity of product j. Through the above constraint condition setting, the market clearing and price constraints are satisfied

[0041] The deep learning model can process inputs with variable lengths, so as to respond to the training data of markets with different numbers of consumers and products

[0042] In one embodiment, the deep learning model includes a Transformer architecture

[0043] S3. Calculate the loss function according to the allocation plan and product prices

[0044] In one embodiment, the loss function is the average Nash Gap (abbreviated as GAP) of the M markets, and the GAP of each market is calculated in the following manner

[0045] GAP(x,p) = LFW(p) - LNW(x)

[0046]

[0047]

[0048]

[0049] Among them, u i (x i ) means that consumer i has x for each commodity j ij The utility value of the time, B i represents the budget of consumer i, B total represents the total budget of all consumers.

[0050] The utility value u i (x i ) is based on the quantity of goods owned by consumer i and the utility value v of consumer i for the goods ij In the case of linear utility, u i (x i )=∑ j x ij v ij , while in the case of CCNH utility, u i (x i ) can have more complex forms, but all depend on v ij The consumer's utility value for the product is v ij =v(b i ,g j ), that is, the context is b i Consumer i has context g j The utility value generated by commodity j, the context b of consumer i i Represents the characteristics of consumers, such as income, age, preferences for historical products, etc., the context g of product j j Represents the characteristics of the product, such as the product's purpose, quality, performance, shelf life, etc. The utility value is quantified by collecting historical purchase data such as consumers' consumption data and / or evaluation data on the product.

[0051] S4. Adjusting the parameters of the deep learning model based on the loss function;

[0052] S5. Repeat steps S2 to S4 until the calculation result of the loss function meets the preset conditions, thereby obtaining a market equilibrium analysis model.

[0053] In one embodiment, the calculation result of the loss function satisfies a preset condition, which means minimizing the average GAP.

[0054] When the preset conditions are met, the deep learning model is output as a market equilibrium analysis model.

[0055] In the above method provided in the embodiment of the present application, by constructing training data including multiple markets, training the deep learning model to obtain the market equilibrium analysis model, and then using the trained market equilibrium analysis model to perform analytical calculations, the computational cost is greatly reduced, the running time and processor resources are saved, and the problem of huge computational complexity that is difficult to handle in scenarios with a large number of consumers and a large number of markets is successfully solved; by considering the contextual information of consumers and commodities in the design of the loss function, the market information can be maximized and the accuracy of the market equilibrium analysis can be effectively improved; by designing the structure and constraints of the deep learning model, the embodiment of the present application has good generalization ability and robustness under different market sizes.

[0056] Figure 3 A flowchart of a market equilibrium analysis method provided in an embodiment of the present application. The execution subject of the analysis method is a device with model reasoning capability, including a terminal device, a server or a server cluster, etc. Figure 3 As shown, the analysis method includes:

[0057] S31. Obtain consumer data and product data of the market to be analyzed;

[0058] There is one market to be analyzed. The consumer data includes context data of each consumer in the market to be analyzed, including one or more of age, gender, job, income, marital status, etc., and the commodity data includes context data of each commodity in the market to be analyzed, including one or more of the type, efficacy, brand, characteristics, shelf life, etc. of the commodity.

[0059] S32, inputting the consumer data and commodity data into a market equilibrium analysis model, and outputting a distribution plan and commodity prices;

[0060] The market equilibrium analysis model is based on Figure 2 The market equilibrium analysis model training method shown is used for training.

[0061] In the above method provided in the embodiment of the present application, by using the trained market equilibrium analysis model to perform analytical calculations, the computational cost is greatly reduced, the running time and processor resources are saved, and the problem of huge computational complexity that is difficult to handle in scenarios with a large number of consumers and a large number of markets is successfully solved, and the accuracy of market equilibrium analysis is effectively improved.

[0062] In order to facilitate understanding of the model training method and market equilibrium analysis method provided in the above embodiments of the present application, the specific implementation process is described in detail below.

[0063] First, we collect and construct training data for K markets, which includes consumer data and product data for each market. The consumer data includes context data b for each consumer i. i , including one or more of age, gender, job, income, marital status, etc., which is the characteristic data of consumer i; product data includes context data g for each product j j , including one or more of the type, efficacy, brand, characteristics, shelf life, etc. of the product, which is the characteristic data of product j. Suppose there are n consumers and m products in the market, consumer i represents the i-th consumer in the market, and product j represents the j-th product in the market.

[0064] Considering that the value of the number of markets K may be large, if the training data of all markets is used, the target loss function calculation will have too high a computational cost. Therefore, in each iteration, it is necessary to randomly sample the training data of M markets to train the deep learning model. Optionally, in order to balance the computational cost and training efficiency, there should be 1< <M<<K。

[0065] Then, the training data of M randomly sampled markets are input into the deep learning model to output the allocation plan and commodity prices.

[0066] The network architecture used by this deep learning model has the following three characteristics:

[0067] - The network has the ability to handle variable length inputs, and the model can respond to markets with different numbers of consumers and goods;

[0068] - It is equivariant to any permutation of consumers and goods, so that the distribution and price of the model output are equivariant to any permutation of the order of consumers and goods, because any permutation of consumers and goods has no effect on the overall market equilibrium analysis;

[0069] - Satisfy market clearing and price constraints. Specifically, the constraints are as follows:

[0070]

[0071]

[0072] Among them, n represents the number of consumers, m represents the number of commodity types, and x ij represents the quantity of commodity j allocated to consumer i, p j represents the price of commodity j, B(i) represents the budget of consumer i, and c represents the quantity of commodity j.

[0073] Specifically, in this embodiment, the deep learning model adopts the Transformer architecture. The characteristic of Transformer is that it has no requirements on the length of the input sequence, which provides more flexibility for the model. For example, the network can be trained on a small-scale market and then applied to a large-scale market. The self-attention mechanism in Transformer essentially provides permutation equivariance. If the order of the input sequence changes, the weighted order of self-attention will be adjusted accordingly to keep the output consistent. The network architecture is specifically composed of three parts: (1) broadcast-packaging consumer data and product data together to form a unique "consumer-product pair" for each consumer and each product; (2) performing information exchange and global averaging for all "consumer-product pairs"; (3) reducing the feature dimension to 2 and performing the following softmax processing:

[0074]

[0075]

[0076] Among them, F x ∈R n×m ,F p ∈R m , represents the final feature map before outputting the final allocation result and price.

[0077] Since the softmax function is used for normalization and the output is guaranteed to be greater than 0, the distribution satisfies: And the price meets:

[0078] In each iteration, the loss function is calculated based on the allocation plan and commodity price output by the model. In the embodiment of the present application, a target loss function is proposed, which is the average Nash gap (Nash-Gap, referred to as GAP) of the M markets. The GAP of each market is calculated as follows:

[0079] GAP(x,p)=LFW(p)-LNW(x)

[0080]

[0081]

[0082]

[0083] Among them, u i (x i ) means that consumer i has x for each commodity j ij The utility value of the time, B irepresents the budget of consumer i, B total represents the total budget of all consumers.

[0084] The utility value u i (x i ) is determined based on the quantity of goods owned by consumer i and the utility value of consumer i to the goods. In the case of linear utility, u i (x i )=∑ j x ij v ij , while in the case of CCNH utility, u i (x i ) can have more complex forms, but all depend on v ij The utility value v of the consumer for the product ij =v(b i ,g j ), indicating that the context is b i Consumer i has context g j The utility value generated by commodity j, the context b of consumer i i Represents the characteristics of consumers, such as income, age, preferences for historical products, etc., the context g of product j j Represents the characteristics of the product, such as the product's purpose, quality, performance, shelf life, etc. The utility value is quantified by collecting historical purchase data such as consumers' consumption data and / or evaluation data on the product.

[0085] Theoretically, GAP(x,p)≥0 and (x,p) is a market equilibrium if and only if GAP(x,p)=0. Therefore, in order to obtain market equilibrium, we only need to minimize GAP(x,p), that is, to optimize with the minimization of average GAP as the optimization goal. If the calculation result of the loss function does not meet the minimum average GAP, the parameters of the deep learning model are adjusted, and the training data of M markets are continuously randomly sampled, and the above process is repeated for iterative training until the average GAP no longer decreases in multiple trainings. Then the calculation result of the loss function reaches the minimum average GAP, the training of the deep learning model is completed, and the output model is used as the market equilibrium analysis model.

[0086] It should be noted that the model training method and market equilibrium analysis method proposed in the embodiment of the present application are named MarketTransNet method, which can be applicable to any market, such as electricity market, energy market, carbon neutrality market, electronic products and other daily consumer goods markets, etc.

[0087] Based on the above practical example, the present application embodiment also provides a computer device, referring to Figure 4, the computer device includes: a processor 41, a memory 42, a communication module 43, an input device 44 and an output device 45. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method described in any embodiment of the present application. The communication module 43 is configured to perform data transmission. The processor 41 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 42, that is, realizes the above-mentioned model training method and market equilibrium analysis method. The input device 44 can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device 45 may include a display device such as a display screen. The above-mentioned computer device can be configured to execute the method provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.

[0088] On the basis of the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute a model training method or a market equilibrium analysis method when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the computer-executable instructions of the computer-readable storage medium provided in the embodiments of the present application are not limited to the methods described above, and may also execute related operations in the methods provided in any embodiments of the present application.

[0089] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The essence of the technical solution of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium and includes a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the method described in each embodiment of the present application.

[0090] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made to the present application by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A market equilibrium analysis model training method based on deep learning, It is characterized in that include: S1. Construct training data for multiple markets, wherein the training data includes consumer data and product data for each market; S2. Training the deep learning model based on the training data, and outputting the allocation plan and commodity prices; S3. Calculate the loss function according to the allocation plan and commodity prices; S4. Adjusting the parameters of the deep learning model based on the loss function; S5. Repeat steps S2 to S4 until the calculation result of the loss function meets the preset conditions, thereby obtaining a market equilibrium analysis model.

2. The market equilibrium analysis model training method according to claim 1, It is characterized in that The step S2 comprises: The training data of M markets are randomly sampled from the training data to train the deep learning model.

3. The market equilibrium analysis model training method according to claim 1 or 2, It is characterized in that The deep learning model has permutation equivariance and satisfies the following constraints: Among them, n represents the number of consumers, m represents the number of commodity types, and x ij represents the quantity of commodity j allocated to consumer i, p j represents the price of commodity j, B(i) represents the budget of consumer i, and c represents the quantity of commodity j.

4. The market equilibrium analysis model training method according to claim 3, It is characterized in that The deep learning model includes a Transformer architecture.

5. The market equilibrium analysis model training method according to claim 3, It is characterized in that In step S3, the loss function is the average Nash gap of the M markets, and the Nash gap GAP of each market is calculated as follows: GAP(x,p)=LFW(p)-LNW(x) Among them, u i (x i ) means that consumer i has x for each commodity j ij The utility value of the time, B i represents the budget of consumer i, B total represents the total budget of all consumers.

6. The market equilibrium analysis model training method according to claim 5, It is characterized in that The calculation result of the loss function satisfies the preset condition and minimizes the average Nash gap.

7. A market equilibrium analysis method based on deep learning, It is characterized in that include: Obtain consumer data and product data for the market to be analyzed; Inputting the consumer data and commodity data into a market equilibrium analysis model, and outputting an allocation plan and commodity prices; Wherein, the market equilibrium analysis model is trained according to the market equilibrium analysis model training method according to any one of claims 1-6.

8. A computer device, It is characterized in that include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the market equilibrium analysis model training method as described in any one of claims 1 to 6 or the market equilibrium analysis method as described in claim 7.

9. A non-volatile storage medium storing computer executable instructions, It is characterized in that The computer executable instructions, when executed by a computer processor, are used to execute the market equilibrium analysis model training method as described in any one of claims 1 to 6 or the market equilibrium analysis method as described in claim 7.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the market equilibrium analysis model training method as described in any one of claims 1 to 6 or the market equilibrium analysis method as described in claim 7 is implemented.

Citation Information

Patent Citations

  • Demand response resource coordinated scheduling method and system

    CN113222422A

  • Power grid dispatching optimization method and system based on WCVaR risk analysis

    CN113435714A

  • Power distribution network double-layer scheduling method and system based on dynamic matching of electric vehicle and charging facility

    CN114548644A

  • Intelligent scheduling method for unit operation equipment of thermal power plant

    CN117474239A