A method and device for arranging edge computing servers in an Internet of Things system
Optimizing the layout of edge computing servers in the Internet of Things system through the bimodal symbiotic biological search algorithm solves the problem of how to use as few edge computing servers as possible to meet the edge computing needs of device nodes, achieving efficient and accurate resource allocation with efficiency and strong convergence ability.
Patent Information
- Application Number
- CN202311112683.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-08-30
AI Technical Summary
In the Internet of Things system, how to use as few edge computing servers as possible to meet the edge computing resource requirements of each device node, ensure that the distance from the device node to the edge computing server does not exceed a pre-given value, and each device node can be deployed at most An edge computing server.
A bimodal symbiotic organism search algorithm is proposed. By establishing a mathematical model, individual encoding, decoding, fitness value calculation and bimodal mutualistic symbiosis and biased symbiosis operations, the layout of the edge computing server is optimized to improve the global search capability of the algorithm and ensure Effective and efficient resource allocation.
It effectively solves the edge computing server layout problem of the Internet of Things system. It has the characteristics of high efficiency, strong convergence ability, and high accuracy. It can meet the computing resource needs of all device nodes while minimizing the number of edge computing servers.
Smart Images

Figure CN117176734B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a method and device for arranging edge computing servers of an Internet of Things system. Background Art
[0002] The edge computing server of the IoT system provides timely and fast local services for the IoT system, reduces network overhead, reduces the risk of long-distance communication interruption, and improves the work efficiency and quality of the IoT system. The edge computing server of the IoT system includes servers for data communication, data preprocessing, data storage, data computing, data analysis, and business processing. Its scientific and reasonable layout can not only effectively meet the edge computing needs of the IoT system, but also reduce investment costs. Therefore, the layout of the edge computing server of the IoT system is an important issue that needs to be solved in the application of the IoT system.
[0003] The layout problem of edge computing servers in the IoT system can be described as follows: there are several device nodes in the IoT system that require edge computing services, and each device node requires certain edge computing resources; requirements: each device node is served by an edge computing server, the distance from the device node to the edge computing server does not exceed a predetermined value, the computing resources of each edge computing server are limited, the deployment location of the edge computing server can only be selected at the location of the device node, and at most one edge computing server is deployed at each device node location. The question is how to use as few edge computing servers as possible to meet the above edge computing requirements.
[0004] This application proposes a bimodal symbiotic biological search algorithm to solve the problem of edge computing server layout in the Internet of Things system. Bimodal mutualistic symbiotic operations and bimodal partial symbiotic operations are proposed to improve the global search ability of the algorithm. This application can effectively solve the problem of edge computing server layout in the Internet of Things system, with the characteristics of high efficiency, strong convergence ability and high precision. Summary of the invention
[0005] In view of the above problems, the present application is proposed to provide a method and device for arranging edge computing servers in an Internet of Things system, so as to use as few edge computing servers as possible to meet edge computing requirements.
[0006] In order to achieve the above objectives, the specific plan is proposed as follows:
[0007] A method for deploying edge computing servers in an Internet of Things system comprises the following steps:
[0008] S1. Establish a mathematical model for the edge computing server layout of the IoT system:
[0009]
[0010] The constraints are:
[0011] x ij =x ij y i ,i,j=1,2,...,n (2)
[0012]
[0013]
[0014]
[0015] y i =0, 1, i=1, 2, ..., n; x ij =0,1,i,j=1,2,...,n (6)
[0016] Where n is the number of IoT system device nodes, which is a positive integer; y i =1 means that an edge computing server is deployed at the location of device node i; x ij =1 indicates that device node j is served by edge computing server i, i, j = 1, 2, ..., n; d ij is a pre-given non-negative real number, representing the distance between device nodes i and j, i, j = 1, 2, ..., n; d is a pre-given non-negative real number, representing the maximum allowable distance from the device node to the edge computing server; q j is a pre-given positive number, which is the edge computing resource demand of device node j, j = 1, 2, ..., n; Q is a pre-given positive number, which is the total computing resource of an edge computing server; Formula (1) is the objective function; Formulas (2) and (3) indicate that each device node is served by an edge computing server; Formula (4) indicates that the deployment location of the edge computing server is selected from the location of the device node, and the distance from the device node to the edge computing server does not exceed d; Formula (5) indicates that at most one edge computing server is deployed at each device node location, and the computing resource amount provided by the edge computing server to the device node does not exceed Q;
[0017] S2. Determine the individual encoding method: Individual S is encoded as a vector with dimension n and components as real numbers, that is,
[0018] S=(s1,s2,...,s j ,...,s n ) (7)
[0019] Among them, s j is a real number, j = 1, 2, ..., n;
[0020] S3, determining the individual decoding method;
[0021] S4, calculation method to determine individual fitness value: for individual S = (s1, s2, ..., s j ,...,s n ) Calculate the fitness value, including:
[0022] Use the y obtained in step 3 i (i=1,2,...,n),x ij (i, j = 1, 2, ..., n) value, calculate the fitness value of S according to formula (8):
[0023] Fit(S)=(Fit1(S),Fit2(S)) (8)
[0024] in,
[0025]
[0026]
[0027] S5. Set the control parameters of the algorithm: set the population size PSize, PSize is a positive integer not less than 2, the maximum number of iterations of the algorithm MCount, MCount is a positive integer, and the bimodal threshold p c , p c The value range is 0≤p c ≤1;
[0028] S6, initialization: further comprising:
[0029] S6-1, control parameter initialization: set the current number of iterations CCount = 0;
[0030] S6-2. Population initialization: Generate PSize individuals, and denote the i-th (i=1,2,...,PSize) individual as S i :
[0031] S i =(s i1 ,s i2 ,...,s ij ,...,s in ) (11)
[0032] Among them, s ij Generated by rand(0,n), j=1,2,...,n, where rand(x,y) is a random number uniformly distributed on [x,y];
[0033] S6-3. For each individual S i(i = 1, 2, ..., PSize), perform individual decoding according to step S3 and calculate the fitness value according to step S4;
[0034] S6-4, Determine the initial global optimal individual and global sub-optimal individual: Select the individual with the largest fitness value in the current population as the global optimal individual S * , and select the individual with the largest fitness value among the individuals in the current population except the optimal individual as the global sub-optimal individual
[0035] S7, Perform the double-peak mutualistic symbiosis operation;
[0036] S8, Perform the double-peak commensalism symbiosis operation;
[0037] S9, Individual decoding, calculate the fitness value: For each individual S i (i = 1, 2, ..., PSize), perform individual decoding according to step S3 and calculate the fitness value according to step S4;
[0038] S10, Update the global optimal individual and global sub-optimal individual;
[0039] S11, CCount = CCount + 1, if CCount < MCount, then go to S7, otherwise go to S12;
[0040] S12, Output the optimal solution, and the optimal solution is the solution corresponding to the global optimal individual S * corresponding solution.
[0041] Optionally, the step S3 to determine the individual decoding method further includes:
[0042] S3-1, Let y i = 0, i = 1, 2, ..., n;
[0043] S3-2, Decode the individual S = (s1, s2, ..., s j , ..., s n ), and let the jth device node be served by the edge computing server at the position of mod(round(s j ), n) + 1, j = 1, 2, ..., n, that is, let:
[0044]
[0045]
[0046] where round() is the rounding function.
[0047] Optionally, the step S7 to perform the double-peak mutualistic symbiosis operation further includes:
[0048] For each individual S i , generate a random number p i =rand(0,1), i=1,2,...,PSize, calculate:
[0049]
[0050]
[0051] Among them, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i, S inew By S i The new individual generated, S jnew By S j The new individuals generated; the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively:
[0052]
[0053]
[0054] If Fit(S inew )>Fit(S i ), then S inew Instead of S i , if Fit(S jnew )>Fit(S j ), then S jnew Instead of S j .
[0055] Optionally, the step S8 performs a bimodal partial benefit symbiosis operation, further comprising:
[0056] For each individual S i , generate a random number p′ i =rand(0,1), i=1,2,...,PSize, calculate:
[0057]
[0058] Among them, S inew is a new individual, the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i;
[0059] If Fit(S inew )>Fit(S i ), then S inew Instead of S i .
[0060] Optionally, the step S10 of updating the global optimal individual and the global suboptimal individual further includes:
[0061] Find the best individual in the current population like but Otherwise, if but
[0062] An edge computing server layout device for an Internet of Things system, comprising:
[0063] Mathematical model building unit, used to build a mathematical model of the edge computing server layout of the Internet of Things system:
[0064]
[0065] The constraints are:
[0066] x ij =x ij y i ,i,j=1,2,...,n (2)
[0067]
[0068]
[0069]
[0070] y i =0, 1, i=1, 2, ..., n; x ij =0,1,i,j=1,2,...,n (6)
[0071] Where n is the number of IoT system device nodes, which is a positive integer; y i =1 means that an edge computing server is deployed at the location of device node i; x ij =1 indicates that device node j is served by edge computing server i, i, j = 1, 2, ..., n; d ij is a pre-given non-negative real number, representing the distance between device nodes i and j, i, j = 1, 2, ..., n; d is a pre-given non-negative real number, representing the maximum allowable distance from the device node to the edge computing server; q jis a pre-given positive number, which is the edge computing resource demand of device node j, j = 1, 2, ..., n; Q is a pre-given positive number, which is the total computing resource of an edge computing server; Formula (1) is the objective function; Formulas (2) and (3) indicate that each device node is served by an edge computing server; Formula (4) indicates that the deployment location of the edge computing server is selected from the location of the device node, and the distance from the device node to the edge computing server does not exceed d; Formula (5) indicates that at most one edge computing server is deployed at each device node location, and the computing resource amount provided by the edge computing server to the device node does not exceed Q;
[0072] The individual coding unit is used to determine the individual coding method: the individual S is encoded as a vector with a dimension of n and components of real numbers, that is,
[0073] S=(s1,s2,...,s j ,...,s n ) (7)
[0074] Among them, s j is a real number, j = 1, 2, ..., n;
[0075] An individual decoding unit, used for determining an individual decoding method;
[0076] The individual fitness value calculation unit is used to determine the calculation method of the individual fitness value: for individual S = (s1, s2, ..., s j ,...,s n ) Calculate the fitness value, including:
[0077] Using the individual decoding unit to obtain y i (i=1,2,...,n),x ij (i, j = 1, 2, ..., n) value, calculate the fitness value of S according to formula (8):
[0078] Fit(S)=(Fit1(S),Fit2(S)) (8)
[0079] in,
[0080]
[0081]
[0082] The control parameter setting unit is used to set the control parameters of the algorithm: set the population size PSize, PSize is a positive integer not less than 2, the maximum number of iterations of the algorithm MCount, MCount is a positive integer, and the bimodal threshold p c , p c The value range is 0≤p c≤ 1;
[0083] A control parameter initialization unit for setting the current iteration count CCount = 0;
[0084] A population initialization unit for generating PSize individuals, where the i-th (i = 1, 2,..., PSize) individual is denoted as S i :
[0085] S i = (s i1 , s i2 ,..., s ij ,..., s in ) (11)
[0086] where s ij is generated by rand(0, n), j = 1, 2,..., n, and here, rand(x, y) is a random number uniformly distributed on [x, y];
[0087] A solving unit for decoding each individual S i (i = 1, 2,..., PSize), decoding the individual according to the individual decoding unit and calculating the fitness value according to the individual fitness value calculation unit;
[0088] An optimal individual determination unit for determining the initial global optimal individual and the global sub-optimal individual: selecting the individual with the largest fitness value in the current population as the global optimal individual S * , and selecting the individual with the largest fitness value among the individuals other than the optimal individual in the current population as the global sub-optimal individual
[0089] A double-peak mutualism execution unit for performing double-peak mutualism operations;
[0090] A double-peak commensalism execution unit for performing double-peak commensalism operations;
[0091] A decoding and calculation unit for individual decoding and fitness value calculation: for each individual S i (i = 1, 2,..., PSize), decoding the individual according to the individual decoding unit and calculating the fitness value according to the individual fitness value calculation unit;
[0092] An individual update unit for updating the global optimal individual and the global sub-optimal individual;
[0093] A counting unit for performing CCount = CCount + 1. If CCount < MCount, then execute the double-peak mutualism execution unit, otherwise execute the optimal solution output unit;
[0094] The optimal solution output unit is used to output the optimal solution, which is the global optimal individual S * The corresponding solution.
[0095] By means of the above technical scheme, this application establishes a mathematical model of the edge computing server layout of the Internet of Things system, determines the individual encoding method, determines the individual decoding method, determines the calculation method of the individual fitness value, sets the control parameters of the algorithm, initializes the operation, performs the bimodal mutualistic operation, performs the bimodal partial symbiotic operation, individual decoding, calculates the fitness value, updates the global optimal individual and the global suboptimal individual, and outputs the optimal solution when CCount is not less than MCount. It can be seen that a bimodal symbiotic biological search algorithm is proposed to solve the edge computing server layout problem of the Internet of Things system. Bimodal mutualistic operation and bimodal partial symbiotic operation are proposed respectively to improve the global search ability of the algorithm, so that the edge computing server layout problem of the Internet of Things system can be effectively solved, with the characteristics of high efficiency, strong convergence ability and high precision. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0097] Figure 1 A schematic diagram of a process for implementing edge computing server layout of an Internet of Things system provided in an embodiment of the present application;
[0098] Figure 2 A schematic diagram of an optimal solution for the edge computing server layout of the Internet of Things system provided in an embodiment of the present application;
[0099] Figure 3 A schematic diagram of the structure of an apparatus for implementing edge computing server layout of an Internet of Things system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0100] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0101] The present application solution can be implemented based on a terminal with data processing capabilities, which can be a computer, server, cloud, etc.
[0102] Next, combine Figure 1 The data table of the device node information and the location of the edge computing server of the Internet of Things system is used to introduce the edge computing server layout method of the Internet of Things system of this application.
[0103] Specifically, the data of IoT system device node information and edge computing server location are shown in the following table:
[0104]
[0105]
[0106]
[0107] Among them, the table gives the device node information of the Internet of Things system. The second and third columns of the table represent the coordinate positions of the devices. The fourth column "edge computing resource demand" can be understood as communication capacity, storage capacity, etc. Correspondingly, the edge computing server can be understood as a server for data communication, data storage, etc.
[0108] Figure 1 A flow chart of the edge computing server layout method of the Internet of Things system of the present application is shown, and the process may include the following steps:
[0109] Step S1: Establish a mathematical model for the edge computing server layout of the Internet of Things system.
[0110] Specifically, the mathematical model is:
[0111]
[0112] The constraints are:
[0113] x ij =x ij y i ,i,j=1,2,...,n (2)
[0114]
[0115]
[0116]
[0117] y i =0, 1, i=1, 2, ..., n; x ij =0,1,i,j=1,2,...,n (6)
[0118] Where n is the number of IoT system device nodes, which is a positive integer, such as n = 55; y i =1 means that an edge computing server is deployed at the location of device node i; xij =1 indicates that device node j is served by edge computing server i, i, j = 1, 2, ..., n; d ij is a pre-given non-negative real number, representing the distance between device nodes i and j; i, j = 1, 2, ..., n, d is a pre-given non-negative real number, representing the maximum allowable distance from the device node to the edge computing server, such as d = 110; q j (As shown in the table above) is a pre-given positive number, which is the edge computing resource demand of device node j, j = 1, 2, ..., n; Q is a pre-given positive number, which is the total computing resources of an edge computing server, such as Q = 20; Formula (1) is the objective function; Formulas (2) and (3) indicate that each device node is served by an edge computing server; Formula (4) indicates that the deployment location of the edge computing server is selected from the location of the device node, and the distance from the device node to the edge computing server does not exceed d; Formula (5) indicates that at most one edge computing server is deployed at each device node location, and the computing resources provided by the edge computing server to the device node do not exceed Q.
[0119] Step S2: Determine the individual encoding method.
[0120] Specifically, the individual S is encoded as a vector with dimension n and components as real numbers, that is,
[0121] S=(s1,s2,...,s j ,...,s n ) (7)
[0122] Among them, s j is a real number, j=1,2,...,n.
[0123] Step S3: Determine the individual decoding method.
[0124] Step S4: Determine the calculation method of the individual fitness value.
[0125] Specifically, for individual S = (s1, s2, ..., s j ,...,s n ) Calculate the fitness value, including:
[0126] Use the y obtained in step S3 i (i=1,2,...,n),x ij (i, j = 1, 2, ..., n) value, calculate the fitness value of S according to formula (8):
[0127] Fit(S)=(Fit1(S),Fit2(S)) (8)
[0128] in,
[0129]
[0130]
[0131] Step S5: Setting the control parameters of the algorithm.
[0132] Specifically, set the population size PSize, PSize is a positive integer not less than 2, the maximum number of algorithm iterations MCount, MCount is a positive integer, and the bimodal threshold p c , p c The value range is 0≤p c ≤1, such as PSize = 60, MCount = 1200, p c =0.97.
[0133] Step S6: Initialization.
[0134] Specifically, the initialization process may include:
[0135] S6-1, control parameter initialization: set the current number of iterations CCount = 0;
[0136] S6-2. Population initialization: Generate PSize individuals, and denote the i-th (i=1,2,...,PSize) individual as S i :
[0137] S i =(s i1 ,s i2 ,...,s ij ,...,s in ) (11)
[0138] Among them, s ij Generated by rand(0,n), j=1,2,...,n, where rand(x,y) is a random number uniformly distributed on [x,y];
[0139] S6-3. For each individual S i (i=1,2,...,PSize), perform individual decoding according to step S3, and calculate the fitness value according to step S4;
[0140] S6-4. Determine the initial global optimal individual and the global suboptimal individual: Select the individual with the largest fitness value in the current population as the global optimal individual S * , select the individual with the largest fitness value from the individuals in the current population except the best individual as the global suboptimal individual
[0141] Step S7: Execute bimodal mutualistic symbiosis operation.
[0142] Step S8, executing bimodal partial benefit symbiosis operation.
[0143] Step S9: Individual decoding and calculation of fitness value.
[0144] Specifically, for each individual S i (i=1,2,...,PSize), perform individual decoding according to step S3, and calculate the fitness value according to step S4.
[0145] Step S10: Update the global optimal individual and the global suboptimal individual.
[0146] Step S11, CCount=CCount+1, determine whether CCount is less than MCount, if so, execute step S7, otherwise execute step S12.
[0147] Step S12: Output the optimal solution, which is the global optimal individual S * The corresponding solution.
[0148] The method for arranging edge computing servers of an Internet of Things system provided in this embodiment establishes a mathematical model for the layout of edge computing servers of an Internet of Things system, determines an individual encoding method, determines an individual decoding method, determines an individual fitness value calculation method, sets the control parameters of the algorithm, initializes the operation, performs a bimodal mutualistic operation, performs a bimodal partial symbiotic operation, performs individual decoding, calculates fitness values, updates the global optimal individual and the global suboptimal individual, and outputs the optimal solution when CCount is not less than MCount. It can be seen that a bimodal symbiotic biological search algorithm is proposed to solve the problem of edge computing server layout of an Internet of Things system. Bimodal mutualistic operations and bimodal partial symbiotic operations are proposed to improve the global search capability of the algorithm, so that the problem of edge computing server layout of an Internet of Things system can be effectively solved, with the characteristics of high efficiency, strong convergence ability, and high precision.
[0149] In some embodiments of the present application, the process of determining the individual decoding method in step S3 is introduced, and the process may include:
[0150] S3-1, let y i =0, i=1,2,...,n;
[0151] S3-2, for individual S = (s1, s2, ..., s j ,...,s n ) is decoded, and the jth device node is decoded by mod(round(s j ),n)+1, the edge computing server provides services, j=1,2,...,n, that is,
[0152]
[0153]
[0154] Among them, round() is the rounding function.
[0155] In some embodiments of the present application, the process of performing the bimodal mutualistic symbiosis operation in step S7 is introduced, and the process may include:
[0156] For each individual S i , generate a random number p i =rand(0,1), i=1,2,...,PSize, calculate:
[0157]
[0158]
[0159] Among them, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i, S inew By S i The new individual generated, S jnew By S j The new individuals generated; the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively:
[0160]
[0161]
[0162] If Fit(S inew )>Fit(S i ), then S inew Instead of S i , if Fit(S jnew )>Fit(S j ), then S jnew Instead of S j .
[0163] In some embodiments of the present application, the process of performing the bimodal partial benefit symbiosis operation in step S8 is introduced, and the process may include:
[0164] For each individual S i , generate a random number p′ i =rand(0,1), i=1,2,...,PSize, calculate:
[0165]
[0166] Among them, Sinew is a new individual, the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i;
[0167] If Fit(S inew )>Fit(S i ), then S inew Instead of S i .
[0168] In some embodiments of the present application, the process of updating the global optimal individual and the global suboptimal individual in step S10 is introduced, and the process may include:
[0169] Find the best individual in the current population like but Otherwise, if but
[0170] In some embodiments of the present application, the optimal solution can be obtained from the data given in the above table. Figure 2 As shown. In the optimal solution, Min Z = 5, that is, 5 edge computing servers are used. The first edge computing server is located at the location of device node 7, and the device nodes it serves are: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, and the amount of resources used is 20. The second edge computing server is located at the location of device node 22, and the device nodes it serves are 12, 15, 16, 17, 21, 22, 23, 28, 29, 30, and the amount of resources used is 19.9. The third edge computing server is located at the location of device node 25, and the device nodes it serves are 13, 18, 19, 20, 24, 25, 26, 27, 31, 32, and the amount of resources used is 20. The fourth edge computing server is located at the location of device node 35, and serves device nodes 33, 35, 36, 40, 41, 42, 43, 48, 49, 50, and 54, using 19.7 resources. The fifth edge computing server is located at the location of device node 51, and serves device nodes 34, 37, 38, 39, 44, 45, 46, 47, 51, 52, 53, and 55, using 20 resources.
[0171] The above table also gives the optimal solution of the embodiment. Among them, the last column is the device node number, indicating that an edge computing server is deployed at this device node location. Each device is provided with edge computing services by the edge computing server corresponding to the last column.
[0172] The following is a description of the device for implementing the edge computing server layout of the Internet of Things system provided in an embodiment of the present application. The device for implementing the edge computing server layout of the Internet of Things system described below and the method for implementing the edge computing server layout of the Internet of Things system described above can be referenced to each other.
[0173] See also Figure 3 , Figure 3 A schematic diagram of the structure of a device for implementing edge computing server layout of an Internet of Things system disclosed in an embodiment of the present application.
[0174] like Figure 3 As shown, the device may include:
[0175] The mathematical model building unit 100 is used to build a mathematical model of the edge computing server layout of the Internet of Things system:
[0176]
[0177] The constraints are:
[0178] x ij =x ij y i ,i,j=1,2,...,n (2)
[0179]
[0180]
[0181]
[0182] y i =0, 1, i=1, 2, ..., n; x ij =0,1,i,j=1,2,...,n (6)
[0183] Where n is the number of IoT system device nodes, which is a positive integer; y i =1 means that an edge computing server is deployed at the location of device node i; x ij =1 indicates that device node j is served by edge computing server i, i, j = 1, 2, ..., n; d ij is a pre-given non-negative real number, representing the distance between device nodes i and j, i, j = 1, 2, ..., n; d is a pre-given non-negative real number, representing the maximum allowable distance from the device node to the edge computing server; q jis a pre-given positive number, which is the edge computing resource demand of device node j, j = 1, 2, ..., n; Q is a pre-given positive number, which is the total computing resource of an edge computing server; Formula (1) is the objective function; Formulas (2) and (3) indicate that each device node is served by an edge computing server; Formula (4) indicates that the deployment location of the edge computing server is selected from the location of the device node, and the distance from the device node to the edge computing server does not exceed d; Formula (5) indicates that at most one edge computing server is deployed at each device node location, and the computing resource amount provided by the edge computing server to the device node does not exceed Q;
[0184] The individual coding unit 200 is used to determine the individual coding method: the individual S is encoded as a vector with a dimension of n and components of real numbers, that is,
[0185] S=(s1,s2,...,s j ,...,s n ) (7)
[0186] Among them, s j is a real number, j = 1, 2, ..., n;
[0187] The individual decoding unit 300 is used to determine the individual decoding method;
[0188] The individual fitness value calculation unit 400 is used to determine the calculation method of the individual fitness value: for individual S=(s1, s2, ..., s j ,...,s n ) Calculate the fitness value, including:
[0189] Using the individual decoding unit to obtain y i (i=1,2,...,n),x ij (i, j = 1, 2, ..., n) value, calculate the fitness value of S according to formula (8):
[0190] Fit(S)=(Fit1(S),Fit2(S)) (8)
[0191] in,
[0192]
[0193]
[0194] The control parameter setting unit 500 is used to set the control parameters of the algorithm: set the population size PSize, PSize is a positive integer not less than 2, the maximum number of iterations of the algorithm MCount, MCount is a positive integer, and the bimodal threshold p c , p c The value range is 0≤pc ≤1;
[0195] A control parameter initialization unit 600 is used to set the current iteration number CCount=0;
[0196] The population initialization unit 700 is used to generate PSize individuals, and the i-th (i=1, 2, ..., PSize) individual is S i :
[0197] S i =(s i1 ,s i2 ,...,s ij ,...,s in ) (11)
[0198] Among them, s ij Generated by rand(0,n), j=1,2,...,n, where rand(x,y) is a random number uniformly distributed on [x,y];
[0199] The solving unit 800 is used to solve each individual S i (i=1, 2, ..., PSize), performing individual decoding according to the individual decoding unit and calculating the fitness value according to the individual fitness value calculation unit;
[0200] The optimal individual determination unit 900 is used to determine the initial global optimal individual and the global suboptimal individual: the individual with the largest fitness value in the current population is selected as the global optimal individual S * , select the individual with the largest fitness value from the individuals in the current population except the best individual as the global suboptimal individual
[0201] A bimodal mutualistic symbiosis execution unit 1000 is used to execute a bimodal mutualistic symbiosis operation;
[0202] A bimodal partial benefit symbiotic execution unit 1100 is used to execute a bimodal partial benefit symbiotic operation;
[0203] Decoding calculation unit, used for individual decoding and fitness value calculation: for each individual S i (i=1, 2, ..., PSize), performing individual decoding according to the individual decoding unit and calculating the fitness value according to the individual fitness value calculation unit;
[0204] An individual updating unit 1200 is used to update the global optimal individual and the global suboptimal individual;
[0205] A counting unit 1300, which is used to execute CCount = CCount + 1. If CCount < MCount, then execute the double-peak mutualism execution unit, otherwise execute the optimal solution output unit 1400;
[0206] The optimal solution output unit 1400 is used to output the optimal solution, and the optimal solution is the global optimal individual S * The corresponding solution.
[0207] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0208] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0209] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for deploying edge computing servers in an Internet of Things system, characterized in that: It includes the following steps: S1. Establish a mathematical model for the layout of edge computing servers in the Internet of Things system: Among them, the constraint conditions are: x ij =x ij y i ,i,j=1,2,...,n (2) y i =0,1,i=1,2,...,n;x ij =0,1,i,j=1,2,...,n (6) Where n is the number of IoT system device nodes, which is a positive integer; y i =1 means that an edge computing server is deployed at the location of device node i; x ij =1 indicates that device node j is served by edge computing server i, i, j = 1, 2, ..., n; d ij is a pre-given non-negative real number, representing the distance between device nodes i and j, i, j = 1, 2, ..., n; d is a pre-given non-negative real number, representing the maximum allowable distance from the device node to the edge computing server; q j is a pre-given positive number, which is the edge computing resource demand of device node j, j = 1, 2, ..., n; Q is a pre-given positive number, which is the total computing resource of an edge computing server; Formula (1) is the objective function; Formulas (2) and (3) indicate that each device node is served by an edge computing server; Formula (4) indicates that the deployment location of the edge computing server is selected from the location of the device node, and the distance from the device node to the edge computing server does not exceed d; Formula (5) indicates that at most one edge computing server is deployed at each device node location, and the computing resource amount provided by the edge computing server to the device node does not exceed Q; S2. Determine the individual coding method: The individual S is coded as a vector with a dimension of n and components being real numbers, that is S=(s1,s2,...,s j ,...,s n ) (7) Among them, s j is a real number, j = 1, 2, ..., n; S3. Determine the individual decoding method; S4, calculation method to determine individual fitness value: for individual S = (s1, s2, ..., s j ,...,s n ) Calculate the fitness value, including: Use the y obtained in step 3 i (i=1,2,...,n),x ij (i, j = 1, 2, ..., n) value, calculate the fitness value of S according to formula (8): Fit(S) = (Fit1(S), Fit2(S)) (8) Among them, S5. Set the control parameters of the algorithm: set the population size PSize, PSize is a positive integer not less than 2, the maximum number of iterations of the algorithm MCount, MCount is a positive integer, and the bimodal threshold p c , p c The value range is 0≤p c ≤1; S6. Initialization: Further includes: S6-1. Control parameter initialization: Let the current iteration count CCount = 0; S6-2. Population initialization: Generate PSize individuals, and denote the i-th (i=1,2,...,PSize) individual as S i : S i =(s i1 ,s i2 ,...,s ij ,...,s in ) (11) Among them, s ij Generated by rand(0,n), j=1,2,...,n, where rand(x,y) is a random number uniformly distributed on [x,y]; S6-3. For each individual S i (i=1,2,...,PSize), perform individual decoding according to step S3, and calculate the fitness value according to step S4; S6-4. Determine the initial global optimal individual and the global suboptimal individual: Select the individual with the largest fitness value in the current population as the global optimal individual S * , select the individual with the largest fitness value from the individuals in the current population except the best individual as the global suboptimal individual S7. Execute the double-peak mutualism operation; S8. Execute the double-peak commensalism operation; S9, individual decoding, calculation of fitness value: for each individual S i (i=1,2,...,PSize), perform individual decoding according to step S3, and calculate the fitness value according to step S4; S10. Update the global optimal individual and the global sub-optimal individual; S11. CCount = CCount + 1. If CCount < MCount, then go to S7, otherwise go to S12; S12, output the optimal solution, the optimal solution is the global optimal individual S * The corresponding solution; The step S3 to determine the individual decoding method further includes: S3-1. Let y i = 0, i = 1, 2, ..., n; S3-2, for individual S = (s1, s2, ..s. j ,,..s. n ,) to decode, let the jth device node be mod(round(s j ),n)+1, the edge computing server provides services, j=1,2,...,n, that is, Among them, round() is the rounding function; The step S7 to execute the double-peak mutualism operation further includes: For each individual S i , generate a random number p i =rand(0,1), i=1,2,...,PSize, calculate: Among them, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i, S inew By S i The new individual generated, S jnew By S j The new individuals generated; the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively: If Fit(S inew )>Fit(S i ), then S inew Instead of S i , if Fit(S jnew )>Fit(S j ), then S jnew Instead of S j ; The step S8 to execute the double-peak commensalism operation further includes: For each individual S i , generate a random number p i ′=rand(0,1), i=1,2,...,PSize, calculate: Among them, S inew is a new individual, the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i; If Fit(S inew )>Fit(S i ), then S inew Instead of S i .
2. The method for deploying edge computing servers in an Internet of Things system according to claim 1, characterized in that: The step S10 to update the global optimal individual and the global sub-optimal individual further includes: Find the best individual in the current population like but Otherwise, if but 3. A device for deploying edge computing servers in an Internet of Things system, characterized in that: Includes: A mathematical model establishment unit for establishing a mathematical model for the layout of edge computing servers in the Internet of Things system: Among them, the constraint conditions are: x ij =x ij y i ,i,j=1,2,...,n (2) y i =0,1,i=1,2,...,n;x ij =0,1,i,j=1,2,...,n (6) Where n is the number of IoT system device nodes, which is a positive integer; y i =1 means that an edge computing server is deployed at the location of device node i; x ij =1 indicates that device node j is served by edge computing server i, i, j = 1, 2, ..., n; d ij is a pre-given non-negative real number, representing the distance between device nodes i and j, i, j = 1, 2, ..., n; d is a pre-given non-negative real number, representing the maximum allowable distance from the device node to the edge computing server; q j is a pre-given positive number, which is the edge computing resource demand of device node j, j = 1, 2, ..., n; Q is a pre-given positive number, which is the total computing resource of an edge computing server; Formula (1) is the objective function; Formulas (2) and (3) indicate that each device node is served by an edge computing server; Formula (4) indicates that the deployment location of the edge computing server is selected from the location of the device node, and the distance from the device node to the edge computing server does not exceed d; Formula (5) indicates that at most one edge computing server is deployed at each device node location, and the computing resource amount provided by the edge computing server to the device node does not exceed Q; An individual coding unit for determining the individual coding method: The individual S is coded as a vector with a dimension of n and components being real numbers, that is S=(s1,s2,...,s j ,...,s n ) (7) Among them, s j is a real number, j = 1, 2, ..., n; An individual decoding unit for determining the individual decoding method; The individual fitness value calculation unit is used to determine the calculation method of the individual fitness value: for individual S = (s1, s2, ..., s j ,...,s n ) Calculate the fitness value, including: Using the individual decoding unit to obtain y i (i=1,2,...,n),x ij (i, j = 1, 2, ..., n) value, calculate the fitness value of S according to formula (8): Fit(S) = (Fit1(S), Fit2(S)) (8) Among them, The control parameter setting unit is used to set the control parameters of the algorithm: set the population size PSize, PSize is a positive integer not less than 2, the maximum number of iterations of the algorithm MCount, MCount is a positive integer, and the bimodal threshold p c , p c The value range is 0≤p c ≤1; A control parameter initialization unit for making the current iteration count CCount = 0; Population initialization unit, used to generate PSize individuals, the i-th (i=1,2,...,PSize) individual is S i : S i =(s i1 ,s i2 ,...,s ij ,...,s in ) (11) Among them, s ij Generated by rand(0,n), j=1,2,...,n, where rand(x,y) is a random number uniformly distributed on [x,y]; The solving unit is used to calculate each individual S i (i=1, 2, ..., PSize), performing individual decoding according to the individual decoding unit and calculating the fitness value according to the individual fitness value calculation unit; The optimal individual determination unit is used to determine the initial global optimal individual and the global suboptimal individual: the individual with the largest fitness value in the current population is selected as the global optimal individual S * , select the individual with the largest fitness value from the individuals in the current population except the best individual as the global suboptimal individual A double-peak mutualism execution unit for executing the double-peak mutualism operation; A double-peak commensalism execution unit for executing the double-peak commensalism operation; Decoding calculation unit, used for individual decoding and fitness value calculation: for each individual S i (i=1, 2, ..., PSize), performing individual decoding according to the individual decoding unit and calculating the fitness value according to the individual fitness value calculation unit; An individual update unit for updating the global optimal individual and the global sub-optimal individual; A counting unit for executing CCount = CCount + 1. If CCount < MCount, then execute the double-peak mutualism execution unit, otherwise execute the optimal solution output unit; The optimal solution output unit is used to output the optimal solution, which is the global optimal individual S * The corresponding solution; The step S3 to determine the individual decoding method further includes: S3-1. Let y i = 0, where i = 1, 2,..., n; S3-2, for individual S = (s1, s2, ..s. j ,,..s. n ,) to decode, let the jth device node be mod(round(s j ),n)+1, the edge computing server provides services, j=1,2,...,n, that is, Among them, round() is the rounding function; The step S7 to execute the double-peak mutualism operation further includes: For each individual S i , generate a random number p i =rand(0,1), i=1,2,...,PSize, calculate: Among them, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i, S inew By S i The new individual generated, S jnew By S j The new individuals generated; the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively: If Fit(S inew )>Fit(S i ), then S inew Instead of S i , if Fit(S jnew )>Fit(S j ), then S jnew Instead of S j ; The step S8 to execute the double-peak commensalism operation further includes: For each individual S i , generate a random number p′ i =rand(0,1), i=1,2,...,PSize, calculate: Among them, S inew is a new individual, the values of λ1 and λ2 are calculated according to formula (16) and (17) respectively, S j The subscript j is randomly generated, j = 1, 2, ..., PSize, j ≠ i; If Fit(S inew )>Fit(S i ), then S inew Instead of S i .
