CN110826749A - Dissolved oxygen content prediction method based on SNN, electronic device and system - Google Patents

Dissolved oxygen content prediction method based on SNN, electronic device and system Download PDF

Info

Publication number
CN110826749A
CN110826749A CN201810892277.8A CN201810892277A CN110826749A CN 110826749 A CN110826749 A CN 110826749A CN 201810892277 A CN201810892277 A CN 201810892277A CN 110826749 A CN110826749 A CN 110826749A
Authority
CN
China
Prior art keywords
snn
model
dissolved oxygen
training
data set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810892277.8A
Other languages
Chinese (zh)
Inventor
陈英义
方晓敏
邸玉琦
于辉辉
刘烨琦
龚川洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Agricultural University
Original Assignee
China Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Agricultural University filed Critical China Agricultural University
Priority to CN201810892277.8A priority Critical patent/CN110826749A/en
Publication of CN110826749A publication Critical patent/CN110826749A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/088Non-supervised learning, e.g. competitive learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Forestry; Mining

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Software Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Agronomy & Crop Science (AREA)
  • Mining & Mineral Resources (AREA)
  • Primary Health Care (AREA)
  • Animal Husbandry (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a dissolved oxygen content prediction method based on SNN, electronic equipment and a system, wherein the method comprises the following steps: predicting the content of dissolved oxygen in the water area to be detected by utilizing a pre-trained SNN model based on the online collected environmental factor data of the water area to be detected; wherein the process of training to obtain the trained SNN model comprises the following steps: and determining a weight adjustment function of model training according to the two-phase STDP mechanism. The invention improves the training speed of the prediction model and the accuracy and precision of the prediction of the dissolved oxygen content.

Description

Dissolved oxygen content prediction method based on SNN, electronic device and system
Technical Field
The invention relates to the technical field of computers, in particular to a dissolved oxygen content prediction method based on SNN, electronic equipment and a system.
Background
The water quality prediction is to evaluate and predict the change rule and development trend of the future aquaculture water quality in time and space according to the mastered data and the detected data, and provides decision basis for preventing the aquaculture water quality from further deterioration and making measures for improving the aquaculture water quality. Dissolved oxygen is a critical item in many water quality parameters.
With the development of computer technology, water quality prediction models are gradually developed from initial mathematical models to prediction models based on artificial intelligence algorithms. The existing prediction methods include: the method comprises a grey prediction method, an artificial neural network prediction method and a support vector machine prediction method.
Wherein, the grey prediction method can not solve the error problem; the artificial neural network prediction method has low learning and training speed, the learning accuracy and precision are difficult to ensure, and the learning error is easy to converge on a local minimum point; the support vector machine prediction method has low prediction precision on the water quality parameters in the complex water body environment.
Disclosure of Invention
In order to overcome the above problems or at least partially solve the above problems, the present invention provides a method, an electronic device, and a system for predicting a dissolved oxygen content based on SNN.
In a first aspect, the present invention provides a method for predicting a dissolved oxygen content based on SNN, comprising: predicting the content of dissolved oxygen in the water area to be detected by utilizing a pre-trained SNN model based on the online collected environmental factor data of the water area to be detected; the process of training to obtain the trained SNN model comprises the following steps: and determining a weight adjustment function of model training according to a two-phase STDP mechanism.
Further, before the step of predicting the dissolved oxygen content in the water area to be measured by using the pre-trained SNN model, the method for predicting the dissolved oxygen content based on SNN further comprises: initializing an SNN model to obtain an initialized SNN model; generating a weight adjustment function by utilizing a ReSuMe algorithm based on a model input pulse sequence, a model output pulse sequence and a two-phase STDP mechanism; training the initialized SNN model by using a training data set and a verification data set, iteratively updating the weight values of an output layer and a hidden layer of the SNN model based on a weight adjusting function until the prediction accuracy of the current SNN model is not lower than the preset accuracy, and obtaining the trained SNN model; the training data set comprises meteorological factor data and water quality factor data of a water area to be tested in a preset time period, and the verification data set comprises dissolved oxygen content data at a preset moment.
The step of generating the weight adjustment function by using a ReSuMe algorithm based on the model input pulse sequence, the model output pulse sequence and the two-phase STDP mechanism further comprises: calculating a weight adjustment value of the hidden layer according to the following formula:
wherein: n isiThe number of all neurons in the input layer; n ishThe number of all neurons in the hidden layer; si(t) a pre-synaptic input pulse sequence representing the hidden layer;
Figure BDA0001757258700000022
is a target discharge time vector for neurons in the output layer;
Figure BDA0001757258700000023
is the actual discharge time vector of the neurons in the output layer; omegaohIs the weight of the output layer; the parameter a is used for influencing the approaching speed of training; for excitatory synapses, the parameter a takes a positive value, and the learning window a(s) represents the STDP rule in the two-phase STDP mechanism; for inhibitory synapses, the parameter a takes a negative value, and the learning window a(s) represents the anti-STDP rule in the two-phase STDP mechanism; the weight adjustment value of the output layer is calculated according to the following formula:
Figure BDA0001757258700000024
wherein: n ishThe number of all neurons in the hidden layer; sh(t) represents a post-synaptic output pulse sequence of the hidden layer;
Figure BDA0001757258700000031
a target discharge time vector for neurons in the output layer;
Figure BDA0001757258700000032
is the actual discharge time vector of the neuron of the output layer; omegaohIs the weight of the output layer; the parameter a is used for influencing the approaching speed of training; for excitatory synapses, the parameter a takes a positive value, and the learning window a(s) represents the STDP rule in the two-phase STDP mechanism; for inhibitory synapses, the parameter a takes a negative value, and the learning window a(s) represents the anti-STDP rule in the two-phase STDP mechanism.
Wherein, the learning window a(s) is calculated by adopting the following formula:
Figure BDA0001757258700000033
wherein: a. the+And A-Represents a learning rate; s represents the time required for the presynaptic pulse to pass to the postsynaptic pulse; tau is+And τIs a time constant used to control the rate of voltage drop.
Further, before the step of initializing the SNN model, the method for predicting the dissolved oxygen content based on the SNN comprises the following steps of: filling in incomplete data in the training data set and the verification data set by using a linear interpolation method; and restoring unreal data in the training data set and the verification data set by using a mean value smoothing method.
Wherein, the meteorological factor data comprise at least one item of air pressure, air humidity, solar radiation, rainfall, wind speed and wind direction, and the water quality factor data at least comprise dissolved oxygen content, temperature and pH value.
Wherein the environmental factor data includes at least one of air pressure, air humidity, solar radiation, rainfall, wind speed, wind direction, temperature, and pH.
In a second aspect, the present invention provides an electronic device comprising: at least one processor, at least one memory, a communication interface, and a bus; the processor, the memory and the communication interface complete mutual communication through a bus, and the communication interface is used for information transmission between the electronic equipment and the data acquisition device; the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the SNN-based dissolved oxygen content prediction method as described above.
In a third aspect, the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the SNN-based dissolved oxygen content prediction method as described above.
In a fourth aspect, the present invention provides a SNN-based dissolved oxygen content prediction system comprising a plurality of data acquisition devices and an electronic apparatus according to the second aspect or a non-transitory computer-readable storage medium according to the third aspect; the data acquisition device is used for acquiring training data and verifying data in the data set.
According to the SNN-based dissolved oxygen content prediction method, the electronic equipment and the system, the weight adjusting function is determined according to the two-phase STDP mechanism in the training process of the SNN model, the training speed of the prediction model is increased, the dissolved oxygen content in the water area to be detected is predicted based on the trained SNN model, and the accuracy and precision of the dissolved oxygen content prediction are improved.
Drawings
FIG. 1 is a flow chart of a method for predicting the content of dissolved oxygen based on SNN in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of another SNN-based dissolved oxygen content prediction method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an exemplary scenario of a method for predicting the dissolved oxygen content based on SNN according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Aiming at the problems of slow training process, low accuracy of a prediction result, low accuracy of the prediction result and the like of the prediction model in the prior art, the method combines a series of characteristics that an impulse neural network can process non-accurate and non-structured data such as multi-sense trans-modal data in real time and has stronger calculation power and better bionic property, adopts an SNN (impulse neural network) model to predict the dissolved oxygen, and utilizes a ReSuMe algorithm based on a gradient descent idea to adjust the weight of a hidden layer and an output layer in the impulse neural network so as to predict the content of the dissolved oxygen in the water area to be measured.
As an aspect of the embodiment of the present invention, this embodiment provides a method for predicting a dissolved oxygen content based on SNN, and referring to fig. 1, is a flowchart of a method for predicting a dissolved oxygen content based on SNN according to an embodiment of the present invention, including:
s101, collecting environmental factor data of a water area to be measured on line.
Specifically, a DO (dissolved oxygen) collector is used for being held by a hand or placed in a certain position of a water area to be detected in a fixed-point mode, and environmental factor data of the water area to be detected are collected on line. The environmental factor data comprises meteorological factor data and water quality factor data of a water area to be detected.
S102, predicting the dissolved oxygen content in the water area to be detected by utilizing a pre-trained SNN model based on the online collected environmental factor data of the water area to be detected. The process of training to obtain the trained SNN model comprises the following steps: and determining a weight adjustment function of model training according to the two-phase STDP mechanism.
Specifically, the environmental factor data is encoded to generate a pulse sequence, the pulse sequence is input into a pre-trained SNN (pulse neural network) model to obtain an output pulse sequence, and the output pulse sequence is decoded to obtain a prediction result, namely a dissolved oxygen content prediction value in the water area to be detected.
The training process of the SNN model generally comprises the following steps: determining a coding mode, and coding the sample data into an input pulse sequence Si (t); inputting the pulse sequence into a pulse neural network to calculate an output pulse sequence so (t); and comparing the expected pulse sequence with the actual output pulse sequence to obtain an error, and adjusting the weight values of the output layer and the hidden layer according to the error to realize that the difference between the actual output pulse sequence so (t) of the neural network and the expected pulse sequence Sd (t) is as small as possible.
STDP is an unsupervised learning algorithm, which enables the synaptic weights to be adjusted adaptively, and emphasizes the importance of asymmetrical sending time sequence. The two mainstream unsupervised STDP learning algorithms respectively adopt a three-phase STDP mechanism and a two-phase STDP mechanism, and in the training process of the SNN model, the two-phase STDP mechanism is used for determining the weight adjustment function. If two neurons are excited simultaneously, the synapse between them is enhanced, i.e., within a time window, when a post-synaptic pulse occurs after a pre-synaptic pulse (i.e., after the last layer of firing pulse, the next layer of connected neurons follow the firing pulse), the duration of the synapse is enhanced (the synaptic weight is increased), and vice versa, the duration of the synapse is suppressed (the synaptic weight is weakened).
In the embodiment, the weight adjusting function is determined according to the two-phase STDP mechanism in the training process of the SNN model, so that the training speed of the prediction model is increased, the dissolved oxygen content in the water to be detected is predicted based on the trained SNN model, and the accuracy and precision of the predicted dissolved oxygen content are increased.
According to the above embodiment, fig. 2 is a flowchart of establishing an SNN model according to an embodiment of the present invention, and as shown in fig. 2, before the step of predicting the dissolved oxygen content in the water to be measured by using the pre-trained SNN model, the method for predicting the dissolved oxygen content based on SNN further includes:
s201, initializing the SNN model, and acquiring the initialized SNN model.
In particular, for a spiking neural network, neural information is stored in the form of a pulse train. Initializing an SNN model, randomly generating initial weight values of an output layer and a hidden layer, coding sample data in a training data set to obtain a corresponding input pulse sequence through Time coding strategies such as delay coding, phase coding, Time-to-First-Spike coding, BSA (Bens SpikeAlgorithm) coding and the like, and inputting the input pulse sequence into the SNN model to complete a training process to obtain an actual output pulse sequence. And coding the sample data in the verification data set to obtain a corresponding input pulse sequence, and inputting the input pulse sequence into the SNN model to complete a training process to obtain a target output pulse sequence.
The input pulse sequence sequentially enters an input layer neuron, a hidden layer neuron and an output layer neuron. Coding sample data in the training data set to obtain an input pulse sequence of an input layer, and when the sample data is transmitted from a neuron of the input layer to a neuron of a hidden layer, obtaining an output pulse sequence of the neuron of the input layer, namely the input pulse sequence of the neuron of the hidden layer according to an initial weight value of the hidden layer; when the output layer neuron is transmitted to the hidden layer neuron, the output pulse sequence of the hidden layer neuron, namely the input pulse sequence of the output layer neuron, is obtained according to the initial weight value of the output layer neuron, and the output pulse sequence of the output layer neuron, namely the output pulse sequence of the initialized SNN model, is obtained through the output layer neuron.
S202, generating a weight adjusting function by utilizing a ReSuMe algorithm based on the model input pulse sequence, the model output pulse sequence and the two-phase STDP mechanism.
Specifically, a ReSuMe algorithm is applied to train the SNN model, and a weight adjustment function is generated according to an input pulse sequence and an actual output pulse sequence corresponding to a training data set, an input pulse sequence and a target output pulse sequence corresponding to a verification data set and an STDP mechanism. The weight adjusting function is used for adjusting the weight values of the output layer and the hidden layer according to the weight adjusting function.
STDP is an unsupervised learning algorithm, which enables the synaptic weights to be adjusted adaptively, and emphasizes the importance of asymmetrical sending time sequence. The two mainstream unsupervised STDP learning algorithms respectively adopt a three-phase STDP mechanism and a two-phase STDP mechanism, and in the training process of the SNN model, the two-phase STDP mechanism is used for determining the weight adjustment function. If two neurons are excited simultaneously, the synapse between them is enhanced, i.e., within a time window, when a post-synaptic pulse occurs after a pre-synaptic pulse (i.e., after the last layer of firing pulse, the next layer of connected neurons follow the firing pulse), the duration of the synapse is enhanced (the synaptic weight is increased), and vice versa, the duration of the synapse is suppressed (the synaptic weight is weakened).
S203, training the initialized SNN model by using the training data set and the verification data set, iteratively updating the weight values of the output layer and the hidden layer of the SNN model based on the weight adjusting function until the prediction accuracy of the current SNN model is not lower than the preset accuracy, and obtaining the trained SNN model.
The training data set comprises meteorological factor data and water quality factor data of a water area to be tested in a preset time period, and the verification data set comprises dissolved oxygen content data at a preset moment.
Specifically, an input pulse sequence and an actual output pulse sequence corresponding to the training data set are compared with an input pulse sequence and a target output pulse sequence corresponding to the verification data set, and the weight values of the output layer and the hidden layer are adjusted, so that the difference between the actual output pulse sequence and the target output pulse sequence of the SNN model is as small as possible. According to the steps and the training process, an initialized SNN model is trained on the basis of the training data set, the verification data set and the weight adjusting function, and meanwhile, in the training process, the weight values of the output layer and the hidden layer are updated in an iterative mode. And collecting the environmental factor data of the water area to be measured on line in real time, and predicting the dissolved oxygen content of the water area to be measured by using the current SNN model.
Specifically, after each training process is completed, acquiring n groups of environmental factor sample data of a water area to be tested on line, predicting the dissolved oxygen content of the water area to be tested by using a current SNN model, comparing the dissolved oxygen content with the dissolved oxygen content actually acquired by a DO (dissolved oxygen) collector, calculating the prediction accuracy corresponding to the n groups of environmental factor sample data, averaging to obtain the prediction accuracy of the current SNN model, finishing the training of the SNN model until the prediction accuracy of the current SNN model is not lower than the preset accuracy, otherwise, expanding a training data set, and continuing to train the current SNN model.
For example, the water area 13 to be measured is collected on line by a DO (dissolved oxygen) collector: 7 sets of environmental factor sample data from 00-14:00, respectively at 13: 00. collecting sample data of environmental factors at 13:10, 13:20, 13:30, 13:40, 13:50 and 14:00, and predicting the dissolved oxygen content of the water area to be measured by utilizing the current SNN model.
Meanwhile, with a DO (dissolved oxygen) harvester, at 13: 00 was measured to be 9.85mg/L, while the current SNN model predicted that the dissolved oxygen content at this time was 9.86mg/L, 13: the prediction accuracy corresponding to the sample data of 00 is 1- [ (9.86-9.85) ÷ 9.85], and the prediction accuracy corresponding to the other 6 groups of sample data is calculated in turn, and the average value is obtained, namely the prediction accuracy of the current SNN model. And assuming that the preset accuracy is 95%, if the prediction accuracy of the current SNN model is not lower than 95%, finishing the training of the SNN model, otherwise, expanding a training data set and continuing to train the current SNN model.
In the embodiment, the weight adjusting function is determined according to the two-phase STDP mechanism in the training process of the SNN model, so that the training speed of the prediction model is improved.
To further illustrate the technical solution of the present invention, the following preferred processing flow is provided, but the scope of the present invention is not limited thereto.
FIG. 3 is a schematic diagram showing an example scenario of a method for predicting the content of dissolved oxygen based on SNN according to an embodiment of the present invention, as shown in FIG. 3, in a pond, the length of a wire configured according to a fixed point sensor is combined with the length and width of the pond, and the fixed point sensor is as shown in the figure
Figure RE-GDA0001809649220000092
Several measurement points are shown, wherein the data collected by the fixed point sensor is attributed to a training data set. Each fixed point sensor is provided with a DO collector, the DO collector can upload data measured by the fixed point sensor to the platform in real time and store the data, and the data is acquired and uploaded once every 10 minutes by the DO collector. The hand-held sensor was a manual measurement, using a hand-held sensor to measure dissolved oxygen concentration at 16 points around the edge of the pond, collected every hour.
The meteorological data are obtained by uploading data acquired by the meteorological station every 5 minutes to the platform. The meteorological data are divided into 2 parts, the meteorological data corresponding to each data time of the fixed-point sensor are attributed to a training data set for training the SNN model, and the meteorological data corresponding to each data time of the handheld sensor are attributed to a testing data set for testing the prediction accuracy of the SNN model.
In order to avoid that some meteorological data in the training data set and the testing data set are the same, the following data acquisition mode is adopted: the hand-held sensor is measured at a whole point, the data of the collector is measured at 5 times, and the meteorological data is measured at 5 times. For example: at 13: 00 to 14: during the 00 time period, the hand-held sensor is 13: 00 and 14:00 measured data, the fixed point sensor is 13: 05 measured every 10 minutes, the stations were from 13: 00 begin uploading data every 5 minutes. Therefore, 13: 00 and 14:00 into the test data set, 13: 05. 13: 15. 13: 25. 13: 35. 13: 45 and 13: 55 into the training dataset.
In one embodiment, the step of generating the weight adjustment function using the recime algorithm based on the model input pulse sequence, the model output pulse sequence, and the biphase STDP mechanism further comprises: calculating a weight adjustment value of the hidden layer according to the following formula:
Figure BDA0001757258700000091
wherein: n isiThe number of all neurons in the input layer; n ishThe number of all neurons in the hidden layer; si(t) a pre-synaptic input pulse sequence representing the hidden layer;
Figure BDA0001757258700000101
is a target discharge time vector for neurons in the output layer;
Figure BDA0001757258700000102
is the actual discharge time vector of the neurons in the output layer; omegaohIs the weight of the output layer; the parameter a is used for influencing the approaching speed of training; for excitatory synapses, the parameter a takes a positive value, and the learning window a(s) represents the STDP rule in the two-phase STDP mechanism; for inhibitory synapses, the parameter a takes a negative value, and the learning window a(s) represents the anti-STDP rule in the two-phase STDP mechanism; the weight adjustment value of the output layer is calculated according to the following formula:
wherein: n ishThe number of all neurons in the hidden layer; sh(t) represents a post-synaptic output pulse sequence of the hidden layer;
Figure BDA0001757258700000104
a target discharge time vector for neurons in the output layer;
Figure BDA0001757258700000105
is the actual discharge time vector of the neuron of the output layer; omegaohIs the weight of the output layer; the parameter a is used for influencing the approaching speed of training; for excitatory synapses, the parameter a takes a positive value, and the learning window a(s) represents the STDP rule in the two-phase STDP mechanism; for inhibitory synapses, the parameter a takes a negative value, and the learning window a(s) represents the anti-STDP rule in the two-phase STDP mechanism.
In one embodiment, the learning window a(s) is calculated using the following formula:
Figure BDA0001757258700000106
wherein: a. the+And A-represents the learning rate; s represents the time required for the presynaptic pulse to pass to the postsynaptic pulse; tau is+And τIs a time constant used to control the rate of voltage drop.
Specifically, when an input pulse sequence sequentially passes through an input layer, a hidden layer and an output layer of the SNN model, if a presynaptic pulse occurs before a postsynaptic pulse, namely after an upper layer of issued pulses, and a next layer of connected neurons follow the issued pulses, synapse enhancement is performed, and a(s) is selected as a learning window apost(s); if the presynaptic pulse occurs after the postsynaptic pulse, i.e. after the next pulse, the connected neuron of the previous layer follows the pulse, the synapse is weakened, and the learning window a(s) is selected aspre(s)。
In the embodiment, in the training process of the SNN model, a learning window of the ReSuMe algorithm is selected according to a two-phase STDP mechanism, so that a weight adjusting function is determined, and the training speed of the prediction model is improved.
In one embodiment, prior to the step of performing SNN model initialization, the SNN-based dissolved oxygen content prediction method comprises: filling incomplete data in the training data set and the verification data set by using a linear interpolation method; and restoring unreal data in the training data set and the verification data set by using a mean value smoothing method.
Specifically, for a training dataset and a validation dataset, the collected data is preprocessed using a formula
Figure BDA0001757258700000111
Supplementing and verifying missing data in the data set, and utilizing a formula
Figure BDA0001757258700000112
And restoring and verifying abnormal data in the data set.
According to the embodiment, missing data is supplemented and verified by using a linear interpolation method, abnormal data is restored and verified by using a mean value smoothing method, the usability of data in a training data set and a verification data set is improved, and the prediction accuracy of a prediction model are further improved.
In one embodiment, the meteorological factor data includes at least one of air pressure, air humidity, solar radiation, rainfall, wind speed, and wind direction, and the water quality factor data includes at least dissolved oxygen content, temperature, and pH.
In one embodiment, the environmental factor data includes at least one of air pressure, air humidity, solar radiation, rainfall, wind speed, wind direction, temperature, and pH.
Specifically, the air pressure, air humidity, solar radiation, rainfall, wind speed, wind direction, temperature, pH value, and the like are all factors that directly or indirectly affect the dissolved oxygen concentration, and are related to the dissolved oxygen concentration information.
As another aspect of the embodiment of the present invention, the embodiment provides an electronic device, and referring to fig. 4, a schematic structural diagram of the electronic device according to the embodiment of the present invention, including: at least one processor 41, at least one memory 42, a communication interface 43, and a bus 44; the processor 41, the memory 42 and the communication interface 43 complete mutual communication through the bus 44, and the communication interface 43 is used for information transmission between the electronic equipment and the data acquisition device; the memory 42 stores a computer program operable on the processor 41, and when the processor 41 executes the computer program, the SNN-based dissolved oxygen content prediction method provided by the above-described method embodiments is implemented.
It is understood that the electronic device at least comprises a processor 41, a memory 42, a communication interface 43 and a bus 44, and the processor 41, the memory 42 and the communication interface 43 form a communication connection with each other through the bus 44 and can complete the communication with each other.
When the electronic device is running, the processor 41 calls the program instructions in the memory 42 to execute the SNN-based dissolved oxygen content prediction method provided by the above method embodiments, for example, including: and (3) collecting environmental factor data of the water area to be detected on line, and predicting the dissolved oxygen content in the water area to be detected by using a pre-trained SNN model.
Furthermore, the logic instructions in the memory 42 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
As a further aspect of the embodiments of the present invention, the present embodiment provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the SNN-based dissolved oxygen content prediction method provided by the above-mentioned method embodiments.
It will be appreciated that the computer instructions described above may be embodied in the form of software functional units and stored on a computer readable storage medium when sold or used as a stand-alone product. Alternatively, all or part of the steps of implementing the above method embodiments may be implemented by hardware related to program instructions, where the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the above method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
As a further aspect of the embodiments of the present invention, the present embodiment provides a system for predicting a dissolved oxygen content based on SNN, including a plurality of data acquisition devices and an electronic device or a non-transitory computer-readable storage medium as provided in the above respective embodiments of the apparatus; the data acquisition device is used for acquiring data in the training data set and the verification data set.
In addition, the embodiments of the apparatuses of the present invention are used for executing the embodiments of the methods of the present invention, and specific executing methods and process contents refer to the above embodiments of the methods, which are not described herein again.
According to the electronic equipment, the non-transitory computer readable storage medium and the SNN-based dissolved oxygen content prediction system provided by the embodiment of the invention, the weight adjustment function is determined according to the two-phase STDP mechanism in the training process of the SNN model, so that the training speed of the prediction model is increased, the content of dissolved oxygen in the water area to be measured is predicted based on the trained SNN model, and the accuracy and precision of the content of the predicted dissolved oxygen are increased.
In addition, it should be understood by those skilled in the art that the terms "comprises," "comprising," or any other variation thereof, in the specification of the present invention, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the description of the present invention, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description. Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects.
However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiment. One of ordinary skill in the art can understand and implement the present invention without any inventive effort.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A method for predicting the content of dissolved oxygen based on SNN is characterized by comprising the following steps:
predicting the content of dissolved oxygen in the water area to be detected by utilizing a pre-trained SNN model based on the online collected environmental factor data of the water area to be detected;
wherein the process of training to obtain the trained SNN model comprises the following steps: and determining a weight adjustment function of model training according to the two-phase STDP mechanism.
2. The method of claim 1, further comprising, prior to the step of predicting the dissolved oxygen content in the water area under test using a pre-trained SNN model:
initializing an SNN model to obtain an initialized SNN model;
generating the weight adjustment function by utilizing a ReSuMe algorithm based on a model input pulse sequence, a model output pulse sequence and the two-phase STDP mechanism;
training the initialized SNN model by using a training data set and a verification data set, iteratively updating the weight values of an output layer and a hidden layer of the SNN model based on the weight adjusting function until the prediction accuracy of the current SNN model is not lower than the preset accuracy, and obtaining the trained SNN model;
the training data set comprises meteorological factor data and water quality factor data of the water area to be detected in a preset time period, and the verification data set comprises dissolved oxygen content data at a preset moment.
3. The method of claim 2, wherein the step of generating the weight adjustment function using a ReSuMe algorithm based on the model input pulse sequence, the model output pulse sequence, and the two-phase STDP mechanism further comprises:
calculating a weight adjustment value of the hidden layer according to the following formula:
Figure FDA0001757258690000011
wherein: n isiThe number of all neurons in the input layer; n ishThe number of all neurons in the hidden layer; si(t) a pre-synaptic input pulse sequence representing the hidden layer;
Figure FDA0001757258690000021
a target discharge time vector for the output layer neurons;
Figure FDA0001757258690000022
is the actual discharge time vector of the output layer neurons; omegaohIs the weight of the output layer; the parameter a is used for influencing the approaching speed of training; for excitatory synapses, the parameter a takes a positive value, and the learning window a(s) represents the STDP rule in the two-phase STDP mechanism; for inhibitory synapses, the parameter a takes a negative value, and a learning window a(s) represents the anti-STDP rule in the two-phase STDP mechanism;
calculating a weight adjustment value of the output layer according to the following formula:
Figure FDA0001757258690000023
wherein: n ishThe number of all neurons in the hidden layer; sh(t) represents a post-synaptic output pulse sequence of said hidden layer;
Figure FDA0001757258690000024
a target discharge time vector for the output layer neurons;
Figure FDA0001757258690000025
is the actual discharge time vector of the output layer neurons; omegaohIs the weight of the output layer; the parameter a is used for influencing the approaching speed of training; for excitatory synapses, the parameter a takes a positive value, and the learning window a(s) represents the STDP rule in the two-phase STDP mechanism; for inhibitory synapses, the parameter a takes a negative value, and the learning window a(s) represents the anti-STDP rule in the bi-phasic STDP mechanism.
4. A method according to claim 3, wherein the learning window a(s) is calculated using the formula:
Figure FDA0001757258690000026
wherein: a. the+And A-Represents a learning rate; s represents the time required for the presynaptic pulse to pass to the postsynaptic pulse; tau is+And τIs a time constant used to control the rate of voltage drop.
5. The method of claim 2, wherein prior to the step of performing SNN model initialization, comprising:
filling incomplete data in the training data set and the verification data set by using a linear interpolation method;
and restoring unreal data in the training data set and the verification data set by using a mean value smoothing method.
6. The method of claim 2, wherein the weather factor data includes at least one of air pressure, air humidity, solar radiation, rainfall, wind speed, and wind direction, and the water quality factor data includes at least dissolved oxygen content, temperature, and pH.
7. The method of claim 1, wherein the environmental factor data comprises at least one of air pressure, air humidity, solar radiation, rainfall, wind speed, wind direction, temperature, pH.
8. An electronic device, comprising: at least one processor, at least one memory, a communication interface, and a bus;
the processor, the memory and the communication interface complete mutual communication through the bus, and the communication interface is used for information transmission between the electronic equipment and the data acquisition device;
the memory has stored therein a computer program operable on the processor, which when executed by the processor, implements the method of any one of claims 1 to 7.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method according to any one of claims 1 to 7.
10. An SNN-based dissolved oxygen content prediction system comprising a plurality of data acquisition devices and the electronic device of claim 8 or the non-transitory computer-readable storage medium of claim 9;
wherein the data acquisition device is used for acquiring data in the training data set and the verification data set.
CN201810892277.8A 2018-08-07 2018-08-07 Dissolved oxygen content prediction method based on SNN, electronic device and system Pending CN110826749A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810892277.8A CN110826749A (en) 2018-08-07 2018-08-07 Dissolved oxygen content prediction method based on SNN, electronic device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810892277.8A CN110826749A (en) 2018-08-07 2018-08-07 Dissolved oxygen content prediction method based on SNN, electronic device and system

Publications (1)

Publication Number Publication Date
CN110826749A true CN110826749A (en) 2020-02-21

Family

ID=69533861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810892277.8A Pending CN110826749A (en) 2018-08-07 2018-08-07 Dissolved oxygen content prediction method based on SNN, electronic device and system

Country Status (1)

Country Link
CN (1) CN110826749A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580740A (en) * 2020-12-28 2021-03-30 北方工业大学 Ozone concentration measuring method, device, electronic device and storage medium
CN116659589A (en) * 2023-07-25 2023-08-29 澳润(山东)药业有限公司 Donkey-hide gelatin cake preservation environment monitoring method based on data analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102183621A (en) * 2011-02-28 2011-09-14 中国农业大学 Aquaculture dissolved oxygen concentration online forecasting method and system
WO2015053908A2 (en) * 2013-10-09 2015-04-16 Qualcomm Incorporated Method and apparatus to control and monitor neural model execution remotely
CN106845541A (en) * 2017-01-17 2017-06-13 杭州电子科技大学 A kind of image-recognizing method based on biological vision and precision pulse driving neutral net
CN107480775A (en) * 2017-08-14 2017-12-15 中国水产科学研究院淡水渔业研究中心 A kind of dissolved oxygen in fish pond Forecasting Methodology based on data reparation
CN107728477A (en) * 2017-09-21 2018-02-23 中国农业大学 A kind of industrialized aquiculture water quality dissolved oxygen prediction control method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102183621A (en) * 2011-02-28 2011-09-14 中国农业大学 Aquaculture dissolved oxygen concentration online forecasting method and system
WO2015053908A2 (en) * 2013-10-09 2015-04-16 Qualcomm Incorporated Method and apparatus to control and monitor neural model execution remotely
CN106845541A (en) * 2017-01-17 2017-06-13 杭州电子科技大学 A kind of image-recognizing method based on biological vision and precision pulse driving neutral net
CN107480775A (en) * 2017-08-14 2017-12-15 中国水产科学研究院淡水渔业研究中心 A kind of dissolved oxygen in fish pond Forecasting Methodology based on data reparation
CN107728477A (en) * 2017-09-21 2018-02-23 中国农业大学 A kind of industrialized aquiculture water quality dissolved oxygen prediction control method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王向文: "基于脉冲序列内积的脉冲神经网络监督学习研究", 《中国优秀博硕士学位论文全文数据库(电子期刊),信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580740A (en) * 2020-12-28 2021-03-30 北方工业大学 Ozone concentration measuring method, device, electronic device and storage medium
CN112580740B (en) * 2020-12-28 2024-03-01 北方工业大学 Ozone concentration measuring method, ozone concentration measuring device, electronic equipment and storage medium
CN116659589A (en) * 2023-07-25 2023-08-29 澳润(山东)药业有限公司 Donkey-hide gelatin cake preservation environment monitoring method based on data analysis
CN116659589B (en) * 2023-07-25 2023-10-27 澳润(山东)药业有限公司 Donkey-hide gelatin cake preservation environment monitoring method based on data analysis

Similar Documents

Publication Publication Date Title
US11836625B2 (en) Training action selection neural networks using look-ahead search
Lu et al. Generalized radial basis function neural network based on an improved dynamic particle swarm optimization and AdaBoost algorithm
CN107085942B (en) Traffic flow prediction method, device and system based on wolf colony algorithm
US11295208B2 (en) Robust gradient weight compression schemes for deep learning applications
CN111222677A (en) Wind speed prediction method and system based on long-short term memory time neural network
US20200104717A1 (en) Systems and methods for neural network pruning with accuracy preservation
US11574164B2 (en) Neural network cooperation
EP3583553A1 (en) Neural architecture search for convolutional neural networks
JP2017525038A (en) Decomposition of convolution operations in neural networks
US20150206048A1 (en) Configuring sparse neuronal networks
EP3545472A1 (en) Multi-task neural networks with task-specific paths
CN110428042B (en) Reciprocally scaling neuron connection weights and input values to defeat hardware limitations
US11182676B2 (en) Cooperative neural network deep reinforcement learning with partial input assistance
EP3610418A1 (en) Distributional reinforcement learning
CN113361777B (en) Runoff prediction method and system based on VMD decomposition and IHHO optimization LSTM
TW201602807A (en) COLD neuron spike timing back propagation
US20170091675A1 (en) Production equipment including machine learning system and assembly and test unit
CN103778482A (en) Aquaculture dissolved oxygen short-term prediction method based on multi-scale analysis
CN112085198A (en) Pulse neural network optimization method based on global feedback and local synapse plasticity
CN115545334B (en) Land utilization type prediction method and device, electronic equipment and storage medium
CN110826749A (en) Dissolved oxygen content prediction method based on SNN, electronic device and system
CN112163671A (en) New energy scene generation method and system
CN112215412A (en) Dissolved oxygen prediction method and device
CN114026572A (en) Error compensation in analog neural networks
CN111612648A (en) Training method and device of photovoltaic power generation prediction model and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200221