Resource allocation method, device, readable medium and electronic device
By providing timely resources to data providers and determining allocation plans based on the time and quantity of resources, the problem of insufficient participation of data providers in joint learning is solved, and reasonable resource allocation and model training efficiency are achieved.
Patent Information
- Application Number
- CN202011392893.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-02
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2040-12-02
AI Technical Summary
In the prior art, it is difficult for energy users to collect massive user data to train accurate prediction models, resulting in high joint learning costs and a reasonable resource allocation method is needed to encourage more data providers to participate.
By determining the model requirements of the target user and the data provided by the data provider, determine the resource provider to provide timely resources for the data, determine the resource allocation plan based on the time and quantity of resource provision, reduce the risks of the data provider and encourage more participation.
Reasonable resource allocation is achieved, the preliminary risks of data providers are reduced, and more data providers are encouraged to join joint learning, which improves the efficiency and accuracy of model training.
Smart Images

Figure CN114580814B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of energy, and in particular to a resource allocation method, device, readable medium and electronic device. Background Art
[0002] With the rapid development of internet technology, user data has become an increasingly important resource. Various predictive models can be trained based on this data, and accurate predictions are essential for the efficient operation of energy systems. However, not every energy user can collect the massive amounts of user data needed to train accurate predictive models. This has led to the development of federated learning, which is a trend. However, the initial cost of training mathematical models is high. Therefore, to encourage individual energy users to participate in federated learning, a reasonable resource allocation method is needed. Summary of the Invention
[0003] The present invention provides a resource allocation method, device, readable medium and electronic device, which utilize resource providers to provide timely resources to data providers, avoid data providers bearing the initial risks alone, encourage more data providers to join joint learning, and determine resource allocation plans for resource providers based on the resource provider's resource provision time and resource provision amount, which is reasonable.
[0004] In a first aspect, the present invention provides a resource allocation method, comprising:
[0005] Determining target resources required to construct a mathematical model that meets the target user's needs based on the target user's model needs and the data provided by the data provider;
[0006] Based on the target resource, determining at least one resource provider to provide timely resources to the data provider;
[0007] Determine identification information corresponding to each of the at least one resource providers, where the identification information includes resource provision time and resource provision amount;
[0008] determining virtual resources obtained by the target user calling the mathematical model;
[0009] Based on the identification information, a resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources is determined.
[0010] Preferably,
[0011] The determining, based on the identification information, a resource allocation scheme corresponding to each of the at least one resource providers in the virtual resources includes:
[0012] Determine a ratio of the resource provided by each of the at least one resource providers to the total resource amount corresponding to the target resource;
[0013] Determine the time level to which the resource provision time corresponding to each of the at least one resource provider belongs;
[0014] Based on the ratio result and the time level, a resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources is determined.
[0015] Preferably,
[0016] The identification information also includes the time of obtaining the income;
[0017] Then, determining the resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the identification information includes:
[0018] Determine a ratio of the resource provided by each of the at least one resource providers to the total resource amount corresponding to the target resource;
[0019] Determine the time level to which the resource provision time corresponding to each of the at least one resource provider belongs;
[0020] Determining a resource allocation coefficient based on the revenue acquisition time;
[0021] A resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources is determined based on the ratio result, the time level and the resource allocation coefficient.
[0022] Preferably,
[0023] The method further comprises:
[0024] receiving a resource transfer request sent by a target resource provider among the at least one resource provider;
[0025] Based on the transfer resource provision request, the target resource provider is updated.
[0026] Preferably,
[0027] The method further comprises:
[0028] If the credit level of the target user is lower than the user-set level, the target user is updated.
[0029] Preferably,
[0030] The method further comprises:
[0031] Obtain model requirements from target users;
[0032] Determine a data provider for the target user based on the model requirements of the target user.
[0033] In a second aspect, the present invention provides a resource allocation device, comprising:
[0034] A target resource determination module is used to determine target resources required to construct a mathematical model of the target user's requirements based on the model requirements of the target user and the data provided by the data provider;
[0035] A provider determination module, configured to determine at least one resource provider to provide timely resources to the data provider;
[0036] an identification information determining module, configured to determine identification information corresponding to each of the at least one resource provider, wherein the identification information includes a resource provision time and a resource provision amount;
[0037] A virtual resource determination module, configured to determine the virtual resources obtained by the target user invoking the mathematical model;
[0038] The allocation scheme determining module is configured to determine the resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the identification information.
[0039] Preferably,
[0040] The allocation scheme determination module includes:
[0041] a ratio result determining unit, configured to determine a ratio result between the resource provided by each of the at least one resource providers and the target resource;
[0042] A time level determination unit, configured to determine the time level to which the resource provision time corresponding to each of the at least one resource provider belongs;
[0043] An allocation scheme determining unit is configured to determine a resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the ratio result and the time level.
[0044] In a third aspect, the present invention provides a readable medium comprising an execution instruction. When a processor of an electronic device executes the execution instruction, the electronic device executes any method described in the first aspect.
[0045] In a fourth aspect, the present invention provides an electronic device comprising a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor executes any method described in the first aspect.
[0046] The present invention provides a resource allocation method, apparatus, readable medium, and electronic device. The method obtains the target user's model requirements and data provided by a data provider to determine the target resources required to construct a mathematical model of the target user's requirements. Based on the target resources, one or more resource providers are determined. The resource providers will provide timely resources to the data providers, so that the data providers can obtain the corresponding resources when they provide data, reducing the risk of data providers providing data and encouraging more data providers to join the joint learning. After determining the resource providers, the method determines the identification information corresponding to each resource provider. Then, a mathematical model is constructed based on the data provided by the data providers. The mathematical model is assigned to the target user so that the target user can call the mathematical model, thereby generating virtual resources obtained by the target user calling the mathematical model. Based on the corresponding identification information of each resource provider, a resource allocation scheme corresponding to one or more resource providers in the virtual resources is determined. Therefore, after the mathematical model is called by the target user to generate virtual resources, part of the virtual resources is allocated to the resource providers based on the resource provision time and resource provision amount, so that the resource allocation is reasonable. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 A schematic diagram of a flow chart of a first resource allocation method provided in an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of a flow chart of a second resource allocation method provided in an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of a flow chart of a third resource allocation method provided in an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of a fourth resource allocation method provided in an embodiment of the present invention;
[0052] Figure 5 This is a flow chart of a fifth resource allocation method provided in an embodiment of the present invention;
[0053] Figure 6 A schematic diagram of a sixth resource allocation method provided in an embodiment of the present invention;
[0054] Figure 7A schematic diagram of the structure of a resource allocation device provided in an embodiment of the present invention;
[0055] Figure 8 A schematic diagram of the structure of an allocation scheme determination module in a resource allocation device provided in an embodiment of the present invention;
[0056] Figure 9 The figure is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0058] like Figure 1 As shown, an embodiment of the present invention provides a resource allocation method, the method comprising:
[0059] Step 11: determining target resources required to construct a mathematical model of the target user's needs based on the target user's model needs and the data provided by the data provider;
[0060] Step 12: Based on the target resource, determine at least one resource provider to provide timely resources to the data provider;
[0061] Step 13: determining identification information corresponding to each of the at least one resource providers, wherein the identification information includes resource provision time and resource provision amount;
[0062] Step 14, determining the virtual resources obtained by the target user calling the mathematical model;
[0063] Step 15: Determine a resource allocation solution corresponding to each of the at least one resource providers in the virtual resources based on the identification information.
[0064] In the above embodiment, by obtaining the model requirements of the target user and the data provided by the data provider, the target resources required to construct the mathematical model of the target user's requirements are determined. Based on the target resources, one or more resource providers are determined. The resource providers will provide timely resources to the data provider, so that the corresponding resources can be obtained when the data provider provides data, reducing the risk of the data provider providing data and encouraging more data providers to join the joint learning. After determining the resource providers, the corresponding identification information of each resource provider is determined. Then, a mathematical model is constructed based on the data provided by the data provider, and the mathematical model is assigned to the target user so that the target user can call the mathematical model, thereby generating virtual resources obtained by the target user calling the mathematical model. Based on the corresponding identification information of each resource provider, the resource allocation plan corresponding to one or more resource providers in the virtual resources is determined. Therefore, after the mathematical model is called by the target user to generate virtual resources, part of the virtual resources are allocated to the resource provider based on the resource provision time and resource provision amount, so that the resource allocation is reasonable.
[0065] like Figure 2 As shown, in one embodiment of the present invention, step 15 determines the resource allocation scheme corresponding to each of the at least one resource provider in the virtual resource based on the identification information, including:
[0066] Step 151: determining a ratio of the amount of resources provided by each of the at least one resource provider to the total amount of resources corresponding to the target resource;
[0067] Step 152: determining the time level to which the resource provision time corresponding to each of the at least one resource provider belongs;
[0068] Step 153: Determine a resource allocation solution corresponding to each of the at least one resource providers in the virtual resources based on the ratio result and the time level.
[0069] In the above embodiment, the identification information of the resource provider consists of the resource provision time and resource provision amount. Therefore, when considering the resource allocation plan corresponding to the resource provider, the resource provision time and resource provision amount corresponding to the resource provider need to be considered. The ratio of the resource provision amount corresponding to each resource provider to the total resource amount corresponding to the target resource is determined. Of course, if there is only one resource provider, that is, the resource provider can provide all the target resources, the ratio result is 1. If there are multiple resource providers, each resource provider will provide part of the target resources, and the ratio result is less than 1. The resource provision time corresponding to each resource provider is further determined, and the time level to which the resource provision time belongs is determined. The time level can be divided in advance, for example, into early, middle and late stages. Different resource provision times and resource provision amounts corresponding to resource providers will result in different resource allocation plans corresponding to resource providers. Therefore, after determining the ratio result and time level, the resource allocation plan corresponding to each resource provider in the virtual resource is determined based on the ratio result and time level to ensure reasonable resource allocation. Specifically, the mapping relationship between different ratio results, different time levels and resource allocation plans can be determined. After the ratio results and time levels are determined, the corresponding resource allocation plan can be determined.
[0070] like Figure 3 As shown, in one embodiment of the present invention, the identification information also includes the time of obtaining the revenue;
[0071] Then, the step 15 determines the resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the identification information, including:
[0072] Step 151: determining a ratio of the resource provided by each of the at least one resource providers to the total resource amount corresponding to the target resource;
[0073] Step 152: determining the time level to which the resource provision time corresponding to each of the at least one resource providers belongs;
[0074] Step 154, determining a resource allocation coefficient according to the revenue acquisition time;
[0075] Step 155: Determine a resource allocation solution corresponding to each of the at least one resource providers in the virtual resources based on the ratio result, the time level, and the resource allocation coefficient.
[0076] In the above embodiment, the identification information consists of resource provision time, resource provision amount and revenue acquisition time, wherein the revenue acquisition time refers to the initial time of transferring virtual resources to the resource provider, that is, the initial time when the resource provider obtains revenue from the resources provided. When determining the resource allocation plan corresponding to each resource provider, the resource provision time, resource provision amount and revenue acquisition time of the resource provider should be considered. After determining the ratio result and time level, the revenue acquisition time is further determined, and the resource allocation coefficient corresponding to the revenue acquisition time is determined. The later the resource provider obtains revenue, the larger the corresponding resource allocation coefficient. For example, if the resource provider requires that part of the virtual resources be transferred to the resource provider in a timely manner when the virtual resources are obtained for the first time, the corresponding resource allocation coefficient can be 1. If the resource provider requires that part of the virtual resources be transferred to the resource provider when the virtual resources are obtained for the fifth time, the corresponding resource allocation coefficient can be 1.01. Therefore, the resource allocation amount is determined according to the ratio result and time level, and then the product of the resource allocation amount and the resource allocation coefficient is determined as the final resource amount transferred to the resource provider. In this way, the resource allocation plan is determined by considering the resource provision time, resource provision amount and revenue acquisition time, so that the resource allocation is reasonable.
[0077] like Figure 4 As shown, in one embodiment of the present invention, the method further includes:
[0078] Step 16: receiving a resource transfer request sent by a target resource provider among the at least one resource provider;
[0079] Step 17: Update the target resource provider based on the transfer resource provision request.
[0080] In the above embodiment, the resource provider is allowed to transfer the resource provision authority. In this case, the resource provider needs to send a resource provision transfer request to the joint center. When the joint center receives the resource provision transfer request sent by the target resource provider, it updates the target resource provider based on the resource provision transfer request. Specifically, after receiving the resource provision transfer request sent by the target resource provider, the resource provision time and resource provision amount corresponding to the target resource provider are determined, and the target resource provider is updated according to the resource provision time and resource provision amount. The resource provision time and resource provision amount corresponding to the target resource provider are provided by the updated target resource provider. If there is more than one updated target resource provider, each updated target resource provider corresponds to the same resource provision time and different resource provision amount as the target resource provider, and each updated target resource provider has its own resource provision amount.
[0081] like Figure 5 As shown, in one embodiment of the present invention, the method further includes:
[0082] Step 18: If the target user's credit level is lower than the user-set level, update the target user.
[0083] In the above embodiment, the credit level of the target user is judged. If the credit level of the target user is lower than the level set by the user, it may be difficult to obtain virtual resources from the target user after training the mathematical model for the target user. Therefore, in order for the data provider and the target resource provider to obtain reasonable resource allocation, when the credit level of the target user is lower than the level set by the user, the target user is updated and the credit level of the updated target user is judged. This cycle is repeated until a target user whose credit level is higher than the level set by the user is determined.
[0084] like Figure 6 As shown, in one embodiment of the present invention, the method further includes:
[0085] Step 19: Obtain the model requirements of the target user;
[0086] Step 20: Determine a data provider for the target user based on the model requirements of the target user.
[0087] In the above embodiment, when a target user requires a mathematical model, the target user sends a model requirement to the joint center. After obtaining the target user's model requirement, the joint center determines a data provider for the target user based on the target user's model requirement, thereby ensuring that the mathematical model determined based on the data provided by the data provider is the model required by the target user. In one possible implementation, when the target user's model requirement includes a requirement descriptor, the data provider initially provides a metadata list. The metadata list does not contain actual data, but rather a description of the actual data, that is, it contains data descriptors. The joint center can then determine a data provider for the target user based on the requirement descriptor in the model requirement and the data descriptors in the data provider's metadata list.
[0088] Based on the same inventive concept as the above method, Figure 7 As shown, an embodiment of the present invention provides a resource allocation device, including:
[0089] A target resource determination module 71 is configured to determine target resources required to construct a mathematical model of the target user's requirements based on the target user's model requirements and the data provided by the data provider;
[0090] A provider determination module 72, configured to determine at least one resource provider to provide timely resources to the data provider;
[0091] an identification information determining module 73, configured to determine identification information corresponding to each of the at least one resource provider, wherein the identification information includes a resource provision time and a resource provision amount;
[0092] A virtual resource determination module 74 is configured to determine the virtual resources obtained by the target user invoking the mathematical model;
[0093] The allocation scheme determining module 75 is configured to determine the resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the identification information.
[0094] like Figure 8 In one embodiment of the present invention, the allocation scheme determination module 75 includes:
[0095] The ratio result determining unit 751 is configured to determine a ratio result between the resource provided by each of the at least one resource providers and the target resource;
[0096] A time level determining unit 752 is configured to determine a time level to which the resource provision time corresponding to each of the at least one resource provider belongs;
[0097] The allocation scheme determining unit 753 is configured to determine a resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the ratio result and the time level.
[0098] For the convenience of description, the above device embodiments are described as various units or modules according to their functions. When implementing the present invention, the functions of each unit or module can be implemented in the same or multiple software and / or hardware.
[0099] Figure 9It is a structural diagram of an electronic device provided by an embodiment of the present invention. At the hardware level, the electronic device includes a processor 901 and a memory 902 storing execution instructions, and optionally also includes an internal bus 903 and a network interface 904. Among them, the memory 902 may include a memory 9021, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory 9022 (non-volatile memory), such as at least one disk storage, etc.; the processor 901, the network interface 904 and the memory 902 can be interconnected through an internal bus 903, and the internal bus 903 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc.; the internal bus 903 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The figure shows only one bidirectional arrow, but it does not mean that there is only one bus or one type of bus. Of course, the electronic device may also include hardware required for other services. When the processor 901 executes the execution instructions stored in the memory 902, the processor 901 executes the method in any embodiment of the present invention and is at least used to perform the following steps: Figures 1 to 6 The method shown.
[0100] In one possible implementation, a processor reads corresponding execution instructions from a non-volatile memory into a memory and then executes them. Alternatively, the processor may obtain corresponding execution instructions from another device to form a resource allocation device at a logical level. The processor executes the execution instructions stored in the memory to implement a resource allocation method provided in any embodiment of the present invention.
[0101] The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or instructions in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0102] The embodiment of the present invention further provides a computer-readable storage medium, including an execution instruction. When a processor of an electronic device executes the execution instruction, the processor executes the method provided in any embodiment of the present invention. The electronic device may be specifically as follows: Figure 9 The electronic device shown; the execution instruction is a computer program corresponding to the resource allocation device.
[0103] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or a combination of software and hardware.
[0104] The various embodiments of the present invention are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so their description is relatively simple. For relevant portions, refer to the description of the method embodiments.
[0105] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, product, or boiler comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, product, or boiler. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, product, or boiler comprising the element.
[0106] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A resource allocation method, characterized in that: include: Determining target resources required to construct a mathematical model that meets the target user's needs based on the target user's model needs and the data provided by the data provider; Based on the target resource, determining at least one resource provider to provide timely resources to the data provider; Determine identification information corresponding to each of the at least one resource providers, where the identification information includes resource provision time and resource provision amount; determining virtual resources obtained by the target user calling the mathematical model; Determining, based on the identification information, a resource allocation scheme corresponding to each of the at least one resource provider in the virtual resource; The method further comprises: receiving a resource transfer request sent by a target resource provider among the at least one resource provider; Based on the transfer resource provision request, updating the target resource provider; The determining, based on the identification information, a resource allocation scheme corresponding to each of the at least one resource providers in the virtual resources includes: Determine a ratio of the resource provided by each of the at least one resource providers to the total resource amount corresponding to the target resource; Determine the time level to which the resource provision time corresponding to each of the at least one resource provider belongs; Based on the ratio result and the time level, a resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources is determined.
2. The resource allocation method according to claim 1, characterized in that: The identification information also includes the time of obtaining the income; Then, determining the resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the identification information includes: Determine a ratio of a resource provided by each of the at least one resource providers to a total resource amount corresponding to the target resource; Determining the time level to which the resource provision time corresponding to each of the at least one resource provider belongs; determining a resource allocation coefficient based on the revenue acquisition time; A resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources is determined based on the ratio result, the time level and the resource allocation coefficient.
3. The resource allocation method according to claim 1, wherein: The method further comprises: If the credit level of the target user is lower than the user-set level, the target user is updated.
4. The resource allocation method according to claim 1, wherein: The method further comprises: Obtain model requirements from target users; Determine a data provider for the target user based on the model requirements of the target user.
5. A resource allocation device, characterized in that: include: A target resource determination module is used to determine target resources required to construct a mathematical model of the target user's requirements based on the model requirements of the target user and the data provided by the data provider; A provider determination module, configured to determine at least one resource provider to provide timely resources to the data provider; an identification information determining module, configured to determine identification information corresponding to each of the at least one resource provider, wherein the identification information includes a resource provision time and a resource provision amount; A virtual resource determination module, configured to determine the virtual resources obtained by the target user invoking the mathematical model; an allocation scheme determining module, configured to determine, based on the identification information, a resource allocation scheme corresponding to each of the at least one resource providers in the virtual resources; The provider determination module is further configured to receive a resource transfer provision request sent by a target resource provider among the at least one resource provider; Based on the transfer resource provision request, updating the target resource provider; The allocation scheme determination module includes: a ratio result determining unit, configured to determine a ratio result between the resource provided by each of the at least one resource providers and the target resource; A time level determination unit, configured to determine the time level to which the resource provision time corresponding to each of the at least one resource provider belongs; An allocation scheme determining unit is configured to determine a resource allocation scheme corresponding to each of the at least one resource provider in the virtual resources based on the ratio result and the time level. 6 . A readable medium comprising an execution instruction, wherein when a processor of an electronic device executes the execution instruction, the electronic device executes the method according to claim 1 . 7 . An electronic device comprising a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor executes the method according to claim 1 .
Citation Information
Patent Citations
Data processing method and device based on block chain, equipment and medium
CN111950739A