Ocean time series data prediction method and system based on improved particle swarm optimization algorithm
By using nonlinear dynamic weights and adaptive weight factors in the particle swarm optimization algorithm, combined with diversity measures, the problems of premature maturity and slow convergence of traditional algorithms in ocean sensor data prediction are solved, and more efficient ocean sensor data prediction is achieved. performance.
Patent Information
- Application Number
- CN202410309464.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-03-19
AI Technical Summary
The traditional particle swarm optimization algorithm is prone to premature maturity and slow convergence in ocean sensor data prediction, and it is difficult to find a balance between global and local search, resulting in limited prediction performance on different ocean sensor data sets.
Use nonlinear dynamic weights to replace fixed weights, and introduce adaptive weight factors. Set larger weights in the early stage to promote global search, and adjust them to smaller weights in the later stage to improve local search capabilities. At the same time, the particle distribution range is adjusted through diversity measures to maintain the stability of the population particles. Diversity to prevent premature convergence.
The optimization ability and robustness of the algorithm in ocean sensor data prediction are improved, the adaptability to different data sets is enhanced, and the prediction accuracy and efficiency are significantly improved.
Smart Images

Figure CN117910329B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for predicting ocean time series data based on an improved particle swarm optimization algorithm. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] The performance of the Gated Recurrent Unit (GRU) network algorithm in the time series prediction task of processing ocean sensor data depends largely on the selection of various hyperparameters, including the number of network layers, the number of neurons per layer, the learning rate, etc. Therefore, for GRU to accurately predict different ocean sensor datasets, the selection of hyperparameters becomes crucial. However, for non-domain experts, screening out appropriate hyperparameters can be a difficult and time-consuming task.
[0004] In order to solve the problem of a large number of parameter adjustments when processing different ocean sensor time series data sets, it is possible to consider combining the prediction algorithm with the hyperparameter optimization algorithm. Among them, particle swarm optimization (PSO) is an effective method that can automate the hyperparameter adjustment process, find the best network structure and learning parameters, and thus significantly improve the prediction performance of GRU. By using PSO, the difficulty of the parameter adjustment process can be effectively alleviated, so that even non-expert users can more easily apply the GRU algorithm to different ocean sensor data sets and achieve more accurate prediction results. This combined method provides a feasible solution for improving the efficiency and accuracy of ocean sensor data processing.
[0005] Different ocean sensor datasets have different characteristics. For example, chlorophyll datasets usually show seasonal changes, and the fluctuations within the same day are also large. The water temperature dataset also shows seasonal changes, but the fluctuations within the same day are not as strong as those of the chlorophyll dataset. This leads to the characteristics of high complexity, uncertainty, and diversity of ocean sensor datasets. Therefore, when the prediction model predicts different ocean sensor datasets, the required hyperparameter distribution range is also different. In the process of finding the optimal solution, the traditional particle swarm algorithm is prone to premature convergence and slow convergence due to the use of fixed weights, which leads to certain limitations on the algorithm's search ability at different stages. Summary of the invention
[0006] In order to solve the technical problems of premature convergence, slow convergence and insufficient exploration of search space in the traditional particle swarm optimization algorithm when predicting ocean scenes with ocean sensor data, the present invention provides a method and system for predicting ocean time series data based on an improved particle swarm optimization algorithm. The present invention changes fixed weights to nonlinear dynamic weights, sets larger weights in the early stage to promote global search, and uses smaller weights in the later stage to improve local search capabilities. This dynamic adjustment helps to find a better balance between global exploration and local fine adjustment.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A first aspect of the present invention provides an ocean time series data prediction method based on an improved particle swarm optimization algorithm.
[0009] The ocean time series data prediction method based on the improved particle swarm optimization algorithm includes:
[0010] Obtain ocean sensor sample data, use the improved particle swarm optimization algorithm to optimize the hyperparameters of the prediction model, obtain the optimal hyperparameters, and thus obtain the trained prediction model;
[0011] Obtain the ocean sensor data to be predicted, and use the trained prediction model to obtain the prediction results;
[0012] The improved particle swarm optimization algorithm includes: replacing the fixed inertia weight with a nonlinear dynamic weight, and introducing an adaptive weight factor into the nonlinear dynamic weight.
[0013] Furthermore, the nonlinear dynamic weight is calculated using the following formula:
[0014] ;
[0015] in, is the nonlinear dynamic weight, and They are The maximum and minimum values of ; is the current generation number; is the maximum number of iterations.
[0016] Furthermore, the introduction of the adaptive weight factor into the nonlinear dynamic weight adopts the following formula:
[0017] ;
[0018] in, is the nonlinear dynamic weight, is the improvement of the global optimal fitness, is the coefficient for adjusting the adaptive strength, Depends on whether the global best fitness improves and whether the diversity metric exceeds a threshold.
[0019] Furthermore, the improved particle swarm optimization algorithm also includes: improving the size of population particles by using diversity metrics, including: calculating the particle spacing, calculating the average distance between all particles based on the particle spacing, and adjusting the distribution range of particles based on whether the average distance exceeds a threshold.
[0020] Furthermore, the process of adjusting the distribution range of particles according to whether the average distance exceeds a threshold value includes: if the average distance exceeds the threshold value, expanding the distribution range of particles by automatically adjusting the nonlinear dynamic weight.
[0021] Furthermore, the average distance is calculated using the following formula:
[0022] ;
[0023] in, is the interparticle distance, N is the total number of particles, is the number of combinations of any two particles selected from N.
[0024] Furthermore, the prediction model adopts a GRU model.
[0025] The second aspect of the present invention provides an ocean time series data prediction system based on an improved particle swarm optimization algorithm.
[0026] The ocean time series data prediction system based on the improved particle swarm optimization algorithm includes:
[0027] A training module is configured to: obtain ocean sensor sample data, optimize the hyperparameters of the prediction model using an improved particle swarm optimization algorithm, obtain the optimal hyperparameters, and thereby obtain a trained prediction model;
[0028] A prediction module is configured to: obtain ocean sensor data to be predicted, and use a trained prediction model to obtain a prediction result;
[0029] The improved particle swarm optimization algorithm includes: replacing the fixed inertia weight with a nonlinear dynamic weight, and introducing an adaptive weight factor into the nonlinear dynamic weight.
[0030] A third aspect of the present invention provides a computer-readable storage medium.
[0031] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the ocean time series data prediction method based on an improved particle swarm optimization algorithm as described in the first aspect above.
[0032] A fourth aspect of the present invention provides a computer device.
[0033] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the method for predicting ocean time series data based on an improved particle swarm optimization algorithm as described in the first aspect above are implemented.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] The present invention changes fixed weights into nonlinear dynamic weights, sets larger weights in the early stage to promote global search, and uses smaller weights in the later stage to improve local search capabilities. This dynamic adjustment helps to find a better balance between global exploration and local fine-tuning. On this basis, in the case of different ocean sensor time series data, in order to make the algorithm more capable of optimizing, an adaptive weight factor is added to allow the algorithm to automatically adjust the inertia weight according to the fitness function feedback in the current search process. For example, if the algorithm shows a rapid convergence trend, the weight can be reduced accordingly to avoid premature convergence. On the contrary, if the algorithm progresses slowly, increasing the weight can stimulate a wider search and improve the convergence accuracy and speed.
[0036] The present invention is not aimed at a single ocean sensor time series data set, so the optimization problem is dynamically changing. Maintaining the diversity of population particles can make the algorithm better adapt to different data sets, because diverse population particles have a greater probability of containing particles that adapt to new environments. In order to make the particles richer, the present invention proposes a diversity metric to improve the population particles. It aims to maintain the diversity of population particles and reduce the probability of particle assimilation during the search process. High diversity means that the population has more potential solutions, which can effectively prevent the algorithm from converging to the local optimal solution too early, thereby enhancing the global optimization ability of the algorithm and effectively increasing the robustness of the algorithm.
[0037] Aiming at the scenario of ocean sensor data prediction, the present invention proposes an improved PSO-GRU combined model prediction architecture. By establishing a gated recurrent unit network algorithm (GRU) to process and train ocean sensor data, and combining the particle swarm algorithm to optimize the learning rate and the number of hidden layer neurons, it has a good prediction effect on various ocean sensor data. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0039] Figure 1It is a flow chart of the ocean time series data prediction method based on the improved particle swarm optimization algorithm shown in the present invention;
[0040] Figure 2 It is a GRU network structure diagram shown in the present invention;
[0041] Figure 3 It is a parameter adjustment flowchart of the GRU model shown in the present invention. DETAILED DESCRIPTION
[0042] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0043] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0044] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0045] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0046] Terminology explanation:
[0047] 1. Particle Swarm Optimization Algorithm: Particle Swarm Optimization (PSO) algorithm is used to follow the currently searched optimal value to find the global optimal solution. It has the advantages of simple structure, high accuracy, fast convergence speed, and the ability to solve nonlinear and multivariable problems.
[0048] 2. Hyperparameter optimization: Hyperparameter optimization refers to the process of automatically or manually adjusting model parameters to achieve optimal performance during machine learning model training.
[0049] 3. Time series forecasting: Based on historical trends, cycles, seasonality and other characteristics, future data is forecasted to help people make more accurate decisions. Common time series forecasting methods include ARIMA and SARIMA models based on statistics, LSTM and GRU models based on neural networks, etc. These methods can handle different types of time series data and greatly improve the accuracy and stability of time series forecasting.
[0050] Embodiment 1
[0051] like Figure 1 As shown, this embodiment provides an ocean time series data prediction method based on an improved particle swarm optimization algorithm. This embodiment uses the method applied to a server as an example. It can be understood that the method can also be applied to a terminal, and can also be applied to a terminal, a server, and a system, and is implemented through the interaction between the terminal and the server. The server can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communications, middleware services, domain name services, security services CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application. In this embodiment, the method includes the following steps:
[0052] Obtain ocean sensor sample data, use the improved particle swarm optimization algorithm to optimize the hyperparameters of the prediction model, obtain the optimal hyperparameters, and thus obtain the trained prediction model;
[0053] Obtain the ocean sensor data to be predicted, and use the trained prediction model to obtain the prediction results;
[0054] The improved particle swarm optimization algorithm includes: replacing the fixed inertia weight with a nonlinear dynamic weight, and introducing an adaptive weight factor into the nonlinear dynamic weight.
[0055] The present invention provides an improved ANDPSO-GRU combination model, including a hyperparameter tuning stage based on the improved PSO and a process for executing the ocean sensor time series data prediction process. 1) Hyperparameter stage: First, initialize the improved PSO algorithm, set the population size, number of iterations, learning factor, maximum and minimum inertia weights, strength values of the adaptive weight factor, and threshold values of the population particle diversity of the parameters to be optimized. According to the hyperparameters after tuning and screening, update the prediction model, and finally obtain the optimal prediction model hyperparameters. 2) Prediction stage: In this stage, preprocessing operations are performed on different ocean data sensor data sets. At the same time, the prediction model is initialized using the optimal hyperparameter combination output in the previous stage, and finally the predicted value of the ocean sensor data is output.
[0056] The technical solution of this embodiment is described in detail below with reference to the accompanying drawings:
[0057] 1. In the hyperparameter tuning stage, the following steps are included:
[0058] Step 1: Initialize the improved PSO algorithm, set the population size, number of iterations, learning factor, maximum and minimum inertia weights, strength value of the adaptive weight factor and the threshold of population particle diversity to determine the parameters to be optimized.
[0059] Step 2: Initialize the position of the particles. Randomly generate a population of particles , where h is the number of neurons in the hidden layer and m is the learning rate of the GRU network.
[0060] Step 3: According to PSO calculation formulas (1) and (2), it can be seen that weight is an important factor affecting particle speed and position. The present invention introduces nonlinear dynamic weights to replace the original fixed inertia weights. By improving the weights to achieve dynamic changes, the algorithm with weaker optimization ability can quickly search for the global optimal solution in the early stage, and increase the search for local optimal solutions in the later stage. This dynamic adjustment helps to strike a balance between exploring the global solution and refining the current optimal solution. The dynamic weight transformation is rewritten as formula (3). According to the updated weights, the algorithm automatically updates the position and speed of the particles.
[0061] ; (1)
[0062] ; (2)
[0063] ; (3)
[0064] in, and They are The maximum and minimum values of ; is the current generation number; is the maximum number of iterations.
[0065] Improved inertia weight change curve, when t is small, Close to ,and The rate of decrease is also slow, which helps the algorithm improve its global search capability; as Increase, decreases nonlinearly, and The decreasing speed of gradually increases, which helps to improve the local search ability of the algorithm. The dynamically updated weights are passed into the particle speed and position update mechanism, realizing the function of dynamic adjustment of particles.
[0066] Step 4: The present invention proposes to add an adaptive weight factor to the nonlinear dynamic weight to ensure that the algorithm does not fall into the local optimal solution. Through the feedback of the fitness function, the change of the inertia weight is further controlled to encourage particles to explore a wider area and avoid the local optimal solution. The calculation formula of the adaptive weight is:
[0067] ; (4)
[0068] in, is the improvement of the global optimal fitness, is the coefficient for adjusting the adaptive strength, It depends on whether the global best fitness is improved and whether the diversity exceeds the threshold. The adaptive weight mechanism first adjusts the inertia weight of each particle based on a nonlinear weight formula. , and then the local weight of the PSO algorithm is affected according to the current performance of the optimized algorithm. This weight changes nonlinearly with the number of iterations and the performance of the optimized algorithm, thus affecting the speed and direction of the particles.
[0069] Step 5: Increase the diversity of population particles. During the prediction model optimization process, the hyperparameter combinations corresponding to different ocean sensor data sets are distributed in different spaces. The fixed population space is not suitable for ocean sensor data sets with high complexity, uncertainty and diverse types, such as chlorophyll, surface water temperature, salinity, wave height, etc. The present invention proposes a diversity metric to improve the size of population particles. This solves the problem of insufficient exploration of traditional particle swarm algorithms when different hyperparameters are distributed in spaces with a long distance. Diversity is measured by calculating the average distance between all particles in the particle swarm. The calculation formula here can be decomposed into two main parts: calculating the distance between particles and calculating the average of these distances. For each pair of particles in the particle swarm and , calculate the Euclidean distance between them. The formula is:
[0070] ; (5)
[0071] in, is the dimension of the solution space, and Particles and In the Dimensional location.
[0072] Add up the distances between all particle pairs and divide by the total number of particle pairs to get the average distance. The formula is:
[0073] ; (6)
[0074] in, is the total number of particles, is from The number of combinations of any two particles. When the average distance is greater than the threshold, the algorithm automatically adjusts the weight to expand the distribution range of the particles. Maintaining the diversity of the population particles reduces the probability of particles assimilated during the search process. High diversity means that the population has more potential solutions, which can effectively prevent the algorithm from converging to the local optimal solution too early, thereby enhancing the algorithm's global optimization ability and effectively increasing the robustness of the algorithm.
[0075] Step 6: The algorithm automatically optimizes and iterates, and finally outputs the hyperparameter combination with the best performance based on the return value of the fitness function.
[0076] 2. Constructing the improved forecast combination model ANDPSO-GRU
[0077] As a variant of LSTM, the GRU model only retains the reset gate and the update gate. Therefore, the training parameters of the GRU model are reduced, the computational complexity is low, and the training efficiency is improved. Figure 2 shown.
[0078] The role of the hidden layer in the GRU model is to abstract the information of the input sequence for better linear division. The number of neurons in the hidden layer corresponds to the model's ability to perform linear division. An appropriate number of neurons can improve the model's expressiveness, but too many neurons may lead to a complex model structure, increase computational costs, and easily overfit. In order to solve the above problems and match the model network structure with the characteristics of ocean sensor data, the present invention constructs a particle swarm optimizer (ANDPSO) with self-adaptation, dynamic weight changes, and increased population particle diversity, and combines it with the GRU model to construct a new ocean sensor data prediction model (ANDPSO-GRU). This model uses the number of hidden layer neurons and learning rate, which have an important influence on the prediction effect of the GRU model, as optimization objects.
[0079] The optimization of the GRU model is the core of the prediction model construction. Figure 3 This is the parameter adjustment process of the GRU model. The model is trained through sample data, and the hyperparameters are optimized in this process. The algorithm flow is as follows, and the system workflow diagram is as follows Figure 1 :
[0080] (1) Preprocessing of ocean sensor sample data: First, detect outliers and discard them, fill in missing values and sort them; then, normalize the data set to avoid the GRU network being sensitive to the scale of the input data and improve prediction accuracy.
[0081] (2) Initialize ANDPSO parameters. Determine the population size, number of iterations, learning factor, maximum and minimum inertia weights, strength values of the adaptive weight factor, and the threshold of population particle diversity of the parameters to be optimized.
[0082] (3) Initialize the particle position. Randomly generate a population of particles , where h is the number of neurons in the hidden layer and m is the learning rate of the GRU network.
[0083] (4) The hyperparameter combination generated by ANDPSO is passed into the GRU model. After the GRU model accepts the new hyperparameter combination, it reinitializes the model for training. Its forward propagation internal structure performs the following processing, which is expressed as follows:
[0084]
[0085]
[0086] ; (7)
[0087]
[0088]
[0089] In formula (7) and Represents the update gate and reset gate respectively. The update gate controls the state of the previous moment and the current node input Affects the current hidden state Reset gate control and Impact reset candidate set Among them, the weight vector By hidden state weight and input variable weights In addition, is the output weight, It is the output at the current moment and also the input at the next moment.
[0090] Output predictions: After processing the entire ocean sensor sequence, the final hidden state can be used to generate predictions for future values.
[0091] (4) Calculate the fitness value of the particle according to the fitness function. Construct the GRU network model through the hyperparameters corresponding to the particle, and use the training data to enter the model for training. Make predictions through the validation data, and obtain the MSE of the prediction results as the fitness value.
[0092] (5) According to the fitness value feedback, the participation of the dynamically changing inertia weight and adaptive weight factor, as well as the appropriate increase in the diversity of the population particles, determine the optimal value of the particle, and update the particle position information through equations (1) to (6). During the iteration process, the particle position is continuously updated to the maximum number of iterations, and the optimized hyperparameter value is output.
[0093] (6) After ANDPSO is completed, the optimal hyperparameters are used to build an ocean sensor time series prediction model. The prediction verification is completed through the test data set, and the prediction task is completed for chlorophyll, surface water temperature, salinity and other data sets in the actual ocean sensor data environment through reasoning.
[0094] The present invention solves the problem of facing different scenarios of ocean sensor time series data prediction. In view of the characteristics of high complexity, uncertainty and variety of ocean sensor data sets, a large amount of parameter adjustment work needs to be performed on GRU when predicting ocean sensor data sets. Compared with manual parameter adjustment, the efficiency is greatly improved and the prediction accuracy is improved. The traditional particle swarm optimization algorithm is easy to fall into the defects of premature and slow convergence speed and cannot achieve a good balance between global search and local search when working in ocean sensor data scenarios with high complexity, uncertainty and variety, because fixed weights are used in the process of finding the optimal solution. At the same time, the algorithm maintains the diversity of population particles and reduces the probability of particle assimilation during the search process. It can effectively prevent the algorithm from converging to the local optimal solution too early, thereby enhancing the global optimization ability of the algorithm and effectively increasing the robustness of the algorithm. In the actual ocean sensor data prediction scenario with high complexity, uncertainty and variety, the efficiency of model hyperparameter tuning is greatly improved, and a good prediction effect is obtained.
[0095] Embodiment 2
[0096] This embodiment provides an ocean time series data prediction system based on an improved particle swarm optimization algorithm.
[0097] The ocean time series data prediction system based on the improved particle swarm optimization algorithm includes:
[0098] A training module is configured to: obtain ocean sensor sample data, optimize the hyperparameters of the prediction model using an improved particle swarm optimization algorithm, obtain the optimal hyperparameters, and thereby obtain a trained prediction model;
[0099] A prediction module is configured to: obtain ocean sensor data to be predicted, and use a trained prediction model to obtain a prediction result;
[0100] The improved particle swarm optimization algorithm includes: replacing the fixed inertia weight with a nonlinear dynamic weight, and introducing an adaptive weight factor into the nonlinear dynamic weight.
[0101] It should be noted that the examples and application scenarios implemented by the training module and prediction module are the same as those in the steps of Embodiment 1, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0102] Embodiment 3
[0103] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the ocean time series data prediction method based on the improved particle swarm optimization algorithm as described in the first embodiment above are implemented.
[0104] Embodiment 4
[0105] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the ocean time series data prediction method based on the improved particle swarm optimization algorithm as described in the first embodiment are implemented.
[0106] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.
[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. The ocean time series data prediction method based on the improved particle swarm optimization algorithm is characterized by: include: Obtain ocean sensor sample data, use the improved particle swarm optimization algorithm to optimize the hyperparameters of the prediction model, obtain the optimal hyperparameters, and thus obtain the trained prediction model; Obtain the ocean sensor data to be predicted, and use the trained prediction model to obtain the prediction results; The improved particle swarm optimization algorithm includes: replacing the fixed inertia weight with a nonlinear dynamic weight, and introducing an adaptive weight factor into the nonlinear dynamic weight; The nonlinear dynamic weight is calculated using the following formula: ; in, is the nonlinear dynamic weight, and They are The maximum and minimum values of ; is the current generation number; is the maximum number of iterations; The adaptive weight factor introduced into the nonlinear dynamic weight adopts the following formula: ; in, is the nonlinear dynamic weight, is the improvement of the global optimal fitness, is the coefficient for adjusting the adaptive strength, Depends on whether the global best fitness improves and whether the diversity metric exceeds a threshold; The prediction model is an improved ANDPSO-GRU combination model, including a hyperparameter tuning stage based on the improved PSO and a process of executing ocean sensor time series data prediction.
2. The method for predicting ocean time series data based on improved particle swarm optimization algorithm according to claim 1 is characterized in that: The improved particle swarm optimization algorithm also includes: using diversity metrics to improve the size of population particles, including: calculating particle spacing, calculating the average distance between all particles based on the particle spacing, and adjusting the distribution range of particles based on whether the average distance exceeds a threshold.
3. The method for predicting ocean time series data based on improved particle swarm optimization algorithm according to claim 2 is characterized in that: The process of adjusting the distribution range of particles according to whether the average distance exceeds a threshold value includes: if the average distance exceeds the threshold value, expanding the distribution range of particles by automatically adjusting the nonlinear dynamic weight.
4. The method for predicting ocean time series data based on improved particle swarm optimization algorithm according to claim 2 is characterized in that: The average distance is calculated using the following formula: ; in, is the interparticle distance, N is the total number of particles, is the number of combinations of selecting any two particles from N.
5. The method for predicting ocean time series data based on improved particle swarm optimization algorithm according to any one of claims 1 to 4, characterized in that: The prediction model adopts the GRU model.
6. The ocean time series data prediction system based on the improved particle swarm optimization algorithm is characterized by: include: A training module is configured to: obtain ocean sensor sample data, optimize the hyperparameters of the prediction model using an improved particle swarm optimization algorithm, obtain the optimal hyperparameters, and thereby obtain a trained prediction model; A prediction module is configured to: obtain ocean sensor data to be predicted, and use a trained prediction model to obtain a prediction result; The improved particle swarm optimization algorithm includes: replacing the fixed inertia weight with a nonlinear dynamic weight, and introducing an adaptive weight factor into the nonlinear dynamic weight; The nonlinear dynamic weight is calculated using the following formula: ; in, is the nonlinear dynamic weight, and They are The maximum and minimum values of ; is the current generation number; is the maximum number of iterations; The adaptive weight factor introduced into the nonlinear dynamic weight adopts the following formula: ; in, is the nonlinear dynamic weight, is the improvement of the global optimal fitness, is the coefficient for adjusting the adaptive strength, Depends on whether the global best fitness improves and whether the diversity metric exceeds a threshold; The prediction model is an improved ANDPSO-GRU combination model, including a hyperparameter tuning stage based on the improved PSO and a process of executing ocean sensor time series data prediction.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the ocean time series data prediction method based on the improved particle swarm optimization algorithm as described in any one of claims 1 to 5 are implemented.
8. 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 program, the steps in the ocean time series data prediction method based on the improved particle swarm optimization algorithm as described in any one of claims 1 to 5 are implemented.
