Online reinforcement learning method and device for multi-constraint controlled system

Through the online reinforcement learning method and sampling data allocation algorithm, the problem of not considering individual constraints and resource allocation in multi-constraint controlled systems is solved, efficient optimal action selection and control strategy optimization are achieved, and the efficiency of smart grid dispatching is improved. and accuracy.

CN118674065APending Publication Date: 2024-09-20TSINGHUA UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410798671.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In the existing technology, the control strategy optimization of multi-constraint controlled systems does not consider individual constraints and resource allocation problems, resulting in low efficiency and poor effect of the control strategy.

Method used

An online reinforcement learning method for multi-constraint controlled systems is provided. The optimal action is determined through the sampling data allocation algorithm, the Q factor and QH factor variance of each action are calculated, and the sampling amount is adjusted to maximize the probability of correctly selecting the optimal action.

Benefits of technology

In the case of limited computing resources, efficient optimal action selection is achieved, which is suitable for various constraints and improves the convergence speed and accuracy of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674065A
    Figure CN118674065A
Patent Text Reader

Abstract

The invention relates to the field of reinforcement learning, and provides an online reinforcement learning method and device for a multi-constraint controlled system, and the method comprises the steps: carrying out the sampling of each action in an action set according to a preset sampling amount, and determining the variance of a Q factor of each action, the variance of a QH factor of each action activation constraint condition, and the consumed sampling amount according to a sampling result; calculating the total amount of consumed samples according to the consumed sampling amount of each action and a preset sampling increment; analyzing the quantities by using a sampling data distribution algorithm to obtain a target sample quantity of each action; determining the supplementary sampling amount of each action; performing supplementary sampling according to the supplementary sampling amount of each action, and re-determining the amount by using a supplementary sampling result; and adjusting the total amount of consumed samples, judging whether the total amount of consumed samples is smaller than a preset total sampling amount, and if not, outputting the optimal action of the state to the controlled system. The method is suitable for a multi-constraint controlled system, the sampling amount distribution of each constraint condition is considered, and the control strategy determination efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of reinforcement learning, and in particular to an online reinforcement learning method and device for a multi-constrained controlled system. Background Art

[0002] In the existing technology, with the use of energy resources, the new power system with clean new energy as the main body will connect a large amount of new energy and natural gas network to the power system, which can achieve the complementarity of multiple energy sources such as electricity, gas, wind, light, and water, which is conducive to increasing the proportion of renewable energy and promoting sustainable development and ecological civilization construction. While a large number of new energy, distributed energy, electric vehicles and other equipment are constantly connected, the uncertainty of power grid operation is also increasing, which poses new challenges to the efficiency of smart grid scheduling algorithms. In the scheduling problem of smart grids, there are often multiple constraints in addition to the optimization goal.

[0003] In the prior art, for a controlled system with multiple constraints (such as a power system), the following two methods are often used to optimize the control strategy:

[0004] Method 1: Establish an optimization model based on actual operation data and solve it through the solution method of mixed integer linear model. This method is limited by the security of actual operation data, and there is a problem of poor accuracy in establishing the model, which leads to low solution accuracy.

[0005] The second method converts multiple constraints into a larger penalty term and loads it into the reward function, converting the optimization problem into an unconstrained optimization problem. It cannot directly control the constraints and cannot handle some constraints that must be considered separately, which leads to poor optimization results. In addition, when sampling actions, the resource allocation issue is not considered, resulting in low resource utilization. Summary of the invention

[0006] The present invention is used to solve the problems in the prior art that a single constraint condition is not considered when determining a control strategy for a multi-constrained controlled system, and resource allocation is not considered, resulting in low control strategy determination efficiency and poor control effect.

[0007] In order to solve the above technical problems, the present invention provides an online reinforcement learning method for a multi-constrained controlled system, comprising: for each state, determining the optimal action of the state by the following method:

[0008] Each action in the action set is sampled according to the preset sampling amount, and the variance of the Q factor of each action and the Q factor of each action activation constraint are determined based on the sampling results. H The variance of the factor and the consumed sampling amount of each action, where the Q factor is determined according to the objective function of the control strategy of the controlled system, Q HThe factors are determined according to the constraints of the control strategy of the controlled system;

[0009] Calculate the total amount of consumed samples based on the consumed sampling amount of each action and the preset sampling increment;

[0010] The variance of the Q factor of each action and the Q factor of each action activation constraint are calculated using the sampling data distribution algorithm. H The variance of the factors and the total amount of consumed samples are analyzed to obtain the target sample size of each action; the sampling data allocation algorithm includes the criteria for calculating the sampling amount of each type of action under the activation constraint conditions, which is used to gradually maximize the probability of correctly selecting the optimal action;

[0011] Determine the supplementary sampling amount for each action according to the target sample amount for each action and the consumed sample amount for each action;

[0012] Supplementary sampling is performed according to the supplementary sampling amount of each action, and the variance of the Q factor of each action and the Q factor of the activation constraint of each action are re-determined using the supplementary sampling results. H The variance of the factors and the consumed samples of each action;

[0013] Adjust the total amount of consumed samples to determine whether the total amount of consumed samples is less than the preset total sampling amount. If so, recalculate the target sample amount and the subsequent steps. If not, output the optimal action for this state to the controlled system.

[0014] A second aspect of the present invention provides an online reinforcement learning device for a multi-constrained controlled system, comprising: for each state, determining the optimal action of the state through the following units:

[0015] The simulation unit is used to sample each action in the action set according to the preset sampling amount, and determine the variance of the Q factor of each action and the Q factor of each action activation constraint condition according to the sampling results. H The variance of the factor and the consumed sampling amount of each action, where the Q factor is determined according to the objective function of the control strategy of the controlled system, Q H The factors are determined according to the constraints of the control strategy of the controlled system;

[0016] A first calculation unit, used to calculate the total amount of consumed samples according to the consumed sampling amount of each action and the preset sampling increment;

[0017] The second calculation unit is used to calculate the variance of the Q factor of each action and the Q factor of each action activation constraint condition using the sampling data distribution algorithm. H The variance of the factors and the total amount of consumed samples are analyzed to obtain the target sample size of each action; the sampling data allocation algorithm includes the criteria for calculating the sampling amount of each type of action under the activation constraint conditions, which is used to gradually maximize the probability of correctly selecting the optimal action;

[0018] A third calculation unit is used to determine the supplementary sampling amount of each action according to the target sample amount of each action and the consumed sample amount of each action;

[0019] The supplementary sampling unit is used to perform supplementary sampling according to the supplementary sampling amount of each action, and use the supplementary sampling results to re-determine the variance of the Q factor of each action and the Q factor of the activation constraint condition of each action. H The variance of the factors and the consumed samples of each action;

[0020] The control unit is used to adjust the total amount of consumed samples and determine whether the total amount of consumed samples is less than the preset total sampling amount. If so, the second calculation unit is used to recalculate the target sample amount. If not, the optimal action of the state is output to the controlled system.

[0021] A third aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any of the foregoing embodiments when executing the computer program.

[0022] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of a computer device, the method described in any of the above embodiments is implemented.

[0023] The online reinforcement learning method and device for a multi-constrained controlled system provided by the present invention pre-establishes a sampling data allocation algorithm, which includes a sampling amount criterion for each type of action to calculate the activation constraint condition, and is used to gradually maximize the probability of correctly selecting the optimal action. The sampling data allocation algorithm is used to sample the actions in each state, and the following technical effects can be achieved:

[0024] First, the solution is simple. Compared with the existing online Q learning method, the present invention only needs to perform simple calculations in the step of optimal action selection, which can maximize the probability of correct selection under limited computing resources.

[0025] Second, the invention has strong applicability. The invention is applicable to any constraint condition that satisfies the additive property, and has no limit on the number of constraint conditions, and can be applied to scheduling problems of smart grids in various scenarios.

[0026] Third, the sampling efficiency is high. In the case of limited computing resources, the present invention can gradually maximize the probability of correctly selecting the optimal action that satisfies the constraints by allocating the number of samples of different actions, thereby achieving a more accurate estimation of the Q factor and accelerating the convergence of the algorithm. The present invention can focus simulation resources on the actions that really need to be distinguished, making the observation results of each action more and more accurate, and finally obtaining the optimal action.

[0027] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.

[0029] Figure 1 A flow chart showing a process of establishing a sampling data allocation algorithm according to an embodiment of the present invention is shown;

[0030] Figure 2 A flow chart of an online reinforcement learning method for a multi-constrained controlled system according to an embodiment of the present invention is shown;

[0031] Figure 3 A flow chart showing a target sample size calculation process according to an embodiment of the present invention is shown;

[0032] Figure 4 A structural diagram of an online reinforcement learning device for a multi-constrained controlled system according to an embodiment of the present invention is shown;

[0033] Figure 5 A structural diagram of a computer device according to an embodiment of the present invention is shown;

[0034] Figure 6 The flowchart of the program design of the online reinforcement learning method for a multi-constrained controlled system according to an embodiment of the present invention is shown.

[0035] Description of the accompanying symbols:

[0036] 401, simulation unit;

[0037] 402. A first computing unit;

[0038] 403. A second computing unit;

[0039] 404. a third computing unit;

[0040] 405. Supplementary sampling unit;

[0041] 406. Control unit;

[0042] 502. Computer equipment;

[0043] 504, processor;

[0044] 506. Memory;

[0045] 508, driving mechanism;

[0046] 510, input / output module;

[0047] 512. Input devices;

[0048] 514. Output device;

[0049] 516. Presentation equipment;

[0050] 518. Graphical user interface;

[0051] 520, network interface;

[0052] 522, communication link;

[0053] 524. Communication bus. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0056] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.

[0057] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the acquisition, transmission, storage, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0058] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0059] It should be noted that the online reinforcement learning method and device for multi-constrained controlled systems of the present invention can be used in the field of smart grids, such as the dispatching control of multi-energy microgrids, and can also be used in any field other than the power field, such as the field of autonomous driving dispatching. The present invention does not limit the application field of the online reinforcement learning method and device for multi-constrained controlled systems. As long as the complex system has multiple constraints and online control requirements, the method of the present invention can be applied for online control.

[0060] For a controlled system with multiple constraints, before implementing the online constraint reinforcement learning method, a sampling data allocation algorithm needs to be established in advance. The sampling data allocation algorithm includes criteria that meet the following conditions:

[0061] The larger the first noise-to-signal ratio of the actionable action, the larger the sampling amount of the actionable action, wherein the noise of the first noise-to-signal ratio is the standard deviation of the Q factor of the actionable action, and the information of the first noise-to-signal ratio is the difference between the Q factor of the optimal action and the Q factor of the actionable action;

[0062] The larger the second noise-to-signal ratio of the inactive action under the activation constraint, the larger the sampling amount of the inactive action under the activation constraint, where the noise of the second noise-to-signal ratio is the Q of the action under the activation constraint. H The standard deviation of the factor, the second noise-to-signal ratio information is the Q of the action under the activation constraint H The difference between the factor and the bounds of the activated constraints;

[0063] The first sampling amount of the optimal action is greater than the sampling amount of the feasible action, and the larger the second noise-to-signal ratio of the optimal action under the activation constraint condition is, the larger the sampling amount of the optimal action under the activation constraint condition is;

[0064] The sampling amount of the inactive action is the maximum value of the sampling amount of the inactive action under each activation constraint condition;

[0065] The sampling amount for observing the optimal action is the maximum value of the first sampling amount of the optimal action and the sampling amount of the optimal action under each activation constraint condition.

[0066] Specifically, Figure 1 As shown, the sampling data allocation algorithm establishment process includes:

[0067] S101, establishing an objective function and a plurality of first constraint conditions of a control strategy of a controlled system according to device information and load information of the controlled system, system status, control action, optimization target information and a plurality of constraint requirement information.

[0068] S102, converting the objective function to obtain a Q factor of the action, converting the plurality of first constraints to obtain a plurality of second constraints, each second constraint being Q H Factor constraints.

[0069] S103, establishing the objective function of the true optimal action selection probability function and action sampling quantity constraint conditions.

[0070] S104, establishing an approximate optimal action selection probability function according to the objective function of the true optimal action selection probability function and a plurality of second constraints.

[0071] S105, determining a criterion of a sampling data allocation algorithm according to the approximately optimal action selection probability function, a plurality of second constraints and an action sampling amount constraint.

[0072] In detail, the device information, load information, system state, control action, optimization target information and multiple constraint requirement information in S101 can be determined according to the specific situation of the controlled system, and the present invention does not limit the specific parameters included therein. An objective function is established according to the device information, load information, system state, control action and optimization target, and multiple first constraint conditions are established according to the device information, load information, system state, control action and multiple constraint requirement information.

[0073] In some implementations, the objective function and the plurality of first constraints are expressed using the following formula:

[0074]

[0075] H i (d)≤C i , i = 1, 2, ..., m(2)

[0076] Where d represents a fixed-length control strategy that maps any state s in the state space S to the action space Any action a, represents a discrete finite state space, represents a discrete finite action space, J is the objective function, and represents the average cost of the strategy, which can be expressed as:

[0077]

[0078] H i (d) represents the i-th constraint function of strategy d, expressed as:

[0079]

[0080] Among them, s t represents the state of the controlled system at time t, d(s t ) indicates that strategy d is in state s t The action under, c represents the target object function, T represents the length of the simulation period; h i represents the i-th constraint object function, C i represents the given constant of the i-th constraint, and m represents the total number of constraints.

[0081] Taking the controlled system as a smart grid as an example, the objective function is the average cost of operation. The first constraint conditions include that the probability that the demand in each region cannot be met on time should not be too large, the probability that the energy storage equipment is frequently used should not be too large, and the average charging cost of certain electric vehicles should not be too high.

[0082] The formula expressed by the above formulas (1) to (4) is defined as problem P1.

[0083] In S102 above, in online applications, when a state s is given, the question is how to decide the action within limited computing resources. The following follows Q learning to solve this problem. The Q factor is also called the action value function, which is defined as follows:

[0084]

[0085] Among them, P(s'|s,a) represents the state transition probability from state s to state s' under action a, c(s,a) represents the target object in state s and action a, Q d (s,a) represents the Q factor when the state is s and the action is a, Q d (s',d(s')) represents the Q factor at state s' and action d(s').

[0086] Q d The superscript d in (s,a) is to emphasize that the decision starting from s' follows strategy d. When the meaning of Q(s,a) is clear from the context, the superscript d can be deleted.

[0087] Formula (5), also known as the Bellman equation, states that the Q factor of another state s' also affects the Q factor of state s. We will explore this relationship below so that the constraints on policy d can be described as separate constraints on its constraint function under different actions.

[0088] In practice, we may not know the closed form of P(s'|s,a) and can only estimate Q from simulations. d (s,a), that is:

[0089]

[0090] Among them, N a Indicates the number of repetitions of each action a, i.e., the sampling amount, that has been assigned, and:

[0091]

[0092] We use this to measure the calculation sampling volume and sample efficiency. The total sampling volume is given and fixed, that is:

[0093]

[0094] When all samples are used and allocated to actions, we can choose the best action observed based on the estimate Q(s,a), a∈A, that is:

[0095]

[0096] The constraint condition in (9) above is the first constraint condition.

[0097] Among them, d a is an almost identical strategy to d, the only difference being their behavior in state s, that is, with d a (s')=d(s'),s'≠s, we may have d a (s) = d(s), is the constraint function of the ith observation, that is:

[0098]

[0099] in,

[0100] Q d H (s,a) represents Q in state s and action a H Factor. Q H The factor can also become a constraint action value function. The formula represented by formula (9) and formula (10) is defined as problem P2.

[0101] From formula (9), we can see that the objective function is now defined for any action a, while the m constraints are still defined by the strategy d. If we want to make a feasible strategy in state s, we need to quantify the possibility of the action.

[0102] Note that in Q-learning only the action in state s may change, while the actions of its states remain the same. We will use this feature to estimate the feasibility of action a. Note that:

[0103]

[0104] in,

[0105] For all s'∈S, it represents the stable probability of state s under strategy d, so we can get:

[0106]

[0107] Then, we can get the following approximation:

[0108]

[0109] Let A = π d (s), Therefore, the above formula can be modified as follows:

[0110]

[0111] Since the i-th constraint function satisfies the following constraints: H i (d a )≤C i , thus, combined with formula (11), we can get:

[0112]

[0113] Formula (12) is the second constraint condition.

[0114] In the above S103, there is the following assumption 1:

[0115] Assumption 1: Assume that the Markov chain under any strategy d is ergodic, that is, A>0 for all strategies.

[0116] We can evaluate the feasibility of an action a in state s and transform problem P2 into problem P3 as follows:

[0117]

[0118] Among them, a b represents the best feasible action, represents the best action to observe, represents the true optimal action selection probability function (Probability of Correct Selection), The objective function represents the true optimal action selection probability function, Represents the action sampling quantity constraint.

[0119] In the above S104, in the rest of the present invention, we adopt the Bayesian viewpoint, we believe that the observed value is given and fixed, and the true performance is a random variable. When the observed value is given, the posterior distribution of the true value can be estimated. Then in the above formula, is given and fixed, a b is a random variable. The central limit theory shows that the difference between the sample mean and the true value converges to the Gaussian distribution N(0,σ 2 / n), where n is the number of observations. DeGroot proved that when both prior distributions are Gaussian and the observation noise is Gaussian, the posterior distribution is also Gaussian. Therefore, we have the following assumption 2:

[0120] Assumption 2: Q(s,a) and The prior distribution of is Gaussian for all s∈S,a∈A,i=1,2,...,m.

[0121] Note that according to Assumption 2, when sample Q j (s,a),Q Hij (s,a),j=1,...,N a If a is given, then its sample mean It is also given and fixed, and its true value posterior distribution follows a Gaussian distribution and Next we will use the Gaussian distribution.

[0122] To find the maximum PCS in problem P3, we use the Bonferroni inequality to obtain:

[0123]

[0124] Among them, the right side of the above formula express is better than the other observed feasible actions, the observed infeasible action is indeed an infeasible action, and It is indeed feasible. Therefore, the right side of the above equation can be expressed as:

[0125]

[0126] The right side of the above formula can be called the approximate optimal action selection probability function APCS (approximate probability of correct selection), that is:

[0127]

[0128] Among them, APCS represents the approximate optimal action selection probability function; Indicates taking the best action observed in state s Q factor when Q(s,a i ) means taking an action a in state s i Q factor at ;

[0129] Indicates that an inaction is taken in state s i Q of the j-th constraint when H Factor; C j is the upper bound corresponding to the jth constraint, A is the steady-state distribution probability of state s,

[0130] Indicates taking any action in state s Q of the jth constraint H factor.

[0131] Please note:

[0132]

[0133] in,

[0134]

[0135] in,

[0136]

[0137] in,

[0138] The implementation process of S105 is described in detail below:

[0139] First, according to formula (13), APCS and action sampling constraint conditions, the following Lagrangian function is defined:

[0140]

[0141] Following the Karush-Kuhn-Tacker (KKT) necessary conditions for local optimality, and assuming that the KKT regularity condition holds (which is generally reasonable for many applications in automation), we have:

[0142]

[0143] λ≥0(dual feasibility) (17)

[0144]

[0145] We now analyze the sampling amount N of a specific action i i How does the calculation of affect the overall Lagrangian function? From formula (15), we can get the observation action sampling quantity N i :

[0146]

[0147] in,

[0148]

[0149] Combining the above two equations together, we get:

[0150]

[0151] To simplify the analysis, we first assume that each constraint With a single sampling volume N ij ,j=1,...,m, for each observation inactive action i and observation activation constraint According to formula (15), we have:

[0152]

[0153] in,

[0154]

[0155] Then we have:

[0156]

[0157] The best action for observation We introduce m+1 independent variables, N bj ,j=0,1,...,m, where N bj ,j=0,1,...,m represents the amount of sampling allocated under the jth constraint, and N b0 represents the sampling amount of the optimal action. Then we have:

[0158]

[0159] For N bj ,j=1,...,m, we have:

[0160]

[0161] in,

[0162] So we have:

[0163]

[0164] For the observation of action a i and The following is an analysis of the sampling volume N of these actions i and N j According to formula (19), we can get the relationship between

[0165]

[0166] It is reasonable to assume that, given more computational budget, the best action observed receives at most a fraction of it, namely N b0 >>N i and N b0 >>N j , then the above formula can be obtained:

[0167]

[0168] Then we can get:

[0169]

[0170] Then move all the exponential terms in the above formula to the left, and you can get the following formula:

[0171]

[0172] By taking the logarithm of both sides of the above equation, we can get:

[0173]

[0174] After sorting, we can get:

[0175]

[0176] when, The logarithmic term becomes significantly smaller than the other terms, and the above formula can be rewritten as:

[0177]

[0178] Then we have

[0179]

[0180] Among them, N i and N j Respectively represent the sampling amount of the action i and j, σ iand σ j denote the standard deviation of the Q factor of the feasible actions i and j, b denotes the optimal action, represents the observed value of the Q factor at state s and optimal action b, represents the observed value of the Q factor when the state is s and the action is i, Represents the observed value of the Q factor when in state s and action j.

[0181] For observation of inaction i and a j , and the inaction i and a j Activate the lth and pth constraints respectively, and based on the similar analysis of formula (24), we can get:

[0182]

[0183] According to equations (15) and (19), we have

[0184]

[0185] Substituting the above formula into formula (21), we have

[0186]

[0187] Then we have

[0188]

[0189] From the above formula we can get:

[0190]

[0191] For N bj ,j=1,2,...,m, we have

[0192]

[0193] Note that for each observed inaction a i , and its activation constraints We need to set:

[0194]

[0195] For the best action We set:

[0196]

[0197] In summary, through the above analysis, we can get the criteria of the sampling data allocation algorithm:

[0198] Criterion 1: When i and j represent possible actions,

[0199] Among them, N i and N j Respectively represent the sampling amount of the action i and j, σ i and σ j denote the standard deviation of the Q factor of the feasible actions i and j, b denotes the optimal action, represents the observed value of the Q factor at state s and optimal action b, represents the observed value of the Q factor when the state is s and the action is i, represents the observed value of the Q factor at state s and action j;

[0200] Criterion 2: When i and j represent inactive actions, and i and j activate the lth and pth constraints respectively,

[0201]

[0202] Among them, N il represents the sampling amount of the inactive action i under the lth constraint condition, N jp represents the sampling amount of the inactive action j under the pth constraint condition;

[0203] σ Hil represents the Q of the inactive action i under the lth constraint condition H Standard deviation of the factor, σ Hjp represents the Q of the inactive action j under the pth constraint condition H The standard deviation of the factor;

[0204] Represents state s and action a i Q under the xth constraint H Factor observations, C x represents the upper bound of the xth constraint, A is the steady-state distribution probability of state s, π d (s′) represents the steady-state distribution probability of state s′, Q represents the xth constraint when the state s' and action d(s') are H Factor, x represents l and p;

[0205] Criterion 3: When i represents a possible action and b represents the best action,

[0206] Among them, N b0represents the first sample size of the optimal action, N i represents the sampling amount of the action i, σ b represents the standard deviation of the Q factor of the optimal action b, σ i represents the standard deviation of the Q factor of the action i, represents the best action to observe;

[0207] For any two constraints i and j,

[0208] Among them, N bi represents the sampling amount of the optimal action b under the i-th constraint condition, N bj represents the sampling amount of the optimal action b under the jth constraint condition;

[0209] σ Hbi represents the Q of the optimal action b under the i-th constraint condition H Standard deviation of the factor, σ Hbj represents the Q of the optimal action b under the jth constraint condition H The standard deviation of the factor;

[0210] Represents state s and action a b Q under the xth constraint H Factor observations, x represents i and j;

[0211] Criterion 4: For an inactive action i, its corresponding activated Constraints, then

[0212] N i represents the sampling volume of the inactive action i;

[0213] Criterion 5: For the optimal action b, N b represents the sampling amount of the optimal action b.

[0214] On the basis of establishing the sampling data allocation algorithm, the online reinforcement learning method for the multi-constrained controlled system can be implemented. Specifically, Figure 2 As shown, for each state, the optimal action for that state is determined by the following method:

[0215] S201, sampling each action in the action set according to a preset sampling amount, and determining the variance of the Q factor of each action and the Q factor of each action activation constraint condition according to the sampling results. H The variance of the factors and the consumed samples for each action.

[0216] Among them, the Q factor is determined according to the objective function of the control strategy of the controlled system, QH The factor is determined according to the constraints of the control strategy of the controlled system. H The process of determining the factors is referred to in the above-mentioned embodiment and will not be described in detail here.

[0217] The preset sampling amount (N0) can be set according to the preset total sampling amount N, the preset number of cycles, the action space and the newly added sampling amount △. Generally, the preset number of cycles is greater than 10, and the preset total sampling amount N is much greater than the preset sampling amount N0 multiplied by the action amount in the action space.

[0218] The actions in this step can directly act on the simulation model of the controlled system (such as a digital twin model), and the simulation results of each action can be determined by the simulation model. In specific implementation, the execution results of a preset sampling amount can also be obtained from historical data according to the state and action, and the obtained execution results can be used as simulation results.

[0219] The variance of the Q factor of the action in this step is calculated based on the Q factor of each sampling number of the action. H The variance of the factor is calculated based on the Q of each sampling number of actions H The specific calculation method can refer to the existing variance calculation formula. This step is also used to determine the action type, including actionable actions, inactionable actions and optimal actions.

[0220] S202, calculating the total amount of consumed samples according to the consumed sampling amount of each action and the preset sampling increment.

[0221] In this step, the consumed sampling amount and the preset sampling increment of each action are added together to obtain the total consumed sample amount.

[0222] S203, using the sampling data allocation algorithm to calculate the variance of the Q factor of each action and the Q factor of each action activation constraint condition H The variance of the factors and the total number of consumed samples are analyzed to obtain the target sample size of each action; the sampling data allocation algorithm includes the criteria for calculating the sampling amount of each type of action under the activation constraint conditions, which is used to gradually maximize the probability of correctly selecting the optimal action.

[0223] The content of the sampling data allocation algorithm and its reasoning process used in this step can be found in the above-mentioned embodiment, and will not be repeated here. The sample size of each action target obtained in this step can maximize the probability of selecting the approximate optimal action.

[0224] S204: Determine the supplementary sampling amount for each action according to the target sample amount for each action and the consumed sample amount for each action.

[0225] When this step is implemented, the target sample size of each action is subtracted from the consumed sample size of each action to obtain the supplementary sampling size of each action.

[0226] S205, performing supplementary sampling according to the supplementary sampling amount of each action, and re-determining the variance of the Q factor of each action and the Q factor of the activation constraint condition of each action using the supplementary sampling result H The variance of the factors and the consumed samples for each action.

[0227] S206, adjust the total amount of consumed samples, determine whether the total amount of consumed samples is less than the preset total sampling amount, if so, return to S203 to continue execution, if not, output the optimal action of the state to the controlled system.

[0228] In this step, if the total amount of consumed samples is less than the preset total sampling amount, it means that the consumed sampling amount after the next iteration does not reach or is exactly equal to the preset total sampling amount, and the feasibility of the action can be observed in a loop. If the total amount of consumed samples is greater than the preset total sampling amount, it means that the consumed sampling amount after the next iteration exceeds the preset total sampling amount, and the feasibility of the action cannot be observed. In a specific implementation manner, the algorithm flow of this embodiment is as follows Figure 6 shown. Figure 6 Where n0 is the preset sampling amount, a is the action, is the action space, For optimal action b With action a i The performance of the observation variance is poor, Under the constraint condition H j corresponds to action a i The observed variance of performance is is the number of consumed samples, △ is the number of newly added samples, N is the preset total sample size, α i is the sample size ratio that action i should obtain, is the number of samples that action i should obtain, N i is the number of samples consumed by action i, N i ' is the target sample size for action i, N i '-N i Supplement the sampling amount for action i.

[0229] This embodiment pre-establishes a sampling data allocation algorithm, which includes a sampling amount criterion for each type of action to calculate activation constraints, and is used to gradually maximize the probability of correctly selecting the optimal action. The sampling data allocation algorithm is used to sample actions in each state, and the following technical effects can be achieved:

[0230] First, the solution is simple. Compared with the existing online Q learning method, the present invention only needs to perform simple calculations in the step of optimal action selection, which can maximize the probability of correct selection under limited computing resources.

[0231] Second, the invention has strong applicability. The invention is applicable to any constraint condition that satisfies the additive property, and has no limit on the number of constraint conditions, and can be applied to scheduling problems of smart grids in various scenarios.

[0232] Third, the sampling efficiency is high. In the case of limited computing resources, the present invention can gradually maximize the probability of correctly selecting the optimal action that satisfies the constraints by allocating the number of samples of different actions, thereby achieving a more accurate estimation of the Q factor and accelerating the convergence of the algorithm. The present invention can focus simulation resources on the actions that really need to be distinguished, making the observation results of each action more and more accurate, and finally obtaining the optimal action.

[0233] In one embodiment of the present invention, Figure 3 As shown, the above S203 uses the sampling data allocation algorithm to calculate the variance of the Q factor of each action and the Q factor of each action activation constraint condition. H The variance of the factors and the total amount of consumed samples are analyzed to obtain the target sample size for each action, including:

[0234] Step 301: The variance of the Q factor of each action and the Q factor of each action activation constraint are calculated according to the sampling data allocation algorithm. H The variance of the factors was analyzed and the target sample size ratio of each action was calculated.

[0235] Step 302, the number of samples that should be obtained for each action is obtained by multiplying the target sample number ratio of each action by the total number of consumed samples.

[0236] Step 303: Select the larger of the number of samples that should be obtained for each action and the number of samples actually used for each action as the target number of samples for each action.

[0237] Based on the same inventive concept, the present invention also provides an online reinforcement learning device for a multi-constrained controlled system, as described in the following embodiments. Since the principle of solving the problem by the online reinforcement learning device for a multi-constrained controlled system is similar to that of the online reinforcement learning method for a multi-constrained controlled system, the implementation of the online reinforcement learning device for a multi-constrained controlled system can refer to the online reinforcement learning method for a multi-constrained controlled system, and the repeated parts will not be repeated.

[0238] Specifically, Figure 4 As shown, the online reinforcement learning device for a multi-constrained controlled system includes:

[0239] For each state, the optimal action for that state is determined by the following units:

[0240] The simulation unit 401 is used to sample each action in the action set according to a preset sampling amount, and determine the variance of the Q factor of each action and the Q factor of each action activation constraint condition according to the sampling result.H The variance of the factor and the consumed sampling amount of each action, where the Q factor is determined according to the objective function of the control strategy of the controlled system, Q H The factors are determined according to the constraints of the control strategy of the controlled system;

[0241] A first calculation unit 402, configured to calculate a total amount of consumed samples according to the consumed samples of each action and a preset sampling increment;

[0242] The second calculation unit 403 is used to calculate the variance of the Q factor of each action and the Q factor of each action activation constraint condition by using the sampling data distribution algorithm. H The variance of the factors and the total amount of consumed samples are analyzed to obtain the target sample size of each action; the sampling data allocation algorithm includes the criteria for calculating the sampling amount of each type of action under the activation constraint conditions, which is used to gradually maximize the probability of correctly selecting the optimal action;

[0243] The third calculation unit 404 is used to determine the supplementary sampling amount of each action according to the target sample amount of each action and the consumed sample amount of each action;

[0244] The supplementary sampling unit 405 is used to perform supplementary sampling according to the supplementary sampling amount of each action, and use the supplementary sampling result to re-determine the variance of the Q factor of each action, the Q factor of each action activation constraint condition, and the Q factor of each action activation constraint condition. H The variance of the factors and the consumed samples of each action;

[0245] The control unit 406 is used to adjust the total amount of consumed samples and determine whether the total amount of consumed samples is less than the preset total sampling amount. If so, the second calculation unit is used to recalculate the target sample amount. If not, the optimal action of the state is output to the controlled system.

[0246] This embodiment is applicable to a controlled system with multiple constraints, has no limit on the number of constraints, can analyze the impact of a single constraint on the sampling amount under multiple constraints, and can progressively maximize the probability of correctly selecting the optimal action that satisfies the constraints by allocating the number of sampling times for different actions, thereby achieving a more accurate estimation of the Q factor and accelerating the convergence of the algorithm. The present invention can focus simulation resources on the actions that really need to be distinguished, making the observation results of each action more and more accurate, and ultimately obtaining the optimal action.

[0247] In one embodiment of the present invention, a computer device is also provided, such as Figure 5As shown, the computer device 502 may include one or more processors 504, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. The computer device 502 may also include any memory 506, which is used to store any kind of information such as code, settings, data, etc. Non-limitingly, for example, the memory 506 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 502. In one case, when the processor 504 executes an associated instruction stored in any memory or a combination of memories, the computer device 502 may perform any operation of the associated instruction. The computer device 502 also includes one or more drive mechanisms 508 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0248] The computer device 502 may also include an input / output module 510 (I / O) for receiving various inputs (via input devices 512) and for providing various outputs (via output devices 514). A specific output mechanism may include a presentation device 516 and an associated graphical user interface (GUI) 518. In other embodiments, the input / output module 510 (I / O), the input device 512, and the output device 514 may not be included, and the computer device 502 may be used as a computer device in a network. The computer device 502 may also include one or more network interfaces 520 for exchanging data with other devices via one or more communication links 522. One or more communication buses 524 couple the components described above together.

[0249] The communication link 522 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 522 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.

[0250] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are executed.

[0251] An embodiment of the present invention further provides a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to execute the method described in any of the aforementioned embodiments.

[0252] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0253] It should also be understood that in the embodiments of the present invention, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.

[0254] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0255] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0256] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0257] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0258] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0259] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0260] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An online reinforcement learning method for a multi-constrained controlled system, characterized in that: include: For each state, the optimal action for that state is determined by: Each action in the action set is sampled according to the preset sampling amount, and the variance of the Q factor of each action and the Q factor of each action activation constraint are determined based on the sampling results. H The variance of the factor and the consumed sampling amount of each action, where the Q factor is determined according to the objective function of the control strategy of the controlled system, Q H The factors are determined according to the constraints of the control strategy of the controlled system; Calculate the total amount of consumed samples based on the consumed sampling amount of each action and the preset sampling increment; The variance of the Q factor of each action and the Q factor of each action activation constraint are calculated using the sampling data distribution algorithm. H The variance of the factors and the total amount of consumed samples are analyzed to obtain the target sample size of each action; the sampling data allocation algorithm includes the criteria for calculating the sampling amount of each type of action under the activation constraint conditions, which is used to gradually maximize the probability of correctly selecting the optimal action; Determine the supplementary sampling amount for each action according to the target sample amount for each action and the consumed sample amount for each action; Supplementary sampling is performed according to the supplementary sampling amount of each action, and the variance of the Q factor of each action and the Q factor of the activation constraint of each action are re-determined using the supplementary sampling results. H The variance of the factors and the consumed samples of each action; Adjust the total amount of consumed samples to determine whether the total amount of consumed samples is less than the preset total sampling amount. If so, recalculate the target sample amount and the subsequent steps. If not, output the optimal action for this state to the controlled system.

2. The method according to claim 1, characterized in that The sampling data allocation algorithm determination process includes: Establishing the objective function and multiple first constraint conditions of the control strategy of the controlled system according to the equipment information and load information of the controlled system, the system state, the control action, the optimization target information and multiple constraint requirement information; The objective function is converted to obtain the Q factor of the action, and the multiple first constraints are converted to obtain multiple second constraints, each of which is Q H Factor constraints; Establish the objective function of the true optimal action selection probability function and the action sampling quantity constraints; Establishing an approximate optimal action selection probability function according to the objective function of the true optimal action selection probability function and a plurality of second constraints; The criteria of the sampling data allocation algorithm are determined according to the approximately optimal action selection probability function, a plurality of second constraints and an action sampling amount constraint.

3. The method according to claim 2, characterized in that The multiple first constraints are converted to obtain multiple second constraints, including obtaining multiple second constraints expressed by the following formula: in, Q represents the i-th constraint condition at state s and action a H factor, d represents the strategy, C i represents the upper bound of the i-th constraint, A represents the steady-state distribution probability of state s, π d (s′) represents the steady-state distribution probability of state s′, Q represents the jth constraint when the state s' and action d(s') are H factor.

4. The method according to claim 1, characterized in that The approximate optimal action selection probability function is expressed using the following formula: Among them, APCS represents the approximate optimal action selection probability function; Indicates taking the best action observed in state s Q factor when Q(s,a i ) means taking an action a in state s i Q factor at ; Indicates that an inaction is taken in state s i Q of the j-th constraint when H Factor; C j is the upper bound corresponding to the jth constraint, A is the steady-state distribution probability of state s, π d (s′) represents the steady-state distribution probability of state s′, Q represents the jth constraint when the state s' and action d(s') are H factor; Indicates taking any action in state s Q of the jth constraint H factor.

5. The method according to claim 1, characterized in that The sampling data allocation algorithm includes criteria that satisfy the following conditions: The larger the first noise-to-signal ratio of the actionable action, the larger the sampling amount of the actionable action, wherein the noise of the first noise-to-signal ratio is the standard deviation of the Q factor of the actionable action, and the information of the first noise-to-signal ratio is the difference between the Q factor of the optimal action and the Q factor of the actionable action; The larger the second noise-to-signal ratio of the inactive action under the activation constraint, the larger the sampling amount of the inactive action under the activation constraint, where the noise of the second noise-to-signal ratio is the Q of the inactive action under the activation constraint. H The standard deviation of the factor, the second noise-to-signal ratio information is the Q of the inactive action under the activation constraint H The difference between the factor and the bounds of the activated constraints; The first sampling amount of the optimal action is greater than the sampling amount of the feasible action, and the greater the third noise-to-signal ratio of the optimal action under the activation constraint condition, the greater the sampling amount of the optimal action under the activation constraint condition; The sampling amount of the inactive action is the maximum value of the sampling amount of the inactive action under the activation constraint condition; The sampling amount for observing the optimal action is the maximum value of the first sampling amount of the optimal action and the sampling amount of the optimal action under the activation constraint condition.

6. The method according to claim 5, characterized in that The sampling data allocation algorithm includes the following criteria: Criterion 1: When i and j represent possible actions, Among them, N i and N j Respectively represent the sampling amount of the action i and j, σ i and σ j denote the standard deviation of the Q factor of the feasible actions i and j, b denotes the optimal action, represents the observed value of the Q factor at state s and optimal action b, represents the observed value of the Q factor when the state is s and the action is i, represents the observed value of the Q factor at state s and action j; Criterion 2: When i and j represent inactive actions, and i and j activate the lth and pth constraints respectively, Among them, N il represents the sampling amount of the inactive action i under the lth constraint condition, N jp represents the sampling amount of the inactive action j under the pth constraint condition; σ Hil represents the Q of the inactive action i under the lth constraint condition H Standard deviation of the factor, σ Hjp represents the Q of the inactive action j under the pth constraint condition H The standard deviation of the factor; Represents state s and action a i Q under the xth constraint H Factor observations, C x represents the upper bound of the xth constraint, A is the steady-state distribution probability of state s, π d (s′) represents the steady-state distribution probability of state s′, Q represents the xth constraint when the state s' and action d(s') are H Factor, x represents l and p; Criterion 3: When i represents a possible action and b represents the best action, Among them, N b0 represents the first sample size of the optimal action, N i represents the sampling amount of the action i, σ b represents the standard deviation of the Q factor of the optimal action b, σ i represents the standard deviation of the Q factor of the action i, represents the best action to observe; For any two constraints i and j, Among them, N bi represents the sampling amount of the optimal action b under the i-th constraint condition, N bj represents the sampling amount of the optimal action b under the jth constraint condition; σ Hbi represents the Q of the optimal action b under the i-th constraint condition H Standard deviation of the factor, σ Hbj represents the Q of the optimal action b under the jth constraint condition H The standard deviation of the factor; Represents state s and action a b Q under the xth constraint H Factor observations, x represents i and j; Criterion 4: For an inactive action i, its corresponding activated Constraints, then N i represents the sampling volume of the inactive action i; Criterion 5: For the optimal action b, N b represents the sampling amount of the optimal action b.

7. The method according to claim 1, characterized in that The variance of the Q factor of each action and the Q factor of each action activation constraint are calculated using the sampling data distribution algorithm. H The variance of the factors and the total amount of consumed samples are analyzed to obtain the target sample size for each action, including: According to the sampling data distribution algorithm, the variance of the Q factor of each action and the Q factor of each action activation constraint are calculated. H The variance of the factors was analyzed and the target sample size ratio of each action was calculated; The number of samples that should be obtained for each action is obtained by multiplying the target sample number ratio of each action by the total number of consumed samples; The larger of the number of samples that each action should obtain and the number of samples actually used by each action is selected as the target number of samples for each action.

8. An online reinforcement learning device for a multi-constrained controlled system, characterized in that: include: For each state, the optimal action for that state is determined by the following units: The simulation unit is used to sample each action in the action set according to the preset sampling amount, and determine the variance of the Q factor of each action and the Q factor of each action activation constraint condition according to the sampling results. H The variance of the factor and the consumed sampling amount of each action, where the Q factor is determined according to the objective function of the control strategy of the controlled system, Q H The factors are determined according to the constraints of the control strategy of the controlled system; A first calculation unit, used to calculate the total amount of consumed samples according to the consumed sampling amount of each action and the preset sampling increment; The second calculation unit is used to calculate the variance of the Q factor of each action and the Q factor of each action activation constraint condition using the sampling data distribution algorithm. H The variance of the factors and the total amount of consumed samples are analyzed to obtain the target sample size of each action; the sampling data allocation algorithm includes the criteria for calculating the sampling amount of each type of action under the activation constraint conditions, which is used to gradually maximize the probability of correctly selecting the optimal action; A third calculation unit is used to determine the supplementary sampling amount of each action according to the target sample amount of each action and the consumed sample amount of each action; The supplementary sampling unit is used to perform supplementary sampling according to the supplementary sampling amount of each action, and use the supplementary sampling results to re-determine the variance of the Q factor of each action and the Q factor of the activation constraint condition of each action. H The variance of the factors and the consumed samples of each action; The control unit is used to adjust the total amount of consumed samples and determine whether the total amount of consumed samples is less than the preset total sampling amount. If so, the second calculation unit is used to recalculate the target sample amount. If not, the optimal action of the state is output to the controlled system.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor of a computer device, the method according to any one of claims 1 to 7 is implemented.