An underwater wireless sensor network resource allocation method based on stochastic gradient descent

By improving the resource allocation method of the stochastic gradient descent algorithm, the problem of low throughput in the resource allocation process in UWSN is solved, and more efficient resource utilization and network performance improvement is achieved.

CN114080026BActive Publication Date: 2025-06-20LUDONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010798571.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-11
Publication Date
2025-06-20
Estimated Expiration
2040-08-11

AI Technical Summary

Technical Problem

Underwater wireless sensing networks (UWSNs) face challenges such as low bandwidth, high latency and node mobility in resource allocation, resulting in low network throughput and difficulty in effectively utilizing channel resources.

Method used

A resource allocation method based on improved stochastic gradient descent is adopted to establish a maximum throughput resource allocation optimization model, considering constraints such as energy borrowing and return mechanism, rate constraints, power constraints and energy return, and optimize resource allocation through time slot cyclic transmission communication system.

Benefits of technology

It effectively improves the UWSN network performance and service quality, reduces node energy consumption, improves network throughput and service quality, and is suitable for UWSN systems with instability and large-scale data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114080026B_ABST
    Figure CN114080026B_ABST
Patent Text Reader

Abstract

The present invention relates to a resource allocation method for underwater wireless sensor networks based on stochastic gradient descent, belonging to the field of resource allocation in communication technology systems. The present invention takes into account actual network rate constraints, power constraints, energy return, etc. constraints, adopts multi-homing technology for underwater wireless sensor networks, and, in the case of an energy borrowing and returning mechanism, aims at maximizing the throughput of the communication system to establish an optimization model for network resource allocation; the proposed improved stochastic gradient descent algorithm randomly selects a sample to calculate the gradient in each iteration process to perform iterative update of the weight vector. And a momentum factor is used to ensure the optimality of the step size, and then a resource allocation method for underwater wireless sensor networks based on stochastic gradient descent is proposed. Convergence analysis and simulation results show that the network resource allocation method based on the improved stochastic gradient has good convergence, can effectively control the communication rate between underwater sensors, and reduces the energy consumption of underwater wireless sensor networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and particularly to a method for implementing resource allocation of an underwater wireless sensor network based on stochastic gradient descent. Background Art

[0002] The ocean is of great significance to the development of human society. At present, there is an urgent need to effectively monitor the ocean. As an important technology for ocean monitoring, the underwater wireless sensor network (UWSN) has very broad application prospects in both military and civilian fields and has received attention from countries around the world in recent years. The UWSN belongs to a type of wireless sensor network (WSN) and is composed of underwater sensor nodes and a base station. These nodes can sense certain signals within their coverage area, and after preliminary processing of the signals, they are transmitted to the required users. The sensors are responsible for collecting various signals such as temperature, pH value, pressure, and sound, and transmitting them to the processor. The processor processes the data collected by the sensors, stores it in the memory, or sends it to other nodes in the UWSN through a modem. The battery needs to supply power to each unit in the sensor node. Since radio waves attenuate very quickly underwater and the propagation distance is limited, currently, the communication between underwater nodes is mainly completed by means of underwater acoustic waves. The underwater acoustic communication channel is one of the most complex and difficult communication media. Its communication network throughput is an important performance indicator in the UWSN, representing the operating efficiency of the wireless sensor network. When analyzing problems related to network performance, network throughput testing is an essential means. How to improve the resource allocation algorithm for network throughput is a research hotspot in the UWSN.

[0003] Due to the special nature of the UWSN system, many problems and challenges will be encountered during the resource allocation process, such as the low bandwidth of underwater acoustic communication, the high latency of underwater acoustic communication, and the mobility of underwater nodes. The energy loss caused by the propagation of sound waves in water includes spreading loss, absorption loss, and scattering loss, among which spreading loss and absorption loss are the main propagation losses. Absorption loss is positively correlated with the sound wave frequency. The greater the frequency, the greater the absorption loss. Therefore, the frequency of underwater acoustic communication is restricted. Under normal circumstances, the underwater acoustic communication frequency is maintained within the range of 1 kHz to 100 kHz. If multiple underwater acoustic communication systems are deployed in the same water area during the same time period, the channel resources of the system will become tense, and it will take a long time to have an idle channel, increasing the latency of data packets during the transmission process. In the scheduling of UWSN, nodes in the sleep state only enter the working state after receiving the wake-up signal from neighboring nodes. This scheduling method needs to fully consider the impact brought by the latency of underwater acoustic communication. The positions of nodes in UWSN are fixed or move very slowly, while nodes suspended in water or floating on the water surface will move continuously with the water flow. If a certain scheduling strategy requires the use of network topology or node location information, the movement of nodes will pose great difficulties to the scheduling. Since it is difficult to obtain accurate node location information, the scheduling result will deviate greatly from the ideal situation. During the network scheduling process of UWSN, it is hoped to make full use of each channel resource as much as possible to increase the network throughput. Summary of the Invention

[0004] The energy collected from nature is unstable, and when the energy harvesting system is applied to the UWSN system, the instability is more obvious, which will affect the throughput of the UWSN communication system. The present invention adopts the multi-homing technology for the UWSN system, which can enable a user to access multiple base stations. When the energy of one base station is insufficient, the energy of the base station in another layer of the network may be sufficient, thereby improving the throughput of the user and realizing the cooperation technology between multiple base stations.

[0005] To solve the above problems, the present invention proposes an underwater wireless sensor network resource allocation method based on improved stochastic gradient descent, which can effectively make up for the instability and randomness of the system, thereby improving the UWSN network performance and service quality. The method mainly includes the following steps:

[0006] Establish an optimization model for maximum throughput resource allocation:

[0007] Basic assumptions:

[0008] 1. Assume that the channel gain remains unchanged in two cases: when the node is stationary and when the time for the node to move a unit distance is much greater than the connection time between the base station and the node.

[0009] 2. To prevent interference between base stations, the base stations need to be allocated to different nodes, assuming that each node is connected to only one base station at time n.

[0010] The present invention mainly aims at maximizing the throughput of the UWSN communication system before the deadline under the energy borrowing and returning mechanism, and proposes a resource allocation method applicable to energy borrowing / returning and data transmission arrangement. Assume that the UWSN communication system is equipped with an energy storage battery at the sending end, and the energy used for data transmission all comes from the energy storage battery. The newly collected energy and the energy obtained from the traditional power grid energy supply system are stored in the energy storage battery. The sending end obtains energy from the energy storage battery for transmission, and the energy obtained from the traditional power grid also needs to pass through the energy storage battery before it can be sent to make up for the need for data transmission when the energy collection is insufficient. To avoid burdening the traditional power grid, the sending end returns the energy borrowed from the traditional power grid before the transmission deadline, and needs to return additional energy as interest for borrowing energy from the traditional power grid according to a certain interest rate. The energy collection and supply system borrows energy from the traditional power grid system, so the energy loss during the borrowing and returning process of energy is also borne by the energy collection and supply system, so as to ensure that both parties are in a win-win state as much as possible.

[0011] The present invention uses a time slot cyclic transmission to transmit the data packets required by the communication system, and takes N time slots as a time slot cycle. For the data packets transmitted by the underwater wireless communication system, represents the transmission power of node k in the nth time slot. To avoid wasting energy as much as possible, its constraint condition is:

[0012]

[0013] where the total number of nodes is K, and P max,k represents the maximum power of node k.

[0014] At the beginning of each cyclic time slot, the data packets accumulated in the previous time slot are transmitted uniformly. is the energy collected at the beginning of the nth time slot, is the energy borrowed by the energy collection and supply system from the traditional power grid energy supply system at the beginning of this time slot. Assume that in the nth time slot, all the energy that the energy collection and supply system can return has an upper limit of Since this system is a borrowing and returning system, that is, borrowing energy first and then returning energy, so needs to be greater than 0.

[0015]

[0016] To ensure the interests of the traditional power grid energy supply system, before the data transmission deadline, the energy harvesting energy supply system needs to return all the borrowed energy. In the last time slot (the Nth time slot), it satisfies:

[0017]

[0018] Fully considering the instability of the harvested energy, assume that in the nth time slot, the channel changes between different time slots are independent of each other, and the channel link gain G k (d0) is a constant; σ represents the background noise received by the base station within the bandwidth range, which is usually regarded as Gaussian white noise. The transmission rate in the nth time slot is:

[0019]

[0020] Since the connections between underwater nodes are independent of each other, the user connection index λ is introduced k :

[0021]

[0022] Based on the user connection index, the following constraints are imposed on the transmission rate:

[0023]

[0024] v k represents the minimum rate requirement for each node.

[0025] For each time slot, the energy available for data transmission cannot exceed the energy in the energy storage battery at the transmitter. Define the energy causality constraint:

[0026]

[0027] where Ψ is the energy parameter, is the energy consumption of the energy harvesting energy supply system from the traditional power grid energy supply system, and the user connection index λ k ={0,1} is discrete and difficult to solve. To solve this problem, the node constraint is relaxed, and the node constraint is replaced by 0 ≤ λ k ≤ 1. Thus, the optimization model of the resource allocation method for maximizing the throughput of the UWSN communication system is:

[0028]

[0029]

[0030] The last constraint in the formula means that the allocated power needs to be greater than or equal to zero.

[0031] Maximized Resource Allocation Method Based on Improved Stochastic Gradient Descent

[0032] The Gradient Descent (GD) algorithm is a typical method for solving unconstrained optimization problems. Its main idea is to seek the optimal solution of the objective in the direction of the negative gradient. It has been widely used due to its simplicity, fast convergence speed, and reliable effect. As a type of gradient descent algorithm, the Stochastic Gradient Descent (SGD) algorithm does not need to traverse all data in each iteration. Instead, it randomly selects a sample to calculate the gradient and iteratively updates the weight vector, greatly reducing the computational amount. It is more suitable for the resource allocation method of the UWSN system with instability and large-scale data classification. The stochastic gradient descent algorithm avoids the direction search process of calculating the sample mean expectation in the gradient algorithm and calculates its corresponding gradient:

[0033] θ t+1 = θ t + Δθ t

[0034]

[0035] In the formula, η is the learning rate of the algorithm, representing the step size of moving towards the global optimum or local optimum; L(θ t ) is the loss function of the weight θ at the t-th iteration, t , is the first-order gradient of the weight θ with respect to the loss function at time t, briefly denoted as g t , θ t+1 is the weight value at time t + 1, θ t is the weight value at time t, Δθ t is the gradient operator, that is, the updated part of each iteration.

[0036] Specific steps of the resource allocation method based on improved stochastic gradient descent:

[0037] Step 1: Initialization: Let t = 1, n = 0,

[0038] Step 2: Construct the hypothesis function h θ(x) ;

[0039] Step 3: Further construct the penalty function L(θ);

[0040] Step 4: Solve the gradient vector of the penalty function of the sample point x k of the penalty function

[0041] Step 5: When updating the weight parameters, retain the previous update direction and fine-tune the final update direction using the current data gradient. Increment the iteration count t = t + 1 and find the optimal solution using the gradient vector.

[0042] Compared with the prior art, the present invention has the following advantages:

[0043] 1. Aiming at the more obvious instability of the energy harvesting system in the UWSN system, the present invention adopts the multi-homing technology for the UWSN system. Under the energy borrowing and lending mechanism, with the goal of maximizing the throughput of the communication system, a resource allocation method suitable for energy borrowing and lending and data transmission arrangement is proposed. To better adapt to the actual network situation, the model considers constraints such as rate constraints, power constraints, and energy repayment.

[0044] 2. Based on the advantages of the gradient descent algorithm, such as simplicity, fast convergence speed, and reliable effect, the improved stochastic gradient descent algorithm does not need to traverse all data in each iteration process. It only randomly selects a sample to calculate the gradient and performs iterative updates of the weight vector.

[0045] And the momentum factor ρ is used to ensure the optimality of the step size, which greatly reduces the computational amount and is more suitable for the resource allocation method of the UWSN system with instability and large-scale data. The convergence and numerical simulation results prove that the method of the present invention effectively reduces the node energy consumption and improves the throughput and network service quality of the UWSN system. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 : Schematic diagram of the network average rate convergence corresponding to the underwater wireless sensor network resource allocation method in different iteration count environments of the present invention;

[0047] Figure 2 : Schematic diagram of the network average rate corresponding to the underwater wireless sensor network resource allocation method in different user number environments of the present invention;

[0048] Figure 3 : Schematic diagram of the network energy consumption convergence corresponding to the underwater wireless sensor network resource allocation method in different iteration count environments of the present invention;

[0049] Figure 4 : Schematic diagram of the network energy consumption corresponding to the underwater wireless sensor network resource allocation method in different user number environments of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. This embodiment is based on the underwater wireless sensor network resource allocation method based on improved stochastic gradient descent and is implemented through the following technical solutions:

[0051] Establish an optimization model for maximum throughput resource allocation:

[0052] Basic assumptions:

[0053] 1. Assume that the channel gain remains unchanged in two cases: when the node is stationary and when the time for the node to move a unit distance is much greater than the connection time between the base station and the node.

[0054] 2. To prevent interference between base stations, the base stations need to be assigned to different nodes. Assume that each node is connected to only one base station at time n.

[0055] The present invention mainly aims at maximizing the throughput of the UWSN communication system before the deadline under the energy borrowing and lending mechanism, and proposes a resource allocation method applicable to energy borrowing and lending and data transmission arrangement. Assume that the UWSN communication system is equipped with an energy storage battery at the sending end, and the energy used for data transmission comes from the energy storage battery. The newly collected energy and the energy obtained from the traditional power grid energy supply system are stored in the energy storage battery. The sending end obtains energy from the energy storage battery for transmission, and the energy obtained from the traditional power grid also needs to pass through the energy storage battery before it can be sent to make up for the need for data transmission when the energy collection is insufficient. To avoid burdening the traditional power grid, the sending end returns the energy borrowed from the traditional power grid before the transmission deadline, and needs to return additional energy as interest for borrowing energy from the traditional power grid according to a certain interest rate. The energy collection and supply system borrows energy from the traditional power grid system, so the energy loss during the borrowing and returning process is also borne by the energy collection and supply system, so as to ensure that both parties are in a win-win state as much as possible.

[0056] The present invention uses a time-slot cyclic transmission to transmit the data packets required by the communication system, and takes N time-slots as a time-slot cycle. For the data packets transmitted by the underwater wireless communication system, denotes the transmission power of node k in the nth time-slot. To avoid wasting energy as much as possible, its constraint condition is:

[0057]

[0058] where the total number of nodes is K, and P max,k denotes the maximum power of node k.

[0059] At the beginning of each cyclic time-slot, the data packets accumulated in the previous time-slot are uniformly transmitted. is the energy collected at the beginning of the nth time-slot, is the energy borrowed by the energy collection and supply system from the traditional power grid energy supply system at the beginning of this time-slot. Assume that in the nth time-slot, all the energy that the energy collection and supply system can return Since this system is a borrowing and returning system, that is, it borrows energy first and then returns it, so it needs to be greater than 0. It needs to satisfy:

[0060]

[0061] To ensure the interests of the traditional power grid energy supply system, before the data transmission deadline, the energy harvesting and supply system needs to return all the borrowed energy. At the last time slot (the Nth time slot), it satisfies:

[0062]

[0063] Fully considering the instability of the harvested energy, assuming that in the nth time slot, the channel changes between different time slots are independent of each other, and the channel link gain G k (d0) between the transmitter and the receiver is a constant; σ represents the background noise received by the base station within the bandwidth range, which is usually regarded as Gaussian white noise. The transmission rate in the nth time slot is:

[0064]

[0065] Since the connections between underwater nodes are independent of each other, the user connection index λ is introduced k :

[0066]

[0067] Based on the user connection index, the following constraints are imposed on the transmission rate:

[0068]

[0069] ν k represents the minimum rate requirement for each node.

[0070] The total throughput of the UWSN communication system at the deadline is:

[0071]

[0072] where M is the total number of channels.

[0073] For each time slot, the energy available for data transmission cannot exceed the energy in the storage battery of the transmitter. Define the energy causality constraint:

[0074]

[0075] where Ψ is the energy parameter, is the energy consumption of the energy harvesting and supply system from the traditional power grid energy supply system, and the user connection index λ k={0, 1} is discrete and difficult to solve. To address this issue, the node constraints are relaxed, and the node constraints are replaced with 0 ≤ λ k ≤ 1. Thus, the optimization model for the resource allocation method to maximize the throughput of the UWSN communication system is as follows:

[0076]

[0077] The last constraint in the formula indicates that the allocated power needs to be greater than or equal to zero.

[0078] Resource Allocation Method Based on Improved Stochastic Gradient Descent

[0079] The Gradient Descent (GD) algorithm is a typical method for solving unconstrained optimization problems. The main idea is to seek the optimal solution of the objective in the direction of the negative gradient. It has been widely used due to its simplicity, fast convergence speed, and reliable effect. As a variant of the gradient descent algorithm, the Stochastic Gradient Descent (SGD) algorithm does not need to traverse all data in each iteration. Instead, it randomly selects a sample to calculate the gradient and iteratively updates the weight vector. Therefore, it greatly reduces the computational complexity and is more suitable for the resource allocation method of the UWSN system with instability and large-scale data classification. The stochastic gradient descent algorithm avoids the direction search process of calculating the sample mean expectation in the gradient algorithm and calculates its corresponding gradient:

[0080] θ t+1 = θ t + Δθ t

[0081]

[0082] In the formula, η is the learning rate of the algorithm, representing the step size of moving towards the global optimum or local optimum; L(θ t ) is the loss function of the weight θ at the t-th iteration, t , is the first-order gradient of the weight θ with respect to the loss function at time t, briefly denoted as g t , θ t+1 is the weight value at time t + 1, θ t is the weight value at time t, and Δθ t is the gradient operator, that is, the updated part of each iteration.

[0083] Specific steps of the resource allocation method based on improved stochastic gradient descent:

[0084] Step 1: Initialization: Let t = 1, n = 0,

[0085] Step 2: Construct the hypothesis function h θ(x) (where θ is the function parameter), by evaluating the goodness of the model fit, construct the hypothesis function, that is, the function that fits the sample features to the target function in supervised learning;

[0086] Step 3: Further construct the penalty function L(θ), and further construct the penalty function, which is usually used to measure the degree of fit:

[0087] Hypothesis:

[0088]

[0089] Construct the penalty function according to the optimization model of the UWSN communication system throughput maximization resource allocation method in the previous part

[0090] L(θ):

[0091]

[0092] Step 4: Solve the sample point x according to the model penalty function L(θ) k The gradient vector of the penalty function

[0093]

[0094] Initialize the parameter θ of the hypothesis function to obtain the corresponding gradient vector. And randomly assign values to θ, assume θ i All take 0 for the first time, and substitute θ 0 into L(θ) 1 , and obtain the loss when taking θ 0 Substitute θ into 0 to obtain the gradient vector of θ 0

[0095] Step 5: Through the accumulation of the number of iterations, use the gradient vector to find the optimal solution. The step size of the stochastic gradient descent method greatly affects the convergence of the algorithm. The present invention improves the stochastic gradient descent method. When updating the weight parameters, retain the previous update direction and fine-tune the final update direction using the current data gradient. The update formula is as follows:

[0096] Δθ t = ρΔθ t-1 - ηg t

[0097] θ t = θ t-1 + Δθ t

[0098] t = t + 1​​

[0099] Where ρ is the momentum factor, representing the degree of retention of the original update direction, with a value range between 0 and 1. In the initial stage of iteration, the algorithm uses the same direction as the descent direction, which can accelerate learning well; in the middle and late stages of iteration, the penalty function value oscillates back and forth near the local optimal value, but due to the momentum factor ρ increasing the update amplitude, it can jump out of the local optimal point; when the gradient direction changes, the momentum factor can reduce the update. The momentum term accelerates the gradient descent in the relevant direction, suppresses oscillations, and speeds up the convergence speed to obtain the global optimal solution

[0100] Convergence Analysis of Optimization Methods

[0101] In the present invention, each node k corresponds to the optimization variable n of the original problem, denoted as n k ∈R k , and its value at the t-th iteration is denoted as Write all the objective variables in the form of a centralized objective function:

[0102]

[0103] Where

[0104]

[0105] The gradient of f(n) is defined as:

[0106]

[0107] n and The k-th row of are both related to node k. n is called consistent if all its row vectors are equal, that is, n1 = n2 =... n m .

[0108] For convenience, assume m = 1, so that n and are both degenerate vectors, without loss of generality. Assume n * is a solution to the original problem, and define:

[0109] n * = 1(n * ) T

[0110] Definition 1: The function f: R m×k →R is a convex function. For all (x, y) ∈ R m×k and λ ∈ [0, 1], there is:

[0111] λf(x) + (1 - λ)f(y) ≥ f(λx + (1 - λ)y)

[0112] According to the Taylor expansion, a convex function has a lower bound on the hyperplane of its tangent line.

[0113] Lemma 1: The function f:R m×k →R is a convex function. For all (x, y) ∈ R m×k and λ ∈ [0, 1], we have:

[0114]

[0115] Through Lemma 1, for the first-order derivative, we can obtain

[0116]

[0117] where j ∈ K, j ≠ k.

[0118] With the update rule of AEDR - ADAM, we can obtain

[0119]

[0120] β k is a hyperparameter with a supremum β, that is, β k ≤ β ∈ [0, 1], and

[0121]

[0122] According to the inequality then we have:

[0123]

[0124] Therefore, according to the above assumptions, by integrating the gradients in all dimensions k ∈ 1, 2,..., K, a convergence bound can be obtained. In summary, it can be seen that the optimization method proposed in this paper has good convergence.

[0125] Numerical Simulation

[0126] To verify the effectiveness of the method of the present invention, a simulation experiment is carried out on the underwater wireless sensor resource allocation optimization method based on improved stochastic gradient descent proposed in the present invention. It is considered that sensor users are randomly and uniformly distributed in a 150m × 150m × 150m underwater three-dimensional monitoring area, the node sensing radius is 25m, the communication radius is 15m, the maximum moving step is 30m, the initial energy of the node is 5J, and the maximum power is 3mW.

[0127] Average Rate Comparison

[0128] The average rate is an important indicator to measure the system performance. The system average rates corresponding to the gradient descent method, the stochastic gradient descent method, and the improved stochastic gradient descent method proposed in the present invention are compared. Figure 1The average rate images of different methods at different iteration times are given, and the number of users is set to 20. Figure 2 They are the average rate images of different methods at different numbers of users. It can be seen from these two figures that the improved stochastic gradient descent method proposed in the present invention has good convergence. This is because the method in the present invention does not need to traverse all data in each iteration process, but only randomly selects a sample to calculate the gradient and perform iterative update of the weight vector. It is more effective than the gradient descent method and the stochastic gradient descent method, improving the calculation efficiency and the optimization ability of the algorithm.

[0129] Energy consumption performance comparison

[0130] To further verify the effectiveness of the method proposed in the present invention, the energy consumption of the gradient descent method, the stochastic gradient descent method, and the improved stochastic gradient descent method proposed in the present invention is compared, as Figure 3 、 Figure 4 shown. Figure 3 The energy consumption obtained by different methods at different iteration times is given. It can be seen from the figure that as the iteration times increase, the network survival time extends and the energy consumption gradually decreases. Figure 4 The network energy consumption corresponding to different numbers of users under different methods is given. It can be seen from these two figures that the method proposed in the present invention uses the momentum factor to ensure the optimality of the step size, making the proposed resource allocation optimization method have better performance, reducing the calculation amount of the method and the energy consumption of the underwater sensor network.

Claims

1. A resource allocation method for underwater wireless sensor networks based on stochastic gradient descent, characterized in that, It includes the following steps: Step 1: Considering the actual network rate constraint, power constraint, and energy return constraint, for the underwater wireless sensor network (UWSN), adopt the multi-homing technology. In the case of the energy borrowing and returning mechanism, aiming at maximizing the throughput of the communication system, give the technical means for optimizing the resource allocation of the underwater sensor network applicable to energy borrowing / returning and data transmission arrangement. This step specifically includes: The transmission data packets required by the time slot cyclic transmission communication system are transmitted, and one time slot cycle is N time slots; for the data packets transmitted by the underwater wireless sensor communication system, P πk (n) represents the transmission power of node k in the nth time slot. In order to avoid energy waste as much as possible, its constraint condition is: where the total number of nodes is K, and P max,k represents the maximum power of node k; At the beginning of each cycle time slot, the data packets accumulated in the previous time slot are uniformly transmitted; is the energy collected at the beginning of the nth time slot, is the energy borrowed by the energy harvesting power supply system from the traditional power grid power supply system at the beginning of this time slot; assuming that in the nth time slot, all the energy that the energy harvesting power supply system can repay has an upper limit of Since this system is a borrowing and repayment system, that is, borrowing energy first and then repaying energy, so needs to be greater than 0; To ensure the interests of the traditional power grid power supply system, before the data transmission deadline, the energy harvesting power supply system needs to return all the borrowed energy; at the last time slot (the Nth time slot), it satisfies: It is necessary to satisfy: Fully considering the instability of the collected energy, it is assumed that in the nth time slot, the channel changes between different time slots are independent of each other, and the channel link gain G k (d0) is a constant; σ represents the background noise received by the base station within the bandwidth range, which is usually regarded as Gaussian white noise; the transmission rate in the nth time slot is: where m represents the time slot; Since the connections between underwater nodes are independent of each other, the user connection index λ is introduced k : Based on the user connection index, the following constraint is imposed on the transmission rate: ν k represents the minimum rate requirement for each node; The total throughput of the UWSN communication system at the deadline is: where M is the total number of channels; For each time slot, the energy used to transmit data cannot exceed the energy in the energy storage battery at the transmitter, and the energy causality constraint is defined as: where Ψ is the energy parameter, is the energy consumption collected by the energy harvesting power supply system from the traditional power grid power supply system, and the user connection index λ k ={0, 1} is discrete and difficult to solve. To solve this problem, the node constraints are relaxed, and the node constraints are replaced by 0 ≤ λ k ≤ 1. Thus, the optimization model of the resource allocation method for maximizing the throughput of the UWSN communication system is as follows: where (1) represents the optimized objective function, (2)-(8) represent the constraints, and (8) indicates that the allocated power needs to be greater than or equal to zero; Step 2: The proposed improved stochastic gradient descent method does not need to traverse all data in each iteration process. It only randomly selects a sample to calculate the gradient and performs iterative update of the weight vector. This step specifically includes: The improved stochastic gradient descent algorithm avoids the direction search process of calculating the sample mean expectation in the gradient descent algorithm, and calculates its corresponding gradient: θ t+1 = θ t + Δθ t where η is the learning rate of the algorithm, representing the step size for moving towards the global or local optimum; L(θ t ) is the loss function of the weight θ t at the t-th iteration, is the first-order gradient of the weight θ with respect to the loss function at time t, simply denoted as g t , θ t+1 is the weight value at time t + 1, θ t is the weight value at time t, Δθ t is the gradient operator, that is, the updated part for each iteration; Step 3: Apply the improved stochastic gradient descent method to the underwater wireless sensor network resource allocation problem. This step specifically includes: Specific steps of the resource allocation method based on the improved stochastic gradient descent: Step 1: Initialization: t = 1, n = 0, where t is the time; Step 2: Construct the hypothesis function h θ (x), where θ is the function parameter. By evaluating the goodness of fit of the model, construct the hypothesis function, that is, the function that fits the sample features to the target function in supervised learning; Step 3: Furthermore, construct the penalty function L(θ), which is usually used to measure the degree of fitting: Assume: where m represents the time slot. According to the optimization model of the UWSN communication system throughput maximization resource allocation method in the previous part, construct the penalty function L(θ): Step 4: Solve for the sample point x according to the model penalty function L(θ) k Gradient vector of the penalty function Where x represents the sample and k is the node; initialize the parameters θ of the hypothesis function to obtain the corresponding gradient vector; and randomly assign values to θ. Assume that θ i is all set to 0 for the first time, and substitute θ 0 into L(θ) 1 to obtain the loss when taking θ 0 Substitute θ into 0 to obtain the gradient vector of θ when taking θ 0 ​ Step 5: Through the accumulation of the number of iterations, use the gradient vector to find the optimal solution; the step size of the stochastic descent gradient method greatly affects the convergence of the algorithm. Improve the stochastic gradient descent method; retain the previous update direction when updating the weight parameter, and use the current data gradient to fine-tune the final update direction; the update formula is as follows: Δθ t = ρΔθ t-1 - ηg t θ t = θ t-1 + Δθ t-1 t = t + 1 Among them, ρ is the momentum factor, which represents the degree of retention of the original update direction, and its value range is between 0 and 1; in the initial iteration stage of the optimization process, the algorithm follows the negative gradient direction to update parameters, and this strategy effectively improves the convergence rate of the objective function; in the middle and late stages of iteration, the penalty function value oscillates back and forth near the local optimal value, but because the momentum factor ρ increases the update amplitude, it can jump out of the local optimal point; when the gradient direction changes, the momentum factor can reduce the update; the momentum term accelerates the gradient descent in the relevant direction, suppresses the oscillation, speeds up the convergence speed, and obtains the global optimal solution