Resource allocation method, apparatus, device, storage medium and program product
By simulating and evaluating multiple allocation strategies, updating the Pareto solution set, and selecting the optimal strategy for resource allocation, the problem of unreasonable resource allocation in traditional schemes is solved, and resource optimization allocation in dynamic environments is realized.
Patent Information
- Application Number
- CN202411811722.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-12-10
AI Technical Summary
Traditional resource allocation schemes cannot adapt to the dynamic changes in equipment resource status and network mode resource requirements, resulting in unreasonable resource allocation.
By acquiring the resource status of the target device and the network modes to be allocated, resource allocation is simulated using multiple allocation strategies. The simulation allocation results are evaluated, the Pareto solution set is updated, and the optimal allocation strategy is selected for resource allocation until the convergence condition is met.
It enables the rational allocation of resources in a dynamic environment, improving the effectiveness and efficiency of resource allocation.
Smart Images

Figure CN119697133B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a resource allocation method and device, a computer device, a storage medium, and a program product. BACKGROUND
[0002] With the continuous development of cloud computing technology and Internet of Things technology, in a modern network environment, the same device needs to support different network modalities of multiple applications. Each modality has different resource requirements for network devices, which leads to resource sharing and competition problems. For example, a server may need to support real-time video communication modalities, Internet of Things modalities, and cloud computing modalities at the same time. These network modalities compete for key resources such as storage, forwarding, and computing power when using server resources. Therefore, a reasonable resource allocation strategy is needed to allocate device resources reasonably.
[0003] Traditional resource allocation schemes usually allocate resources according to predefined allocation rules, such as allocating resources according to the priority of network modalities. These predefined allocation rules are static, while the resource state of the device and the resource requirements of the network modality are dynamically changing. This resource allocation scheme cannot adapt to changes in resource state and resource requirements, resulting in unreasonable resource allocation. SUMMARY
[0004] Therefore, it is necessary to provide a resource allocation method, device, computer device, computer readable storage medium, and computer program product that can improve resource allocation effectiveness to solve the above technical problems.
[0005] In a first aspect, the present application provides a resource allocation method, which comprises:
[0006] obtaining the resource state of a target device and a network modality to be allocated resources;
[0007] allocating resources to the network modality according to a plurality of allocation strategies based on the resource state, obtaining a simulation allocation result corresponding to each allocation strategy, and determining an evaluation result of each allocation strategy on a target index based on the simulation allocation result of each allocation strategy;
[0008] updating the Pareto solution set based on the evaluation result of each allocation strategy on the target index, and obtaining an updated Pareto solution set;
[0009] updating the target allocation strategy based on the evaluation result of the target index of the target allocation strategy, obtaining an updated allocation strategy, and returning to performing the step of simulating allocation of resources for the network mode according to a plurality of allocation strategies based on the resource state to obtain a simulation allocation result corresponding to each of the allocation strategies until a convergence condition is reached, and determining the allocation strategy in the Pareto solution set at convergence as the optimal allocation strategy; the target allocation strategy is an allocation strategy belonging to the updated Pareto solution set among the plurality of allocation strategies;
[0010] allocating resources for the network mode according to the optimal allocation strategy based on the resource state to obtain a resource allocation result.
[0011] In one of the embodiments, the step of simulating allocation of resources for the network mode according to a plurality of allocation strategies based on the resource state to obtain a simulation allocation result corresponding to each of the allocation strategies, determining an evaluation result of each of the allocation strategies on a target index based on the simulation allocation result of each of the allocation strategies, comprises:
[0012] the resource state is the initial environment state of the environment in which the target device is located, the plurality of allocation strategies are respectively simulated and interacted with the environment in parallel N times to obtain N sub-simulation allocation results corresponding to each of the allocation strategies respectively;
[0013] determining N sub-evaluation results of each of the allocation strategies on a target index based on the N sub-simulation allocation results corresponding to each of the allocation strategies respectively;
[0014] fusing the N sub-evaluation results of each of the allocation strategies on a target index respectively to obtain an evaluation result of each of the allocation strategies on a target index.
[0015] In one of the embodiments, the target index comprises a revenue index and a satisfaction index, the evaluation result comprises resource revenue and resource satisfaction, and the step of determining N sub-evaluation results of each of the allocation strategies on a target index based on the N sub-simulation allocation results corresponding to each of the allocation strategies respectively, comprises:
[0016] determining N sub-resource revenues of each of the allocation strategies on the revenue index and N sub-resource satisfactions of each of the allocation strategies on the satisfaction index based on the N sub-simulation allocation results corresponding to each of the allocation strategies respectively;
[0017] the step of fusing the N sub-evaluation results of each of the allocation strategies on a target index respectively to obtain an evaluation result of each of the allocation strategies on a target index, comprises:
[0018] merge N sub-resource benefits of each of the allocation strategies on the benefit index to obtain resource benefits of each of the allocation strategies on the benefit index;
[0019] merge N sub-resource satisfaction degrees of each of the allocation strategies on the satisfaction index to obtain resource satisfaction degrees of each of the allocation strategies on the satisfaction index.
[0020] In one of the embodiments, the determining of the N sub-resource benefits of each of the allocation strategies on the benefit index and the N sub-resource satisfaction degrees of each of the allocation strategies on the satisfaction index based on the N sub-simulation allocation results corresponding to each of the allocation strategies comprises:
[0021] obtaining a resource unit cost, a resource demand state of the network mode, and a resource unit benefit of the network mode;
[0022] determining the N sub-resource benefits of each of the allocation strategies on the benefit index based on the N sub-simulation allocation results corresponding to each of the allocation strategies, the resource unit cost, and the resource unit benefit;
[0023] determining the N sub-resource satisfaction degrees of each of the allocation strategies on the satisfaction index based on the N sub-simulation allocation results corresponding to each of the allocation strategies and the resource demand state of the network mode.
[0024] In one of the embodiments, the resource state comprises a quantitative state of storage resources, a quantitative state of forwarding resources, and a quantitative state of computing power resources; the resource demand state of the network mode comprises a demand state of the storage resources, a demand state of the forwarding resources, and a demand state of the computing power resources; and the sub-simulation allocation result comprises a simulation allocation state of the network mode on the storage resources, a simulation allocation state of the network mode on the forwarding resources, and a simulation allocation state of the network mode on the computing power resources.
[0025] In one of the embodiments, the updating of the Pareto solution set based on the evaluation results of each of the allocation strategies on the target index comprises:
[0026] determining non-dominated allocation strategies belonging to the non-dominated solutions in the plurality of allocation strategies based on the evaluation results of each of the allocation strategies on the target index;
[0027] determining a target allocation strategy superior to allocation strategies in the Pareto solution set in the non-dominated strategies;
[0028] updating the Pareto solution set based on the target allocation strategy to obtain an updated Pareto solution set.
[0029] In one of the embodiments, the allocation strategy is a strategy model defined based on network parameters, and the evaluation result of the target allocation strategy on the target index is used to update the target allocation strategy to obtain an updated allocation strategy, including
[0030] determining an update gradient based on the evaluation result of the target allocation strategy on the target index;
[0031] updating network parameters of the target allocation strategy based on the update gradient to obtain an updated allocation strategy.
[0032] In one of the embodiments, the resource is allocated to the network mode according to the optimal allocation strategy based on the resource state to obtain a resource allocation result, including:
[0033] when the number of optimal allocation strategies is at least two, a target optimal allocation strategy is selected from the at least two optimal allocation strategies;
[0034] the resource is allocated to the network mode according to the target optimal allocation strategy based on the resource state to obtain a resource allocation result.
[0035] In a second aspect, the application further provides a resource allocation device, the device comprising:
[0036] a resource state acquisition module configured to acquire a resource state of a target device and a network mode to be allocated with resources;
[0037] an allocation strategy evaluation module configured to allocate resources to the network mode according to a plurality of allocation strategies based on the resource state to obtain a simulation allocation result corresponding to each of the allocation strategies, and determine an evaluation result of each of the allocation strategies on a target index based on the simulation allocation result of each of the allocation strategies;
[0038] a Pareto solution set updating module configured to update a Pareto solution set based on the evaluation result of each of the allocation strategies on the target index to obtain an updated Pareto solution set;
[0039] an allocation strategy updating module configured to update a target allocation strategy based on the evaluation result of the target allocation strategy on the target index to obtain an updated allocation strategy; the target allocation strategy is an allocation strategy belonging to the updated Pareto solution set among the plurality of allocation strategies;
[0040] the allocation strategy evaluation module is further configured to execute the step of allocating resources to the network mode according to a plurality of allocation strategies based on the resource state to obtain a simulation allocation result corresponding to each of the allocation strategies until a convergence condition is reached.
[0041] The Pareto solution set updating module is further configured to determine the allocation strategy in the Pareto solution set at the time of convergence as the optimal allocation strategy.
[0042] The resource allocation module is configured to allocate resources to the network modes according to the optimal allocation strategy based on the resource state, to obtain a resource allocation result.
[0043] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when executing the computer program.
[0044] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the method described above when executed by a processor.
[0045] In a fifth aspect, the present application provides a computer program product, comprising a computer program, and the computer program implements the steps of the method described above when executed by a processor.
[0046] The resource allocation method, device, computer device, computer readable storage medium and computer program product described above can obtain the resource state of the target device and the network modes to be allocated resources in real time, simulate allocation of resources to each network mode under the current resource state to obtain a simulation allocation result of each allocation strategy, evaluate each allocation strategy based on the simulation allocation result, select allocation strategies that perform better to join a Pareto solution set, further update the allocation strategies that perform better, obtain more allocation strategies, re-simulate allocation, evaluate and screen the more allocation strategies to explore a plurality of possible allocation strategies, and finally select an optimal allocation strategy from the plurality of possible allocation strategies, which is suitable for the current resource state and network modes, and then the optimal allocation strategy can be used for resource allocation, so that reasonable allocation of resources can be achieved. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0048] Figure 1 An application environment diagram of a resource allocation method in an embodiment;
[0049] Figure 2 a flowchart of a resource allocation method in an embodiment;
[0050] Figure 3 a schematic diagram of a resource state in an embodiment;
[0051] Figure 4 a schematic diagram of a resource boundary model construction platform in an embodiment;
[0052] Figure 5 a flowchart of a resource allocation method in another embodiment;
[0053] Figure 6 a flowchart of a solving step of a multi-dimensional resource elasticity organization optimization problem in an embodiment;
[0054] Figure 7 a structural block diagram of a resource allocation apparatus in an embodiment;
[0055] Figure 8 an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0056] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.
[0057] The resource allocation method provided by the embodiments of the present application can be applied to, for example, Figure 1The application environment is shown. Among them, the target device 102 can communicate with the terminal 104 or the server 106 respectively through the network. The data storage system can be the data that the target device 102 needs to process. The data storage system can be integrated on the target device 102, or placed on the cloud or other network servers; the resource allocation method can be executed by the target device 102, the terminal 104 or the server 106 alone, or by at least two of the target device 102, the terminal 104 or the server 106 interactively, taking the terminal 104 as an example, which is the management terminal of the target device 102, the terminal 104 obtains the resource state of the target device and the network mode to be allocated resources; based on the resource state, allocate resources for the network mode according to multiple allocation strategies, obtain the simulation allocation result corresponding to each allocation strategy, determine the evaluation result of each allocation strategy on the target index based on the simulation allocation result of each allocation strategy; based on the evaluation result of each allocation strategy on the target index, update the Pareto solution set to obtain the updated Pareto solution set; based on the evaluation result of the target allocation strategy on the target index, update the target allocation strategy to obtain the updated allocation strategy, and return to execute the step of allocating resources for the network mode based on the resource state, according to multiple allocation strategies, to obtain the simulation allocation result corresponding to each allocation strategy, until the convergence condition is reached, and the allocation strategy in the Pareto solution set at the time of convergence is determined as the optimal allocation strategy; the target allocation strategy is the allocation strategy belonging to the updated Pareto solution set among the multiple allocation strategies; based on the resource state, allocate resources for the network mode according to the optimal allocation strategy to obtain the resource allocation result.
[0058] Among them, the target device 102 refers to the actual hardware resources and devices supporting cloud network / algorithm network fusion and multi-modal intelligent computing network, which can be servers, storage devices, network devices, data center facilities, sensors and Internet of Things devices, wireless access network devices, computing units, etc. The terminal 104 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, Internet of Things devices can be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, projection devices, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 106 can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0059] In an exemplary embodiment, as Figure 2 shown, a resource allocation method is provided, and the method is applied toFigure 1 The terminal 102 in the system 100 is taken as an example for illustration, including the following steps S202 to S210. Among them:
[0060] S202, obtaining the resource state of the target device and the network modality to be allocated resources.
[0061] The target device is an actual hardware resource and device supporting cloud network / computing network fusion and multi-modal intelligent computing network, which can be a server, a storage device, a network device, a data center facility, a sensor and an Internet of Things device, a wireless access network device, a computing unit, etc.
[0062] The resource state can be a quantitative state of the resources of the target device, including resources of different dimensions, such as Figure 3 As shown in FIG. 1, the dimensions can include a storage dimension, a forwarding dimension, and a computing power dimension, the resources corresponding to the storage dimension can be referred to as storage resources, the resources corresponding to the forwarding dimension can be referred to as forwarding resources, and the resources corresponding to the computing power dimension can be referred to as computing power resources, the quantitative state of the storage resources includes a mechanical hard disk space quantitative value and a solid state disk space quantitative value, the quantitative state corresponding to the forwarding resources includes a bandwidth quantitative value, a time delay quantitative value, and a packet loss rate quantitative value, and the quantitative state corresponding to the computing power resources includes a central processing unit clock frequency quantitative value and a required computing power form quantitative value.
[0063] The network modality to be allocated resources refers to the application or service type to which the task to be processed by the target device belongs in the current network environment, and the target device needs to allocate resources according to the characteristics and needs of each network modality, each network modality corresponds to different tasks and has different resource needs, for example, the network modality includes a real-time video communication modality, an Internet of Things modality, and a cloud computing modality, etc., the real-time video communication modality needs high bandwidth and low delay to ensure smooth transmission and real-time of video, the Internet of Things modality needs low power consumption, concurrent connection, and large amount of data acquisition of the device, and may have higher requirements for data flow and connection number than for bandwidth, and the cloud computing modality needs powerful computing resources and storage resources, and focuses on dynamic scheduling of computing power and resources.
[0064] In one embodiment, the terminal detects the resource state of the target device and the network modality to which the task to be processed by the target device belongs in real time, determines the network modality to which the task to be processed belongs as the network modality to be allocated resources, and performs vectorization processing on the resource state of the target device to obtain the vectorized representation of the resource state of the target device. For example, the resource state of the target device can be represented as follows:
[0065] R= R 1 , R 2 , R 3 =[ R 1 1 , R 1 2 ,…, R 1 n 1 , R 2 1 , R 2 2 ,…, R 2 n 2 ,( R 3 1 , R 3 2 ,…, R 3 n 3 )]
[0066] wherein, denotes the quantization state of the first resource dimension, denotes the quantization state of the second resource dimension, denotes the quantization state of the third resource dimension, the quantization state of the first resource dimension contains quantized resources, the quantization state of the second resource dimension contains quantized resources, the quantization state of the third resource dimension contains quantized resources, denotes the resource value of the second quantized resource in the quantization state of the first resource dimension, denotes the resource value of the second quantized resource in the quantization state of the second resource dimension, denotes the resource value of the second quantized resource in the quantization state of the third resource dimension.
[0067] S204, based on the resource state, simulating the allocation of resources for the network mode according to a plurality of allocation strategies, obtaining the simulation allocation result corresponding to each allocation strategy, and determining the evaluation result of each allocation strategy on the target index based on the simulation allocation result of each allocation strategy.
[0068] wherein, the plurality of allocation strategies can be initialized allocation strategies, or allocation strategies obtained after parameter adjustment of the initialized allocation strategies, for describing how to allocate resources according to the resource state, and the allocation strategy can be a strategy model defined by a plurality of strategy parameters, for example, the initialized n allocation strategies are , , ... .
[0069] According to the plurality of allocation strategies, the resource allocation for the network mode is simulated, which means that under the environment and resource state of the target device, a plurality of different allocation strategies are used to simulate the allocation of resources of the target device, so as to evaluate the allocation effect of each allocation strategy.
[0070] The target index refers to an index for evaluating the allocation effect of the allocation strategy, and can be specifically a resource benefit index, a resource satisfaction index, etc. The resource benefit index is an index for measuring the resource benefit effect of the allocation strategy, and the resource satisfaction index is an index for evaluating the satisfaction of the resource demand of each network mode by the allocation strategy.
[0071] Specifically, the terminal can also determine the resource demand state of each network mode to be allocated resources, and simulate the allocation of resources to the network modes in a parallel manner based on the current resource state and the resource demand state of each network mode according to the plurality of allocation strategies. Assuming that there are n allocation strategies, for the i-th allocation strategy in the n allocation strategies, the resource is allocated to each network mode according to the i-th allocation strategy based on the current resource state and the resource demand state of each network mode, the simulation allocation result corresponding to the i-th allocation strategy is obtained, and the evaluation result of the i-th allocation strategy on the target index is determined based on the simulation allocation result corresponding to the i-th allocation strategy.
[0072] The resource demand state of the network mode includes the demand state of the storage resource, the demand state of the forwarding resource, and the demand state of the computing power resource. The resource demand state of the network mode can also be specifically identified by vectorization, for example, the resource demand state of the m-th network mode in the M network modes may be represented as follows:
[0073] D m =[ D 1,1 m , D 1,2 m ,…, D 1, n 1 m , D 2,1 m , D 2,2 m ,…, D 2,, n 2 m , D 3,1 m , D 3,2 m ,…, D 3,, n 3 m ]
[0074] wherein, represents the demand value of the first kind of quantized resource in the quantized state of the first resource dimension of the m-th network mode, represents the demand value of the n1-th kind of quantized resource in the quantized state of the first resource dimension of the m-th network mode, represents the demand value of the first kind of quantized resource in the quantized state of the second resource dimension of the m-th network mode.
[0075] The simulation allocation result includes the simulation allocation resource state corresponding to each network mode, and the simulation allocation resource state includes the simulation allocation state of the storage resource, the simulation allocation state of the forwarding resource, and the simulation allocation state of the computing power resource. For example, the simulation allocation resource state of the m-th network mode in the M network modes may be represented as follows:
[0076] x m =[ x 1,1 m , x 1,2 m ,…, x 1, n 1 m , x 2,1 m , x 2,2 m ,…, x 2,, n 2 m , x 3,1 m , x 3,2 m ,…, x 3,, n 3 m ]
[0077] wherein, represents the simulation allocation value of the first kind of quantized resource in the quantization state of the first resource dimension of the mth network mode, represents the simulation allocation value of the n1th kind of quantized resource in the quantization state of the first resource dimension of the mth network mode, represents the simulation allocation value of the first kind of quantized resource in the quantization state of the second resource dimension of the mth network mode.
[0078] It should be noted that each allocation strategy needs to meet the following constraint conditions when simulating the allocation of resources to network modes:
[0079]
[0080]
[0081]
[0082] wherein, C1 is a total resource constraint condition, C2 is the minimum demand of each network mode for each kind of quantized resource, and C3 represents that each kind of quantized resource allocated to each network mode does not exceed its demand value, so as to avoid resource waste.
[0083] S206, updating the Pareto solution set based on the evaluation results of each allocation strategy on the target indicators to obtain an updated Pareto solution set.
[0084] wherein, the Pareto solution set refers to a solution set that cannot be improved by changing a target in a multi-objective optimization problem. Specifically, if one allocation strategy performs better than another allocation strategy in some indicators and does not perform worse in other indicators, the allocation strategy is considered to "dominate" the other strategy. The dominated strategy should be removed from the solution set, and the solutions that are not dominated by any other strategy are retained as the Pareto solution set. The Pareto solution set that needs to be updated in the embodiments of the present application can be the Pareto solution set obtained in the last round of simulation and evaluation.
[0085] S208, updating the target allocation strategy based on the evaluation result of the target indicator on the target allocation strategy, obtaining an updated allocation strategy, and returning to the step of simulating resource allocation for the network mode according to the plurality of allocation strategies based on the resource state to obtain the simulation allocation result corresponding to each allocation strategy until a convergence condition is reached, and determining the allocation strategy in the Pareto solution set at the time of convergence as the optimal allocation strategy.
[0086] The convergence condition refers to a criterion for judging when to terminate further operations or calculations in the optimization or iteration process. In the embodiments of the present application, if the optimal strategy in the Pareto solution set does not change or changes very slightly in multiple iterations, it indicates that a relatively stable optimal strategy set has been found, and the algorithm can stop.
[0087] The target allocation strategy is the allocation strategy in the updated Pareto solution set among the plurality of allocation strategies evaluated in the current round. For example, the plurality of allocation strategies include strategy 1, strategy 2, and strategy 3, wherein strategy 1 is the allocation strategy updated to the Pareto solution set, and the parameters of strategy 1 are updated to obtain strategy 4.
[0088] Specifically, after obtaining the updated Pareto solution set, the terminal can determine the target allocation strategy added to the updated Pareto solution set among the plurality of allocation strategies in the current round, determine the parameter update value based on the evaluation result of the target allocation strategy, update the target allocation strategy according to the parameter update value to obtain the updated allocation strategy, and return to the step of simulating resource allocation for the network mode according to the plurality of allocation strategies based on the resource state to obtain the simulation allocation result corresponding to each allocation strategy. Each updated allocation strategy is simulated and evaluated, the previous round Pareto solution set is updated based on the evaluation result of each updated allocation strategy on the target indicator to obtain an updated Pareto solution set, the updated Pareto solution set is compared with the Pareto solution set of the previous round to obtain a comparison result, if the comparison result represents that the convergence condition is reached, the iteration is stopped, and the allocation strategy in the Pareto solution set at the time of convergence is determined as the optimal allocation strategy, if the comparison result represents that the convergence condition is not reached, the step of updating the target allocation strategy based on the evaluation result of the target indicator on the target allocation strategy to obtain the updated allocation strategy is continued until the convergence condition is reached, the iteration is stopped, and the allocation strategy in the Pareto solution set at the time of convergence is determined as the optimal allocation strategy.
[0089] S210, allocating resources for the network mode according to the optimal allocation strategy based on the resource state to obtain a resource allocation result.
[0090] Specifically, after determining the optimal allocation strategy, the terminal device can allocate resources to each network mode according to the optimal allocation strategy based on the resource status of the target device and the resource demand status of each network mode to be allocated resources, thereby obtaining the resource allocation results of each network mode.
[0091] In the above resource allocation method, the resource status of the nearest target device and the network mode to be allocated resources are obtained in real time. Under the current resource status, multiple allocation strategies are simulated to allocate resources to each network mode, and the simulated allocation results of each allocation strategy are obtained. Then, each allocation strategy is evaluated based on the simulated allocation results, and those allocation strategies with better performance are selected to be added to the Pareto solution set. At the same time, by further updating the allocation strategies with better performance, more allocation strategies can be obtained. By re-simulating and evaluating more allocation strategies, a variety of possible allocation strategies can be explored. Finally, the optimal allocation strategy suitable for the current resource status and network mode is selected from many possible allocation strategies, and then the optimal allocation strategy can be used for resource allocation, thereby achieving reasonable allocation of resources.
[0092] In one embodiment, the terminal simulates resource allocation for network modes based on resource status and according to multiple allocation strategies, obtaining simulated allocation results corresponding to each allocation strategy. The process of determining the evaluation results of each allocation strategy on the target indicator based on the simulated allocation results of each allocation strategy includes the following steps: taking the resource status as the initial environmental state of the environment in which the target device is located, performing N simulated interactions with the environment in parallel for each of the multiple allocation strategies, obtaining N sub-simulated allocation results corresponding to each allocation strategy; determining N sub-evaluation results of each allocation strategy on the target indicator based on the N sub-simulated allocation results corresponding to each allocation strategy; and fusing the N sub-evaluation results of each allocation strategy on the target indicator to obtain the evaluation result of each allocation strategy on the target indicator.
[0093] Specifically, for H allocation strategies, each of these H allocation strategies is simulated and interacted with the environment N times in parallel. Each simulation interaction will generate a corresponding sub-simulation allocation result. For any allocation strategy, N simulation interactions will generate N sub-simulation allocation results.
[0094] In one embodiment, the process of simulating the interaction between the i-th allocation strategy among the H allocation strategies and the environment includes the following steps: assigning the i-th allocation strategy... With T j Interact with the environment at any time to obtain the allocation strategy. Based on the j-th sub-simulation allocation result corresponding to the j-th interaction with the environment, the allocation strategy is determined. The j-th sub-evaluation result r on the target indicator i,j and T j+1 The environmental state S at time t i,Tj+1 T j The environmental state at time S i,Tj Let j = j + 1, and return to execute the allocation strategy for the i-th allocation. With T j Interact with the environment at any given time until the maximum number of interactions N is reached, and evaluate the sub-evaluation result r obtained from N interactions. i,j Summation yields the allocation strategy. The evaluation results.
[0095] Among them, T j The moment refers to the moment of the j-th simulated interaction, which can also be understood as the timestamp or stage of each round of interaction during the simulation process. Each simulated interaction corresponds to a specific moment.
[0096] It is understandable that the i-th allocation strategy With T j Interacting with the environment at a given moment means adjusting the current environment state S according to the i-th allocation strategy. i,Tj Resource allocation is performed to obtain sub-simulation allocation results, including simulated allocation values for various quantized resources allocated to each network mode. The environment in which the target device is located executes corresponding actions according to the sub-simulation allocation results. i,Tj Action a i,Tj This refers to the simulation execution allocation strategy of the environment in which the target device is located. The sub-simulation allocation results are used to simulate the processing of tasks corresponding to each network mode, and action a. i,Tj The execution time is T. j+1 Time and T j The time interval between moments, which can be pre-set, represents the transition time from the current state to the next state, that is, the duration required to perform an action (resource allocation and task processing). When the time interval is reached, the environment state S for the next moment is obtained. i,Tj+1 In this embodiment of the application, after each simulated interaction, the current environmental state, the executed actions, the obtained sub-evaluation results, and the next environmental state at each simulated interaction can be represented as quaternions. i,Tj , a i,Tj , r i,j , S i,Tj+1 The results are stored in the experience replay pool in the form of >. After N simulation interactions are completed, the sub-evaluation results r on the target indicator of each simulation interaction can be directly obtained from the experience replay pool. i,j The results of these sub-evaluations are summed to obtain the i-th allocation strategy. the evaluation result on the target index.
[0097] In the above embodiment, the terminal evaluates each allocation strategy by simulating the interaction between the allocation strategy and the environment multiple times with the resource state as the initial environment state of the environment in which the target device is located, thereby accurately evaluating each allocation strategy and improving the accuracy and efficiency of the evaluation of the allocation strategy.
[0098] In one embodiment, the target index includes a revenue index and a satisfaction index, the evaluation result includes resource revenue and resource satisfaction, and the process of determining N sub-evaluation results of each allocation strategy on the target index based on the respective N sub-simulation allocation results of each allocation strategy includes the following steps: determining N sub-resource revenues of each allocation strategy on the revenue index and N sub-resource satisfactions of each allocation strategy on the satisfaction index based on the respective N sub-simulation allocation results of each allocation strategy; and the process of fusing the N sub-evaluation results of each allocation strategy on the target index to obtain the evaluation result of each allocation strategy on the target index includes the following steps: fusing the N sub-resource revenues of each allocation strategy on the revenue index to obtain the resource revenue of each allocation strategy on the revenue index; and fusing the N sub-resource satisfactions of each allocation strategy on the satisfaction index to obtain the resource satisfaction of each allocation strategy on the satisfaction index.
[0099] Specifically, for the jth sub-simulation allocation result, the terminal determines the resource benefits of each network mode corresponding to each quantized resource according to the simulation allocation values of each network mode corresponding to each quantized resource in the jth sub-simulation allocation result, sums the resource benefits of each quantized resource corresponding to the same network mode to obtain the resource benefits corresponding to each network mode, and sums the resource benefits corresponding to each network mode to obtain the sub-resource benefits corresponding to the jth sub-simulation allocation result. Meanwhile, the terminal determines the resource satisfaction degrees of each network mode corresponding to each quantized resource according to the simulation allocation values of each network mode corresponding to each quantized resource in the jth sub-simulation allocation result, sums the resource satisfaction degrees of each quantized resource corresponding to the same network mode to obtain the resource satisfaction degrees corresponding to each network mode, and sums the resource satisfaction degrees corresponding to each network mode to obtain the sub-resource satisfaction degrees corresponding to the jth sub-simulation allocation result. The above process is performed on the N sub-simulation allocation results of each allocation strategy, so that the N sub-resource benefits of each allocation strategy on the benefit index and the N sub-resource satisfaction degrees of each allocation strategy on the satisfaction index can be obtained. For any one allocation strategy, the N sub-resource benefits corresponding to the allocation strategy are summed to obtain the resource benefits of the allocation strategy, and the N sub-resource satisfaction degrees corresponding to the allocation strategy are summed to obtain the resource satisfaction degrees of the allocation strategy.
[0100] In the above embodiment, the terminal can reduce the influence of deviation and accidental factors in single simulation by fusing the multiple sub-results of each allocation strategy on the benefit and satisfaction indexes, thereby improving the evaluation accuracy of each allocation strategy.
[0101] In one embodiment, the process of determining the N sub-resource benefits of each allocation strategy on the benefit index and the N sub-resource satisfaction degrees of each allocation strategy on the satisfaction index based on the N sub-simulation allocation results corresponding to each allocation strategy includes the following steps: obtaining the resource unit cost, the resource demand state of the network mode, and the resource unit benefit of the network mode; determining the N sub-resource benefits of each allocation strategy on the benefit index based on the N sub-simulation allocation results corresponding to each allocation strategy, the resource unit cost, and the resource unit benefit; and determining the N sub-resource satisfaction degrees of each allocation strategy on the satisfaction index based on the N sub-simulation allocation results corresponding to each allocation strategy and the resource demand state of the network mode.
[0102] The resource unit cost specifically includes the unit cost of each quantized resource, the resource demand state of the network mode includes the demand value of each quantized resource of the network mode, and the resource unit benefit of the network mode includes the resource unit benefit of each quantized resource of the network mode.
[0103] In one embodiment, for any one classification strategy, its corresponding resource benefit on the benefit index , its corresponding resource satisfaction on the satisfaction index may be expressed as follows:
[0104]
[0105]
[0106] wherein, represents the simulation allocation value corresponding to the nth k quantitative resource of the kth dimension of the mth network mode, represents the resource unit benefit that the nth k quantitative resource of the kth dimension can obtain when allocated to the mth network mode, represents the resource unit cost paid by the nth k quantitative resource of the kth dimension when allocated to the mth network mode.
[0107] In the above embodiment, the terminal can more accurately evaluate the economic benefit of the allocation strategy by considering the resource unit cost and the resource unit benefit when evaluating the benefit, and can more accurately evaluate the satisfaction of the allocation strategy by considering the resource demand state of the network mode when evaluating the satisfaction, and by simultaneously considering the two dimensions of benefit and satisfaction, it is ensured that both economic benefit and service quality balance are considered when allocating resources.
[0108] In one embodiment, the process of updating the Pareto solution set based on the evaluation result of each allocation strategy on the target index to obtain the updated Pareto solution set includes the following steps: determining the non-dominated allocation strategies belonging to the non-dominated solution in the plurality of allocation strategies based on the evaluation result of each allocation strategy on the target index; determining the target allocation strategies superior to the allocation strategies in the Pareto solution set in the non-dominated strategies; updating the Pareto solution set based on the target allocation strategies to obtain the updated Pareto solution set.
[0109] Specifically, for the first round of simulation evaluation, the non-dominated allocation strategies belonging to the non-dominated solution can be directly determined based on the evaluation result of each allocation strategy on the target index, and the set composed of these non-dominated strategies is determined as the Pareto solution set; for the second round of simulation evaluation, the Pareto solution set obtained in the first round can be directly updated based on the evaluation result of each allocation strategy on the target index to obtain the updated Pareto solution set; for the simulation evaluation of other rounds after the second round, the Pareto solution set obtained in the last round can be directly updated based on the evaluation result of each allocation strategy on the target index to obtain the updated Pareto solution set.
[0110] A non-dominated solution means that if a strategy performs better on a certain objective without being worse than another strategy on other objectives, it is considered to dominate the other strategy, and conversely, a non-dominated solution is not dominated by other strategies on all objectives.
[0111] In an embodiment, the target indicators include a revenue indicator and a satisfaction indicator, and the process of solving the Pareto solution set is to solve an optimization problem of resource revenue and resource satisfaction , which can be expressed as follows:
[0112]
[0113]
[0114]
[0115]
[0116] Wherein, C1 is the total amount of resources constraint condition, C2 is the minimum demand of each network mode for each quantized resource, C3 represents that the allocation of each quantized resource to each network mode does not exceed its demand value, avoiding resource waste.
[0117] In the above embodiment, the terminal can find new and high-quality allocation strategies that have not been included outside the existing Pareto solution set by determining the allocation strategies belonging to the non-dominated solution, which helps to explore more diverse allocation strategies and avoid the limitations of staying in the current Pareto solution set, further widening the selection range of resource allocation strategies; by including the strategies superior to the Pareto solution set in the non-dominated solution, the quality of the Pareto solution set can be improved to ensure that the solution set is closer to the global optimal solution.
[0118] In an embodiment, the allocation strategy is a strategy model defined based on multiple network parameters, and the process of updating the target allocation strategy based on the evaluation results of the target allocation strategy on the target indicators includes the following steps: determining the update gradient based on the evaluation results of the target allocation strategy on the target indicators; updating the network parameters of the target allocation strategy based on the update gradient to obtain the updated allocation strategy.
[0119] It should be noted that in the context of machine learning and optimization, "gradient" refers to the derivative or partial derivative of the objective function, which indicates the steepest upward or downward direction of the objective function, and in this case, the update gradient of the target allocation strategy reflects how to adjust the network parameters to improve the performance of the target indicators.
[0120] In an embodiment, the target indicators include a revenue indicator and a satisfaction indicator, a resource revenue gradient on the revenue indicator is determined based on the target allocation strategy, a resource satisfaction gradient on the satisfaction indicator is determined based on the target allocation strategy, a revenue weight corresponding to the revenue indicator is obtained, a satisfaction weight corresponding to the satisfaction indicator is obtained, the revenue gradient and the satisfaction gradient are weighted and summed based on the revenue weight and the satisfaction weight to obtain an update gradient, and network parameters of the target allocation strategy are updated based on the update gradient to obtain an updated allocation strategy.
[0121] In the above embodiments, the terminal guides parameter updating according to the evaluation results of the target indicators, ensures that the target allocation strategy is always adjusted towards the optimization target (such as maximizing revenue, improving user satisfaction, etc.), and such a target-based optimization method can directly improve the performance of the resource allocation strategy on each target.
[0122] In an embodiment, the terminal allocates resources for network modes according to the optimal allocation strategy based on the resource state to obtain a resource allocation result, and the process includes the following steps: when the number of optimal allocation strategies is at least two, a target optimal allocation strategy is selected from the at least two optimal allocation strategies; and resources are allocated for network modes according to the target optimal allocation strategy based on the resource state to obtain a resource allocation result.
[0123] The target optimal allocation strategy can be selected randomly or according to a preset selection rule from the at least two optimal allocation strategies, and the preset selection rule can be a priority rule, for example, the allocation strategy with the highest satisfaction is preferentially selected, or the allocation strategy with the highest resource revenue is preferentially selected, or for each optimal allocation strategy, a comprehensive score is determined based on the resource revenue and the resource satisfaction corresponding thereto, and the allocation strategy with the highest comprehensive score is selected from the optimal allocation strategies.
[0124] In the above embodiments, when there are multiple optimal allocation strategies, the terminal can select the strategy that is most suitable for the current resource state and demand, and such flexibility enables the system to select the best solution according to real-time network conditions, resource changes and application requirements, avoiding the limitations caused by fixed use of a single strategy.
[0125] The application also provides an application scenario applying the above resource allocation method, which is constructed by Figure 4 The resource boundary model construction platform includes (1) a resource perception and modeling module, (2) a multi-dimensional resource elasticity organization scheme generation module, and (3) a multi-dimensional resource elasticity organization scheme screening module, as shown in Figure 5The process of the resource boundary model construction platform executing the above method includes the following steps according to the flowchart shown: the resource perception and modeling module is configured to perceive the current multi-dimensional quantized resource state of the system according to the real-time feedback of the network, and construct a resource space model. The constructed resource space model can be characterized by the vectorized resource state of the target device. The multi-dimensional resource elasticity organization scheme generation module is configured to construct an utility model of the network mode with respect to multi-dimensional resource allocation based on the resource state and modal resource demand in the current network, and then establish a multi-dimensional resource elasticity organization optimization problem. The optimal solution set is obtained by solving the multi-dimensional resource elasticity organization optimization problem. The optimal solution set includes at least one optimal solution. The optimal solution is the multi-modal coexistence bearing resource boundary, which can also be referred to as the optimal allocation strategy. The multi-dimensional resource elasticity organization scheme screening module is configured to select a target optimal solution that is most suitable for the actual demand and preference of the current network from the at least one optimal solution included in the optimal solution set, that is, to select the most suitable optimal allocation strategy for distribution, and complete the optimal mapping of the network mode to the multi-dimensional resources in the resource base, that is, resource allocation.
[0126] The process of the multi-dimensional resource elasticity organization scheme generation module solving the multi-dimensional resource elasticity organization optimization problem to obtain the optimal solution set in the above application scenario can be implemented by using the Pareto algorithm. For reference Figure 6 The process includes the following steps according to the flowchart shown:
[0127] (1) Initialize a plurality of strategy networks, which are represented by strategy parameters .
[0128] For the same strategy network, when its strategy parameters are updated, the allocation strategy represented by the strategy network also changes.
[0129] (2) Each allocation strategy interacts with the environment N times. For the jth interaction, in the current state S i,Tj , the action a i,Tj is performed to obtain the reward r i,j , and the next state S i,Tj+1 is transferred to, and each obtained <S i,Tj , a i,Tj , r i,j , S i,Tj+1 > is stored in the experience replay pool.
[0130] (3) After N interactions, the reward of each allocation strategy on the resource income index and the resource satisfaction index is calculated to evaluate the performance of each allocation strategy in terms of total resource income and resource satisfaction.
[0131] (4) Pairwise compare the allocation strategies to determine if they are dominated by each other. Filter the Pareto optimal solutions according to the performance of each allocation strategy. For each two different allocation strategies and , compare their total resource yield and resource sufficiency cumulative reward. If strategy is not worse than on all objectives and better than on at least one objective, then dominates . Keep those strategies that are not dominated by any other strategy, i.e. the Pareto optimal solutions, according to the above method. These Pareto optimal solutions constitute the current Pareto front, representing the optimal trade-off between maximizing total resource yield and maximizing resource sufficiency.
[0132] (5) For the allocation strategies in the Pareto front, calculate their total resource yield and resource sufficiency advantage functions respectively, and calculate their strategy update gradients based on the policy gradient theorem respectively. Then, update the parameters of the strategy network using the gradients of these Pareto optimal strategies. Specifically, the strategy gradients of the two objectives of total resource yield and resource sufficiency can be combined together through linear combination to form a weighted strategy gradient, which optimizes multiple objectives simultaneously in strategy update.
[0133] (6) Repeat steps (2)-(5) to gradually approach the optimal solution set in the multi-objective space as more interactions and strategy updates are performed. In each iteration, new strategy solutions will appear, and the Pareto front will be dynamically updated according to these new strategy solutions, eliminating old solutions that are dominated by new solutions and retaining the latest optimal solutions.
[0134] (7) When new strategy solutions are no longer significantly better than the existing solution set, or the Pareto front no longer changes significantly, the algorithm can be considered to have converged. At this time, the solutions in the Pareto front are the final multi-objective optimal solution set. Output all optimal allocation strategies in the Pareto front for actual demand selection and use.
[0135] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0136] Based on the same inventive concept, the embodiments of the present application also provide a resource allocation apparatus for implementing the above-mentioned resource allocation method. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so the specific limitations in one or more resource allocation apparatus embodiments provided below can refer to the limitations of the resource allocation method described above, which will not be repeated here.
[0137] In one exemplary embodiment, as shown in Figure 7 A resource allocation apparatus is provided, comprising: a resource state acquisition module 702, an allocation strategy evaluation module 704, a Pareto solution set updating module 706, an allocation strategy updating module 708, and a resource allocation module 710, wherein:
[0138] The resource state acquisition module 702 is configured to acquire the resource state of the target device and the network mode to be allocated resources.
[0139] The allocation strategy evaluation module 704 is configured to simulate the allocation of resources for the network mode according to a plurality of allocation strategies based on the resource state, to obtain a simulation allocation result corresponding to each allocation strategy, and to determine an evaluation result of each allocation strategy on the target index based on the simulation allocation result of each allocation strategy.
[0140] The Pareto solution set updating module 706 is configured to update the Pareto solution set based on the evaluation result of each allocation strategy on the target index, to obtain an updated Pareto solution set.
[0141] The allocation strategy updating module 708 is configured to update the target allocation strategy based on the evaluation result of the target allocation strategy on the target index, to obtain an updated allocation strategy; the target allocation strategy is an allocation strategy belonging to the updated Pareto solution set among the plurality of allocation strategies.
[0142] The distribution strategy evaluation module 704 is further configured to simulate distribution of resources to the network modes according to the plurality of distribution strategies based on the resource state, and return simulation distribution results corresponding to each distribution strategy until a convergence condition is reached.
[0143] The Pareto solution set updating module 706 is further configured to determine the distribution strategies in the Pareto solution set at the time of convergence as optimal distribution strategies.
[0144] The resource distribution module 710 is configured to distribute resources to the network modes according to the optimal distribution strategy based on the resource state, and obtain a resource distribution result.
[0145] In the above embodiments, the resource state of the target device and the network modes to which resources are to be distributed are obtained in real time, and a plurality of distribution strategies are simulated to distribute resources to the network modes under the current resource state, to obtain simulation distribution results of each distribution strategy. Then, each distribution strategy is evaluated based on the simulation distribution results, and distribution strategies that perform better are selected to join the Pareto solution set. Further updating of the distribution strategies that perform better can obtain more distribution strategies. The plurality of distribution strategies are simulated again, evaluated and screened, to explore a plurality of possible distribution strategies. Finally, an optimal distribution strategy that is suitable for the current resource state and the network modes is selected from the plurality of possible distribution strategies. Then, the optimal distribution strategy can be used to distribute resources, so that reasonable distribution of resources can be achieved.
[0146] In one of the embodiments, the distribution strategy evaluation module 704 is further configured to: take the resource state as an initial environment state of an environment in which the target device is located, simulate interaction between the plurality of distribution strategies and the environment in parallel N times, to obtain N sub-simulation distribution results corresponding to each distribution strategy respectively; determine N sub-evaluation results of each distribution strategy on the target index based on the N sub-simulation distribution results corresponding to each distribution strategy respectively; and fuse the N sub-evaluation results of each distribution strategy on the target index respectively, to obtain an evaluation result of each distribution strategy on the target index.
[0147] In one of the embodiments, the target index includes a revenue index and a satisfaction index, and the distribution strategy evaluation module 704 is further configured to: determine N sub-resource revenues of each distribution strategy on the revenue index and N sub-resource satisfactions of each distribution strategy on the satisfaction index based on the N sub-simulation distribution results corresponding to each distribution strategy respectively; and fuse the N sub-resource revenues of each distribution strategy on the revenue index respectively, to obtain a resource revenue of each distribution strategy on the revenue index; and fuse the N sub-resource satisfactions of each distribution strategy on the satisfaction index respectively, to obtain a resource satisfaction of each distribution strategy on the satisfaction index.
[0148] In one of the embodiments, the allocation strategy evaluation module 704 is further configured to: obtain a resource unit cost, a resource demand state of the network mode, and a resource unit benefit of the network mode; determine N sub-resource benefits of each allocation strategy on the benefit index based on the N sub-simulation allocation results corresponding to each allocation strategy respectively, the resource unit cost, and the resource unit benefit; and determine N sub-resource satisfaction degrees of each allocation strategy on the satisfaction degree index based on the N sub-simulation allocation results corresponding to each allocation strategy respectively and the resource demand state of the network mode.
[0149] In one of the embodiments, the resource state includes a quantitative state of storage resources, a quantitative state of forwarding resources, and a quantitative state of computing power resources; the resource demand state of the network mode includes a demand state of the storage resources, a demand state of the forwarding resources, and a demand state of the computing power resources; and the sub-simulation allocation result includes a simulation allocation state of the storage resources, a simulation allocation state of the forwarding resources, and a simulation allocation state of the computing power resources of the network mode.
[0150] In one of the embodiments, the Pareto solution set updating module 706 is configured to: determine non-dominated allocation strategies belonging to non-dominated solutions in the plurality of allocation strategies based on the evaluation results of each allocation strategy on the target index; determine a target allocation strategy superior to the allocation strategies in the Pareto solution set; and update the Pareto solution set based on the target allocation strategy to obtain an updated Pareto solution set.
[0151] In one of the embodiments, the allocation strategy is a strategy model defined based on a plurality of network parameters, and the allocation strategy updating module 708 is configured to: determine an update gradient based on the evaluation result of the target allocation strategy on the target index; and update the network parameters of the target allocation strategy based on the update gradient to obtain an updated allocation strategy.
[0152] In one of the embodiments, the resource allocation module 710 is further configured to: when the number of optimal allocation strategies is at least two, select a target optimal allocation strategy from the at least two optimal allocation strategies; and allocate resources for the network mode according to the target optimal allocation strategy based on the resource state to obtain a resource allocation result.
[0153] The modules in the above resource allocation apparatus can be all or partially implemented by software, hardware, and combinations thereof. The modules can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in the computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to the modules.
[0154] In one of the embodiments, a computer device is provided, which can be a terminal. An internal structure diagram of the computer device can be as shown in FIG. 8. Figure 8The computer device shown in the figure includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be realized through WIFI, mobile cellular network, near field communication (NFC) or other technologies. The computer program is executed by the processor to realize a resource allocation method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0155] Those skilled in the art can understand that Figure 8 The skilled in the art can understand that
[0156] In one embodiment, a computer device is also provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps in the above method embodiments.
[0157] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to realize the steps in the above method embodiments.
[0158] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by a processor to realize the steps in the above method embodiments.
[0159] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0160] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. In the embodiments provided in the present application, any reference to memory, database or other medium can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0161] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, any combination of these technical features is deemed to be within the scope of the present application.
[0162] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A resource allocation method characterized by, The method comprises: obtaining a resource state of a target device and a network mode to be allocated with resources; based on the resource state, simulating allocation of resources for the network mode according to multiple allocation strategies to obtain a simulation allocation result corresponding to each of the allocation strategies, and determining an evaluation result of each of the allocation strategies on a target index based on the simulation allocation result of each of the allocation strategies; updating a Pareto solution set based on the evaluation result of each of the allocation strategies on the target index to obtain an updated Pareto solution set; updating a target allocation strategy based on the evaluation result of the target allocation strategy on the target index to obtain an updated allocation strategy, and returning to perform the step of simulating allocation of resources for the network mode according to multiple allocation strategies based on the resource state to obtain a simulation allocation result corresponding to each of the allocation strategies until a convergence condition is reached, and determining an allocation strategy in the Pareto solution set at the time of convergence as an optimal allocation strategy; the target allocation strategy is an allocation strategy belonging to the updated Pareto solution set among the multiple allocation strategies; allocating resources for the network mode according to the optimal allocation strategy based on the resource state to obtain a resource allocation result.
2. The method of claim 1, wherein, The step of simulating allocation of resources for the network mode according to multiple allocation strategies based on the resource state to obtain a simulation allocation result corresponding to each of the allocation strategies, and determining an evaluation result of each of the allocation strategies on a target index based on the simulation allocation result of each of the allocation strategies, comprises: taking the resource state as an initial environment state of an environment in which the target device is located, and performing N times of simulation interaction between the multiple allocation strategies and the environment in a parallel manner to obtain N sub-simulation allocation results corresponding to each of the allocation strategies respectively; determining N sub-evaluation results of each of the allocation strategies on a target index based on the N sub-simulation allocation results corresponding to each of the allocation strategies respectively; fusing the N sub-evaluation results of each of the allocation strategies on a target index respectively to obtain an evaluation result of each of the allocation strategies on a target index.
3. The method of claim 2, wherein, The target index comprises a benefit index and a satisfaction index, the evaluation result comprises a resource benefit and a resource satisfaction, and the step of determining N sub-evaluation results of each of the allocation strategies on a target index based on the N sub-simulation allocation results corresponding to each of the allocation strategies respectively, comprises: determining N sub-resource benefits of each of the allocation strategies on the benefit index and N sub-resource satisfactions of each of the allocation strategies on the satisfaction index based on the N sub-simulation allocation results corresponding to each of the allocation strategies respectively; The step of fusing the N sub-evaluation results of each of the allocation strategies on a target index respectively to obtain an evaluation result of each of the allocation strategies on a target index, comprises: fusing the N sub-resource benefits of each of the allocation strategies on the benefit index respectively to obtain a resource benefit of each of the allocation strategies on the benefit index; and Fusing N sub-resource satisfactions of each of the allocation strategies on the satisfaction index respectively, to obtain resource satisfactions of each of the allocation strategies on the satisfaction index respectively.
4. The method of claim 3, wherein, The determining of the N sub-resource benefits and the N sub-resource satisfactions of each of the allocation strategies on the benefit index and the satisfaction index respectively based on the N sub-simulated allocation results corresponding to each of the allocation strategies comprises: obtaining a resource unit cost, a resource demand state of the network mode, and a resource unit benefit of the network mode; determining the N sub-resource benefits of each of the allocation strategies on the benefit index based on the N sub-simulated allocation results corresponding to each of the allocation strategies, the resource unit cost, and the resource unit benefit; determining the N sub-resource satisfactions of each of the allocation strategies on the satisfaction index based on the N sub-simulated allocation results corresponding to each of the allocation strategies and the resource demand state of the network mode.
5. The method of claim 4, wherein, The resource state comprises a quantitative state of storage resources, a quantitative state of forwarding resources, and a quantitative state of computing power resources; the resource demand state of the network mode comprises a demand state of the storage resources, a demand state of the forwarding resources, and a demand state of the computing power resources; and the sub-simulated allocation result comprises a simulated allocation state of the storage resources, a simulated allocation state of the forwarding resources, and a simulated allocation state of the computing power resources of the network mode.
6. The method of claim 1, wherein, The updating of the Pareto solution set based on the evaluation results of each of the allocation strategies on the target index comprises: determining non-dominated allocation strategies in the plurality of allocation strategies based on the evaluation results of each of the allocation strategies on the target index; determining a target allocation strategy superior to allocation strategies in the Pareto solution set in the non-dominated allocation strategies; updating the Pareto solution set based on the target allocation strategy, to obtain an updated Pareto solution set.
7. The method of claim 1, wherein, The allocation strategy is a strategy model defined based on a plurality of network parameters, and the updating of the target allocation strategy based on the evaluation results of the target allocation strategy on the target index comprises: determining an update gradient based on the evaluation results of the target allocation strategy on the target index; updating network parameters of the target allocation strategy based on the update gradient, to obtain an updated allocation strategy.
8. The method according to any one of claims 1 to 7, characterized in that, The allocating of resources to the network mode according to the optimal allocation strategy based on the resource state, to obtain a resource allocation result, comprises: when the number of the optimal allocation strategies is at least two, selecting a target optimal allocation strategy from the at least two optimal allocation strategies; allocating resources to the network mode according to the target optimal allocation strategy based on the resource state, to obtain a resource allocation result.
9. A resource allocation apparatus characterized by comprising: The apparatus comprises: a resource state acquisition module configured to acquire a resource state of a target device and a network mode to be allocated resources; The allocation strategy evaluation module is configured to simulate allocation of resources for the network mode according to a plurality of allocation strategies based on the resource state, to obtain a simulation allocation result corresponding to each of the allocation strategies, and to determine an evaluation result of each of the allocation strategies on a target index based on the simulation allocation result of each of the allocation strategies. The Pareto solution set updating module is configured to update a Pareto solution set based on the evaluation result of each of the allocation strategies on the target index, to obtain an updated Pareto solution set. The allocation strategy updating module is configured to update a target allocation strategy based on the evaluation result of the target allocation strategy on the target index, to obtain an updated allocation strategy. The target allocation strategy is an allocation strategy belonging to the updated Pareto solution set from among the plurality of allocation strategies. The allocation strategy evaluation module is further configured to perform the step of simulating allocation of resources for the network mode according to a plurality of allocation strategies based on the resource state, to obtain a simulation allocation result corresponding to each of the allocation strategies, until a convergence condition is reached, and to return the simulation allocation result. The Pareto solution set updating module is further configured to determine an allocation strategy in the Pareto solution set at the time of convergence as an optimal allocation strategy. The resource allocation module is configured to allocate resources for the network mode according to the optimal allocation strategy based on the resource state, to obtain a resource allocation result.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 8.
11. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Resource allocation strategy evaluation method and device, equipment and medium
CN117237070A
Processing logic instantiation method and system of programmable network equipment
CN118282981A