CN116170328A - Method and device for predicting bandwidth used for graphic coding - Google Patents

Method and device for predicting bandwidth used for graphic coding Download PDF

Info

Publication number
CN116170328A
CN116170328A CN202211637752.XA CN202211637752A CN116170328A CN 116170328 A CN116170328 A CN 116170328A CN 202211637752 A CN202211637752 A CN 202211637752A CN 116170328 A CN116170328 A CN 116170328A
Authority
CN
China
Prior art keywords
population
individual
algorithm
neural network
clustering
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
CN202211637752.XA
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 Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
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 Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211637752.XA priority Critical patent/CN116170328A/en
Publication of CN116170328A publication Critical patent/CN116170328A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • 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
    • 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
    • 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/084Backpropagation, e.g. using gradient descent
    • 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/086Learning methods using evolutionary algorithms, e.g. genetic algorithms or genetic programming

Abstract

The embodiment of the invention provides a method and a device for predicting the bandwidth used for graphic coding. In the method, a historical use bandwidth dataset comprising a training set and a prediction set is obtained, and the training set is clustered according to a preset clustering algorithm to obtain a plurality of clustering clusters; determining target cluster from all the cluster clusters, and taking samples in the target cluster as training data; optimizing model parameters of the neural network model by using a Q learning algorithm and a genetic algorithm, and training the neural network model with the optimized model parameters by using training data to obtain a target neural network model; the method and the device have the advantages that the samples in the prediction set are input into the target neural network model to obtain the prediction result of the use bandwidth for graphic coding, the interference data in the training set are eliminated based on clustering similarity analysis, the training calculation amount is reduced, and the model parameters are optimized to prevent the neural network model from being in local optimum, so that the effect of improving the prediction precision and efficiency is achieved.

Description

Method and device for predicting bandwidth used for graphic coding
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a method and a device for predicting a bandwidth of use of graphic codes, electronic equipment and a readable storage medium.
Background
The bandwidth prediction of the graph coding is the basis for ensuring that the graph coding can work stably under a short-time large-amount burst access scene.
At present, a prediction model can be used for predicting future bandwidth of graphic codes, specifically, historical bandwidth data of the graphic codes is directly utilized for training the model, and a prediction model capable of carrying out bandwidth prediction is obtained.
However, when the above scheme is implemented, a large amount of training data is required, which results in excessive calculation amount and long time consumption, and the training process is also easy to be trapped into local optimum, so that the prediction accuracy is lower.
Disclosure of Invention
The invention provides a method and a device for predicting the bandwidth of graphics coding, electronic equipment and a readable storage medium, which are used for solving the technical problems of overlarge calculated amount, longer time consumption and lower prediction accuracy in the prior art.
In a first aspect, the present invention provides a method for predicting bandwidth used for graphics coding, the method comprising:
obtaining a historical usage bandwidth data set of the graphic code, wherein the historical usage bandwidth data set comprises a training set and a prediction set;
clustering the training set according to a preset clustering algorithm to obtain a plurality of clustering clusters;
Determining a target cluster from all the clusters, and taking samples in the target cluster as training data; the target cluster is a cluster in which the distance between the cluster center and the sample of the prediction set meets the maximum deviation similarity criterion;
optimizing model parameters of the neural network model by using a Q learning algorithm and a genetic algorithm, and training the neural network model with the optimized model parameters by using the training data to obtain a target neural network model;
and inputting the samples in the prediction set into a target neural network model to obtain a prediction result of the use bandwidth of the graphic code.
In a second aspect, the present invention provides a bandwidth-using prediction apparatus for graphic encoding, the apparatus comprising:
the acquisition module is used for acquiring a historical use bandwidth data set of the graphic code, wherein the historical use bandwidth data set comprises a training set and a prediction set;
the clustering module is used for clustering the training set according to a preset clustering algorithm to obtain a plurality of clustering clusters;
the screening module is used for determining target cluster from all the cluster clusters and taking samples in the target cluster as training data; the target cluster is a cluster in which the distance between the cluster center and the sample of the prediction set meets the maximum deviation similarity criterion;
The training module is used for optimizing model parameters of the neural network model by utilizing a Q learning algorithm and a genetic algorithm, and training the neural network model with the optimized model parameters by utilizing the training data to obtain a target neural network model;
and the prediction module is used for inputting the samples in the prediction set into a target neural network model to obtain a prediction result of the use bandwidth of the graphic coding.
In a third aspect, the present invention provides an electronic device comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, wherein the processor implements the bandwidth prediction method for graphics encoding described above when the program is executed by the processor.
In a fourth aspect, the present invention provides a readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the above-described method of bandwidth usage prediction for graphics encoding.
In the embodiment of the invention, the training set is clustered by using a clustering algorithm to obtain a plurality of clusters, then the cluster to which the predicted set data belongs is determined based on the similarity of the predicted set data and the data in the clusters, the cluster which is highly close to the predicted set data is used as the training data, and the rest data in the clustering result is screened out, so that a small amount of accurate training data is effectively screened out from the training set, and rest interference data is eliminated based on similarity analysis, thereby greatly reducing the calculated amount in the subsequent model training process and improving the training accuracy. In addition, the embodiment of the invention optimizes the model parameters through the Q learning algorithm and the genetic algorithm, and the optimized model parameters can enable the neural network to quickly converge to find the optimal point, thereby avoiding the neural network model from sinking into local optimal, further improving the accuracy of the algorithm, reducing the calculation time of the neural network and further achieving the effect of improving the prediction accuracy and efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of a method for predicting bandwidth for graphics encoding according to an embodiment of the present invention;
FIG. 2 is a flowchart showing the steps of a method for predicting bandwidth for graphics encoding according to an embodiment of the present invention;
FIG. 3 is a block diagram of a bandwidth-using prediction apparatus for graphic encoding according to an embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flowchart of a method for predicting bandwidth used for graphics coding according to an embodiment of the present invention, where, as shown in fig. 1, the method may include:
step 101, a historical usage bandwidth data set of graphic codes is obtained, wherein the historical usage bandwidth data set comprises a training set and a prediction set.
In the embodiment of the invention, the graphic code is a graphic which is distributed on a plane (two-dimensional direction) or a space (three-dimensional direction) according to a certain rule by using a certain specific geometric figure, is black-white alternate and records the information of the data symbol, and after the graphic code is scanned, the information recorded in the graphic code can be obtained and enters the subsequent links of data access and request. The graphic code uses the concept of '0' and '1' bit stream forming the logic foundation in the computer, uses several geometric shapes corresponding to binary system to represent literal value information, and scans the graphic code by the image input device or photoelectric scanning device, so as to automatically read the information in the graphic code to realize the automatic processing of the information. Graphics encoding includes, but is not limited to, two-dimensional codes, bar codes, and the like. Specific usage scenarios for graphics coding include: health figure code (scan code records personal health information), check-in figure code (scan code records check-in information), lottery figure code (scan code performs lottery), etc.
In practical application, based on the use universality of the graphic codes in various industries, the graphic codes have huge access quantity, and the hardware devices such as hard disks, servers and the like at the bottom layer are not separated from the strong support of the hardware devices, so that the hardware devices can be greatly accessed in a short time, the performance of the devices is required to be ensured in order to ensure the normal use of the graphic codes at the moment of use abrupt increase, the use bandwidth is an important index for influencing the performance of the devices, and if operation and maintenance personnel can regulate and control the graphic codes before the use peak of the graphic codes, the condition that the graphic codes are blocked at the access peak can be avoided by regulating the bandwidth according to the use conditions of the graphic codes at different time intervals. Therefore, the accurate graphic coding bandwidth prediction can greatly improve the use experience of the graphic coding, effectively avoid peak congestion, and simultaneously, the graphic coding bandwidth prediction can also enable operation and maintenance personnel to perceive the current state of equipment to make pre-judgment in advance, so that the failure rate of the equipment is reduced, and the operation efficiency of the graphic coding is further improved.
In this step, in order to implement the bandwidth-in-use prediction of the graphic code, it is first necessary to acquire a historical bandwidth-in-use data set of the graphic code, and then model training may be performed based on the historical bandwidth-in-use data set of the graphic code to obtain a model having a prediction function.
Specifically, for actual demands, a prediction day on which a predicted usage bandwidth is required may be determined first, and the historical usage bandwidth data set may be divided into a training set and a prediction set, where the historical usage bandwidth data set may be data collected within a period of time before the prediction day (e.g., within 2 years before the prediction day), the training set is mainly used as training data during model training, the prediction set is mainly used as input data during model prediction, and the training set may occupy a larger proportion (e.g., more than 90%) in the historical usage bandwidth data set, while the prediction set occupies a smaller proportion, and the prediction set includes historical usage bandwidth data close to the prediction day in time.
Further, the history use bandwidth data includes an average graphic code use bandwidth, a maximum graphic code use bandwidth, a minimum graphic code use bandwidth, a daily graphic code use bandwidth, an ambient temperature, an ambient moderation, a holiday situation, a weather condition, and the like. In the embodiment of the invention, the historical use bandwidth data set can be obtained from a graphic coding operation node database, and the environment temperature, the environment humidity, the holiday condition and the weather condition can be obtained from a local weather forecast website. The collection interval of the historical usage bandwidth data can be set to be 5 minutes, a historical usage bandwidth data curve with the time interval of 5 minutes is formed, holiday conditions are divided into common double holidays, major holidays and one day after the holidays, and weather conditions are divided into sunny days, rainy days and overcast days; the historical usage bandwidth data curve for a day is composed of 292 data points (one data point contains the time point and the usage bandwidth corresponding to that time point).
Step 102, clustering the training set according to a preset clustering algorithm to obtain a plurality of clusters.
In the embodiment of the invention, because the obtained historical use bandwidth data set has larger data quantity, model training by utilizing the historical use bandwidth data set can cause overlarge calculated quantity and longer time consumption, and in addition, a large amount of interference data exists in the historical use bandwidth data set, if the interference data are not removed, the accuracy of the subsequent training process can be reduced.
In the embodiment of the invention, in order to solve the problems, a clustering algorithm is used for clustering a training set to obtain a plurality of clusters, then the cluster to which the prediction set data belongs is determined based on the similarity of the prediction set data and the data in the clusters, so that the category of the prediction set is determined, the cluster which is highly close to the prediction set data is used as training data, and the rest data in the clustering result is screened out, so that a small amount of accurate training data is effectively screened out from the training set, rest interference data is eliminated based on similarity analysis, the calculated amount of the subsequent model training process is greatly reduced, and the training accuracy is improved by the more accurate training data.
The clustering algorithm is a statistical analysis method for researching sample classification problems, the clustering analysis is composed of a plurality of modes, the common mode is a vector of measurement or a point in a multidimensional space, the clustering algorithm can measure the similarity between samples based on a specific measurement function, so that the similarity of the same type of samples is as close as possible, different types of data are separated as possible, and finally similar samples form a cluster, and dissimilar samples are separated outside the cluster for elimination. In the step, the training set is clustered according to a preset clustering algorithm, and samples in the training set can be divided into a plurality of categories, namely a plurality of clustering clusters are obtained, each clustering cluster is a sample set, and each clustering cluster corresponds to one category.
Step 103, determining a target cluster from all the clusters, and taking samples in the target cluster as training data; the target cluster is a cluster in which the distance between the cluster center and the sample of the prediction set meets the maximum deviation similarity criterion.
In the embodiment of the invention, the cluster obtained by clustering the training set can be used as a class set, the distance between the cluster center of the cluster and the sample of the prediction set is further calculated, the cluster with the distance meeting the maximum deviation similarity criterion is used as a target cluster, the training set sample outside the target cluster is screened out, and the maximum deviation similarity criterion is a similarity measurement criterion, can effectively describe the morphological similarity of frequently-fluctuating bandwidth data, and has the characteristics of simplicity, rationality, flexibility and the like. According to the embodiment of the invention, the category of the prediction set is determined by judging the similarity between the prediction set data and the cluster, and the training data is focused on the target cluster, so that the interference of training set samples outside the target cluster is removed, the quantity of the training data is reduced, the training time consumption is reduced, and the training precision is improved.
And 104, optimizing model parameters of the neural network model by using a Q learning algorithm and a genetic algorithm, and training the neural network model with the optimized model parameters by using the training data to obtain a target neural network model.
In the embodiment of the invention, the model for performing bandwidth prediction can be a neural network model based on deep learning, in particular a Back Propagation (BP) neural network model, which is a multi-layer feedforward neural network trained according to an error Back Propagation algorithm. The BP neural network is characterized in that a plurality of hidden layer (one layer or a plurality of layers) neurons are added between an input layer and an output layer, the neurons are called hidden units, and have no direct connection with the outside, but the change of the state of the neurons can influence the relation between the input and the output, and each layer can be provided with a plurality of nodes. The calculation process of the BP neural network consists of a forward calculation process and a reverse calculation process. In the forward propagation process, the input mode is processed layer by layer from the input layer through the hidden unit layer and is transferred to the output layer, and the state of each layer of neurons only affects the state of the next layer of neurons. If the expected output cannot be obtained at the output layer, the reverse propagation is carried out, the error signal is returned along the original connecting path, and the weight of each neuron is modified to minimize the error signal.
Specifically, a plurality of model processing layers are arranged between an input layer and an output layer of the neural network model, a plurality of model parameters (such as weights, thresholds and the like) are covered between the layers, if default model parameter setting is adopted, training data are directly utilized for model training, so that the trained model is easy to sink into local optimum, and the model precision is reduced.
In order to solve the problems, the embodiment of the invention aims to optimize the model parameters through a Q learning algorithm and a genetic algorithm, the optimized model parameters can enable the neural network to quickly converge to find the optimal point, the neural network model is prevented from being trapped into local optimal, the accuracy of the algorithm is further improved, the calculation time of the neural network is reduced, and the effect of improving the prediction accuracy and efficiency is achieved.
The model parameters of the neural network model optimized by the Q learning algorithm and the genetic algorithm can be imported into the neural network model to realize parameter setting, and the neural network model optimized with the model parameters is trained by training data according to the set optimized parameters to obtain the final target neural network model.
Among them, the Q learning algorithm is an algorithm improved on reinforcement learning (RL, reinforcement Learning), which is a technical idea of searching for a global optimum. Specifically, reinforcement learning is used to describe and solve the problem that an Agent (Agent) achieves maximization of return or specific objective through learning strategies in the process of interacting with an environment, and is essentially a sequential decision problem, and the core idea is how an Agent (Agent) selects an action according to the state (state) in the currently observable environment (model) to maximize the obtained cumulative return (report).
For Agent agents in reinforcement learning, if a certain action strategy results in a positive prize (reinforcement signal) to the environment, the Agent's later trend to generate this action strategy will be reinforced. The goal of the Agent is to find the optimal strategy at each discrete state to maximize the desired discount rewards and. Reinforcement learning refers to learning as a heuristic evaluation process, in which an Agent selects an action for an environment, the state of the environment changes after receiving the action, and a reinforcement signal (rewards or punishments) is generated and fed back to the Agent, and the Agent selects the next action according to the reinforcement signal and the current state of the environment, wherein the selection principle is that the probability of receiving positive reinforcement (rewards) is increased. The action selected affects not only the immediate enhancement value, but also the state at the moment in the environment and the final enhancement value.
The Q learning algorithm is an improved scheme based on reinforcement learning, and the optimal state-behavior value (Q value) function is sought, and the Q function and the corresponding optimal state-behavior value function are obtained through a Q-table (a mapping table between state-actions and estimated future return values) and a neural network. The main idea of the Q learning algorithm is to construct a Q-table from states and actions to store Q values, and then select the action which can obtain the maximum benefit according to the Q values. The Q value can be calculated according to the above derivation, so that learning, that is, the updating process of the Q-table, can be performed with the Q value.
The genetic algorithm is designed and proposed according to the organism evolution rule in the nature, can be applied to the field of computers to solve the related problems, and converts the solving process of the problems into processes like crossing, mutation and the like of chromosome genes in the biological evolution by using a computer simulation operation in a mathematical mode. When solving more complex combinatorial optimization problems, genetic algorithms generally can obtain better optimization results faster than some conventional optimization algorithms.
In the embodiment of the invention, based on an optimization scene of model parameters, a population can be constructed based on a genetic algorithm, individuals (genes) in the population are equivalent to a group of model parameters, the population can be subjected to cross mutation to iteratively update the individuals and generate new individuals, and further, the embodiment of the invention can take the model parameters as states in a Q learning algorithm, take actions for adjusting the model parameters as actions in the Q learning algorithm, and the population is regarded as an environment in the Q learning algorithm.
In general, after the Q learning algorithm and the genetic algorithm are combined, model parameters to be optimized can be used as individuals to construct a population, iterative updating based on cross variation is performed, so that new individuals are continuously generated, then an action is selected by an agent of the Q learning algorithm according to the state in the current observable environment, so that the obtained cumulative return is the largest selection strategy, the optimal individuals are selected from the population individuals, and finally, a group of model parameters represented by the optimal individuals can be used as model parameters for the specific use of the neural network model.
And 105, inputting samples in the prediction set into a target neural network model to obtain a prediction result of the use bandwidth of the graphic coding.
In the embodiment of the invention, the samples in the prediction set are samples which are collected on or close to the prediction day and are related to the bandwidth used by the target code, and the samples in the prediction set are input into the target neural network model, so that the prediction result of the bandwidth used by the graphic code can be obtained. Operation and maintenance personnel can regulate and control related equipment before the graphic coding uses the peak through the prediction result, and real-time bandwidth adjustment is carried out according to the use condition of the graphic coding in different time periods, so that the condition that the graphic coding is crowded in the access peak is avoided, the use experience of the graphic coding can be greatly improved through accurate graphic coding use bandwidth prediction, the peak is effectively avoided, meanwhile, the graphic coding use bandwidth prediction can also enable the operation and maintenance personnel to perceive the current state of the equipment, make prejudgement in advance, the failure rate of the equipment is reduced, and the operation efficiency of the graphic coding is further improved.
In summary, the embodiment of the invention utilizes the clustering algorithm to cluster the training set to obtain a plurality of clusters, then determines the cluster to which the prediction set data belongs based on the similarity between the prediction set data and the data in the clusters, takes the cluster highly close to the prediction set data as the training data, and screens out the rest data in the clustering result, thereby effectively screening out a small amount of accurate training data from the training set, and eliminating the rest interference data based on similarity analysis, so that the calculated amount of the subsequent model training process is greatly reduced, and the training accuracy is improved. In addition, the embodiment of the invention optimizes the model parameters through the Q learning algorithm and the genetic algorithm, and the optimized model parameters can enable the neural network to quickly converge to find the optimal point, thereby avoiding the neural network model from sinking into local optimal, further improving the accuracy of the algorithm, reducing the calculation time of the neural network and further achieving the effect of improving the prediction accuracy and efficiency.
Fig. 2 is a flowchart of specific steps of a method for predicting bandwidth used in graphics encoding according to an embodiment of the present invention, where, as shown in fig. 2, the method may include:
step 201, a historical usage bandwidth data set of the graphic code is obtained, wherein the historical usage bandwidth data set comprises a training set and a prediction set.
The step may refer to step 101, and will not be described herein.
Step 202, determining optimal maximum deviation algorithm parameters according to the parameters required by the maximum deviation algorithm and the genetic algorithm.
Optionally, the maximum deviation algorithm parameters include: maximum deviation distance, similarity, degree of deviation, number of categories.
Before the clustering operation of step 203 is performed, the maximum deviation algorithm parameters required for the clustering operation, that is, the maximum deviation distance, the similarity, the deviation degree, and the number of categories, need to be obtained. Compared with the clustering inaccuracy caused by adopting the default maximum deviation algorithm parameter, the embodiment of the invention can determine the optimal maximum deviation algorithm parameter by utilizing the idea of the genetic algorithm, and the accuracy of clustering can be greatly improved by carrying out subsequent clustering through the optimal maximum deviation algorithm parameter.
Specifically, based on the idea of genetic algorithm, the population can be constructed by taking the maximum deviation algorithm parameter as an individual, namely, the individuals (genes) in the population are equivalent to a group of maximum deviation algorithm parameters, the population can be subjected to cross mutation, the individual can be iteratively updated to generate new individuals, then the fitness value of the individual is utilized as the basis of screening the optimal individuals in each iteration, the individual with the minimum fitness is selected as the optimal individual after iteration is ended, and the maximum deviation algorithm parameter represented by the optimal individual is the optimal maximum deviation algorithm parameter.
Optionally, step 202 may specifically include:
sub-step 2021, establishing a first population according to the parameters required by the maximum deviation algorithm, the first population comprising a plurality of first individuals, each first individual corresponding to a set of maximum deviation algorithm parameters.
Step 2022, calculating fitness value of each first individual in the first population, and determining the first individual with the smallest fitness value in the first population.
Step 2023, based on a genetic algorithm, performing cross mutation processing on the first population through multiple rounds of iteration, re-determining a first individual with the minimum fitness value in each round of iteration, taking the first individual with the minimum fitness value determined in the last iteration as an optimal first individual after reaching a preset iteration number, and taking the optimal first individual as an optimal maximum deviation algorithm parameter.
In the embodiment of the present invention, for sub-steps 2021-2023, first, a first population is established according to parameters required by a maximum deviation algorithm, where the first population includes a plurality of first individuals, each first individual corresponds to a set of maximum deviation algorithm parameters, and only if the population is established, the maximum deviation algorithm parameters are used as individuals (genes) to perform operations such as individual cross variation in a subsequent natural population, so as to generate new individuals. And then, calculating the fitness value of each first individual in the first population, wherein the fitness value can be used as a standard for judging the quality of the first individuals, and the better the first individual is, the smaller the fitness value is, the worse the first individual is, and the larger the fitness value is. Finally, based on a genetic algorithm, the first population is subjected to cross mutation processing through multiple iterations, new individuals are continuously generated in each iteration, the first individual with the minimum fitness value is redetermined, after the preset iteration times are reached, the first individual with the minimum fitness value determined in the last iteration is used as an optimal first individual, the optimal first individual is used as an optimal maximum deviation algorithm parameter, the subsequent clustering operation can be realized by adopting the optimal maximum deviation algorithm parameter, and the clustering accuracy is improved.
Optionally, the substep 2021 may specifically include:
substep A1, creating a first matrix, wherein a row of elements in the first matrix represents a first volume.
And A2, randomly assigning random numbers in a preset range to elements in the first matrix, and performing chaotic processing on the first matrix.
And A3, correcting the values of elements in the first matrix after the chaotic processing according to the standard value range of parameters required by the maximum deviation algorithm, and taking the corrected first matrix as the first population.
In the embodiment of the present invention, the process of creating the first population will be described in detail with reference to the sub-steps A1 to A3:
first, an initialized first matrix B needs to be constructed as an initial population:
Figure BDA0004004313360000111
wherein the number of columns n (set according to the requirement, typically 50) of the first matrix B represents the number of first individuals (genes), and one row of data in the first matrix B represents one first individual, each first individual contains four elements, and the first individual comprises the maximum deviation distance gamma (corresponding to x 11 ) Similarity alpha (equivalent to x 12 ) Degree of deviation beta (corresponding to x 13 ) Number of categories s (corresponding to x 14 )。。
Finally, aiming at the four elements of the maximum deviation distance gamma, the similarity alpha, the deviation beta and the category number s, which are included by the maximum deviation algorithm parameter, the four elements respectively have the corresponding standard value ranges, such as gamma epsilon [0.05,0.25 ]],α∈[0.7,0.9],β∈[n -1 ,1-x 2n ],s∈[1,20]According to the standard value ranges of the elements of the maximum deviation algorithm, the values of the elements in the first matrix B after the chaotic processing can be corrected, the value ranges of the elements in the first matrix after the correction are returned to the corresponding standard value ranges, and finally the first matrix after the correction is used as the first population. The correction process is as follows:
Figure BDA0004004313360000121
in addition, for the corrected first matrix B, the fourth column element (corresponding to the class number) needs to be valued downwards to ensure that the class number is an integer.
Optionally, the substep 2022 may specifically include:
and B1, randomly selecting the number of target samples of the category from the training set for each first individual, and taking the target samples as a first clustering center.
And B2, calculating the distance between each sample in the training set and the first clustering center according to the maximum deviation algorithm parameter of the first individual characterization, and adding the samples with the distances meeting the maximum deviation similarity criterion into the first clustering clusters in the first clustering center to obtain the first clustering clusters with the category number.
And B3, taking the accumulated value of the distance between each sample in the first cluster and the first cluster center as the fitness value of the first cluster, and taking the accumulated value of the fitness values of the first clusters of the category number as the fitness value of the first individual.
In the embodiment of the present invention, the process of calculating the fitness value is described in detail with respect to the sub-steps B1 to B3:
firstly, determining the fitness value of a first individual, wherein the meaning of the fitness value needs to be defined, the fitness value in genetics represents the dominance degree measurement of the individual in population survival, the smaller the fitness value is, the better the individual is, the larger the fitness value is, and the worse the individual is.
According to the embodiment of the invention, for each first individual, a category number (fourth element of the individual) target samples are randomly selected from a training set, the target samples are used as first clustering centers, then the distance between each sample in the training set and the first clustering centers is calculated according to maximum deviation algorithm parameters represented by the first individual, and the samples with the distance meeting the maximum deviation similarity criterion are added into the first clustering clusters of the first clustering centers to obtain the category number first clustering clusters, and the method comprises the following steps:
1. Calculating Euclidean distance between samples in training set and first clustering center, and Euclidean distance x ijk The calculation formula of (2) is as follows:
x ijk =||x ik -x jk ||
2. if European distance x ijk The maximum bias similarity criterion is satisfied:
Figure BDA0004004313360000131
and judging that the sample is similar to the first clustering center, and classifying the sample into a cluster of the first clustering center.
Finally, the accumulated value of the distance between each sample in the first cluster and the first cluster center can be used as the fitness value of the first cluster, the accumulated value of the fitness values of the first clusters in the category number is used as the fitness value of the first individual, and therefore the fitness value of the first individual is obtained, and the fitness value is calculated as follows:
Figure BDA0004004313360000132
where u is the dimension of the samples of the training set; t is the total number of samples belonging to category j.
It should be noted that, in the substep 2023, based on the genetic algorithm, the first population is subjected to the cross mutation processing through multiple iterations, and first, differential mutation calculation may be performed. The formula for differential variation calculation is as follows:
x i (t+1)=x i (t)+λ·[x best (t)-x j (t)]+F·[x m (t)-x n (t)]
wherein lambda is greedy degree of the control algorithm, and F is an amplification factor; x is x best (t) is the optimal first individual in the current first population; x is x j (t)、x m (t) and x n (t) represents 3 first individuals, which are randomly selected and are different from each other, except the current first individuals, in the first population.
Next, a crossbar computation is performed. Wherein, the calculation formula of the transverse cross is as follows:
M hc (i,d)=r 1 X(i,d)+(1-r 1 )X(j,d)+c 1 (X(i,d)-X(j,d))
M hc (j,d)=r 2 X(j,d)+(1-r 2 )X(i,d)+c 2 (X(j,d)-X(i,d))
wherein c 1 ,c 2 Is [ -1,1]A random number on the table; r is (r) 1 ,r 2 Is [ -1,1]A random number on the table; x (i), X (j) are each the d-th dimension of the parent gene X (i), X (j); m is M hc (i,d),M hc (j, d) are the d-th dimension children generated by X (i, d) and X (j, d) through transverse crossing.
The longitudinal crossover calculation formula is as follows:
M vc (i,d 1 )=rX(i,d 1 )+(1-r)X(i,d 2 )
wherein r is [0,1 ]]A random number on the table; mvc (i, d) 1 ) D is the gene i 1 And d 2 Progeny genes produced by longitudinal crossover.
Then, greedy selection calculation is performed. Offspring individual X after differential mutation i (t+1) will be identical to the original vector X i (t) performing fitness value comparison, only the contemporary individuals X i The fitness value of (t+1) is smaller than the original vector X i And (t) selecting the parent to be the parent of the next generation, otherwise, directly entering the next generation. After multiple iterative comparisons, the optimal first body is determined in the last iterationI.e. as an optimal maximum deviation algorithm parameter. It should be noted that, in the process of calculating the fitness value of the individual in each iteration in real time, reference may be specifically made to the descriptions of the above sub-steps B1 to B3, which are not described herein.
And 203, clustering the training set by utilizing the optimal maximum deviation algorithm parameter to obtain a plurality of clusters.
In the embodiment of the invention, the clustering operation on the training set can be realized by adopting the optimal maximum deviation algorithm parameter, and the clustering accuracy is improved because the maximum deviation algorithm parameter is optimized and improved by the genetic algorithm.
204, determining a target cluster from all the clusters, and taking samples in the target cluster as training data; the target cluster is a cluster in which the distance between the cluster center and the sample of the prediction set meets the maximum deviation similarity criterion.
This step may refer to step 103, and will not be described herein.
And 205, optimizing model parameters of the neural network model by using a Q learning algorithm and a genetic algorithm, and training the neural network model with the optimized model parameters by using the training data to obtain a target neural network model.
This step may refer to step 104, and will not be described herein.
Optionally, step 205 may specifically include:
substep 2051, initializing parameters of the genetic algorithm, parameters of the Q learning algorithm, and model parameters of the neural network model.
Sub-step 2052, establishing a second population according to model parameters of the neural network model, the second population comprising a plurality of second individuals, each second individual corresponding to a set of model parameters of the neural network model.
And step 2053, selecting an optimal second individual from the second population according to the Q learning algorithm and the genetic algorithm, and setting the neural network model by using model parameters represented by the optimal second individual to complete model parameter optimization of the neural network model.
In the embodiment of the present invention, for sub-steps 2051 to 2053, for model parameter optimization of the BP neural network model, firstly, parameters of a genetic algorithm, parameters of a Q learning algorithm and model parameters of the BP neural network model need to be initialized, and the genetic algorithm initialization parameters include maximum iteration times, population size, variation probability, maximum deviation coefficient, maximum error, preferably, the maximum iteration times is set to 10000, the population size is set to 50, the variation probability is set to 0.09, and the maximum error is set to 0.00001. The model parameters of the BP neural network comprise the number of input layers, the number of hidden layers, the number of output layers and convergence errors. Preferably, the number of input layers is 292, the hidden layers are 25, the output layers are 288, and the convergence error is 10 -6 . For the parameters of the Q learning algorithm, the number of steps m to look forward required to calculate the Q value is set to 10.
And then, according to the model parameters of the BP neural network model, establishing a second population, wherein the second population comprises a plurality of second individuals (genes), each second individual corresponds to a group of model parameters of the BP neural network model, one second individual represents a group of model parameters of the BP neural network model, the length of one second individual (the length of one gene) can be determined by the weight and the threshold number required to be set in the BP neural network model, and the length=15x30+30+30x10+10=790 of one second individual is assumed to be 15 layers of input layers, 30 layers of hidden layers and 10 layers of output layers of the BP neural network model. It should be noted that, the process of constructing the second population may also refer to the description of the process of constructing the first population, which is not described herein.
After constructing the second population, selecting an optimal second individual from the second population according to the Q learning algorithm and the genetic algorithm, wherein the specific idea is to take a model parameter (the second individual) as a state in the Q learning algorithm, take an action for adjusting the model parameter as an action in the Q learning algorithm, take the second population as an environment in the Q learning algorithm, perform iterative updating based on cross variation in the second population, thereby continuously generating new individuals, select an action according to the state in the environment which can be observed currently by combining an agent of the Q learning algorithm, select the optimal second individual from the second individuals of the second population by utilizing the Q value and the fitness value, finally take a group of model parameters represented by the optimal second individual as model parameters for specific use of the neural network model, and finally set a BP neural network model by utilizing the model parameters represented by the optimal second individual, thereby completing model parameter optimization of the BP neural network model by combining the thought of the Q learning algorithm and the genetic algorithm.
Optionally, the substep 2053 may specifically include:
and C1, processing the second population by using a Q learning algorithm and a genetic algorithm to obtain a third population.
And C2, calculating the fitness value of the second individuals in the second population and the fitness value of the third individuals in the third population.
And C3, reserving second individuals with smaller fitness values in the second population by comparing the second population with the third population, and replacing the second individuals with larger fitness values in the second population with corresponding third individuals with smaller fitness values in the third population to obtain a target second population.
And C4, selecting the second individual with the smallest fitness value in the target second population as the optimal second individual.
Optionally, the substep C1 may specifically include:
and C11, processing each second individual in the second population by using n preset parameter selection strategies, so that corresponding n new second individuals are obtained for each second individual.
And C12, performing cross mutation treatment on n new second individuals according to a genetic algorithm to obtain n target second individuals.
And C13, calculating the Q value of each target second individual according to a Q learning algorithm, and taking the target second individual with the largest Q value as a corresponding third individual in a third population to obtain the third population.
In the embodiment of the invention, for the substeps C1-C4 and substeps C11-C13, n new second individuals can be selected and generated based on each second individual in the second population by utilizing n parameter selection strategies of the Q learning algorithm, then n new second individuals are subjected to cross mutation processing of the genetic algorithm, n target second individuals can be obtained, the Q value of each target second individual can be calculated and obtained based on the Q value calculation of the Q learning algorithm, finally the target second individual with the largest Q value is used as a third individual corresponding to the original second individual in the third population, and after the above processing is performed on each second individual in the second population, a third population corresponding to the second population can be obtained. And finally, reserving second individuals with smaller fitness values in the second population by comparing the second population with the third population, and replacing the second individuals with larger fitness values in the second population with corresponding third individuals with smaller fitness values in the third population to obtain the target second population. And selecting a second individual with the smallest fitness value in the target second population as an optimal second individual, wherein the optimal second individual characterizes model parameters and can be used for setting the BP neural network model to finish parameter optimization of the BP neural network model.
Wherein each second individual generates n new second individuals using n parameter selection strategies given by the Q learning algorithm, and sets t=1; the calculation formula of the parameter selection strategy is as follows:
α=(α 01 )×(t/MaxIter)+α 1
when t is less than the number of steps needed to look ahead, m, the new second individual may generate n target second individuals based on the following formula:
x n×i,n =x i *rand(n,n)
then, selecting a target second individual, specifically, selecting a roulette method to realize selection, wherein the selection probability of each individual i is pi based on a selection strategy which is a fitness value proportion:
Figure BDA0004004313360000171
Figure BDA0004004313360000172
wherein Fi is the fitness value of the individual i, k is a coefficient, and N is the number of individuals in the second population.
Further, the mutation operation formula adopted by the genetic algorithm is as follows:
Figure BDA0004004313360000181
wherein a is max Is gene a ij Upper bound of (2); a, a min Is gene a ij Lower bound of (2); f (g) =r 2 (1-g/G max )2;r 2 Is a random number; g is the current iteration number; g max Is the maximum number of evolutions; r is [0,1 ]]Random numbers in between.
The calculation formula of the Q value is as follows:
Q(a)=r(a)+γQ(a (1) )+γ 2 ·Q(a (2) )+…γ m ·Q(a (m) )
wherein m represents the number of steps the Q value looks forward; a, a (i) E is A, and i is more than or equal to 1 and less than or equal to m.
For the fitness value of the second individual in the second population and the fitness value of the third individual in the third population, specifically, for each individual (the second individual or the third individual), model parameters of individual characterization can be set for the neural network model, then all samples in the training set are respectively input into the neural network model, for each input action, the difference between the output value of the neural network model and the true value of the sample label is calculated, and the fitness value corresponding to the individual is obtained by accumulating all the differences corresponding to the inputs.
And 206, inputting the samples in the prediction set into a target neural network model to obtain a prediction result of the use bandwidth of the graphic code.
This step may refer to step 105, and is not described herein.
In summary, the embodiment of the invention utilizes the clustering algorithm to cluster the training set to obtain a plurality of clusters, then determines the cluster to which the prediction set data belongs based on the similarity between the prediction set data and the data in the clusters, takes the cluster highly close to the prediction set data as the training data, and screens out the rest data in the clustering result, thereby effectively screening out a small amount of accurate training data from the training set, and eliminating the rest interference data based on similarity analysis, so that the calculated amount of the subsequent model training process is greatly reduced, and the training accuracy is improved. In addition, the embodiment of the invention optimizes the model parameters through the Q learning algorithm and the genetic algorithm, and the optimized model parameters can enable the neural network to quickly converge to find the optimal point, thereby avoiding the neural network model from sinking into local optimal, further improving the accuracy of the algorithm, reducing the calculation time of the neural network and further achieving the effect of improving the prediction accuracy and efficiency.
Fig. 3 is a block diagram of a bandwidth prediction apparatus for graphic encoding according to an embodiment of the present invention, which may include:
an obtaining module 301, configured to obtain a historical usage bandwidth data set of the graphics encoding, where the historical usage bandwidth data set includes a training set and a prediction set;
the clustering module 302 is configured to cluster the training set according to a preset clustering algorithm to obtain a plurality of clusters;
a screening module 303, configured to determine a target cluster from all clusters, and use samples in the target cluster as training data; the target cluster is a cluster in which the distance between the cluster center and the sample of the prediction set meets the maximum deviation similarity criterion;
the training module 304 is configured to optimize model parameters of the neural network model by using a Q learning algorithm and a genetic algorithm, and train the neural network model with the model parameters optimized by using the training data to obtain a target neural network model;
and a prediction module 305, configured to input samples in the prediction set into a target neural network model, and obtain a prediction result of the bandwidth used for the graphics encoding.
Optionally, the clustering module 302 includes:
The optimal parameter sub-module is used for determining optimal maximum deviation algorithm parameters according to the parameters required by the maximum deviation algorithm and the genetic algorithm;
and the clustering sub-module is used for clustering the training set by utilizing the optimal maximum deviation algorithm parameter to obtain a plurality of clustering clusters.
Optionally, the optimal parameter sub-module includes:
the construction unit is used for establishing a first population according to parameters required by a maximum deviation algorithm, wherein the first population comprises a plurality of first individuals, and each first individual corresponds to a group of maximum deviation algorithm parameters;
the first fitness calculating unit is used for calculating fitness value of each first individual in the first population and determining the first individual with the smallest fitness value in the first population;
the genetic algorithm unit is used for respectively carrying out cross mutation processing on the first population through multiple iterations based on a genetic algorithm, re-determining a first individual with the minimum fitness value in each iteration, taking the first individual with the minimum fitness value determined in the last iteration as an optimal first individual after the preset iteration times are reached, and taking the optimal first individual as an optimal maximum deviation algorithm parameter.
Optionally, the building unit includes:
a creating subunit, configured to create a first matrix, where a row of elements in the first matrix represents a first volume;
the chaotic processing subunit is used for carrying out chaotic processing on the first matrix by randomly assigning random numbers within a preset range to elements in the first matrix;
and the correction subunit is used for correcting the values of the elements in the first matrix after the chaotic processing according to the standard value range of the parameters required by the maximum deviation algorithm, and taking the corrected first matrix as the first population.
Optionally, the maximum deviation algorithm parameter includes: maximum deviation distance, similarity, degree of deviation, number of categories.
Optionally, the fitness calculating unit includes:
a clustering center subunit, configured to randomly select, for each first individual, the number of target samples of the category from the training set, and use the target samples as a first clustering center;
the matching subunit is used for calculating the distance between each sample in the training set and the first clustering center according to the maximum deviation algorithm parameter represented by the first individual, adding the samples with the distances meeting the maximum deviation similarity criterion into the first clustering clusters in the first clustering center, and obtaining the first clustering clusters with the category number;
And the fitness subunit is used for taking the accumulated value of the distance between each sample in the first cluster and the first cluster center as the fitness value of the first cluster, and taking the accumulated value of the fitness values of the first clusters with the category number as the fitness value of the first individual.
Optionally, the training module 304 includes:
the initialization submodule is used for initializing parameters of a genetic algorithm, parameters of a Q learning algorithm and model parameters of a neural network model;
the building sub-module is used for building a second population according to model parameters of the neural network model, wherein the second population comprises a plurality of second individuals, and each second individual corresponds to a group of model parameters of the neural network model;
and the selecting sub-module is used for selecting an optimal second individual from the second population according to the Q learning algorithm and the genetic algorithm, setting the neural network model by using the model parameters represented by the optimal second individual, and completing the model parameter optimization of the neural network model.
Optionally, the selecting sub-module includes:
the new population unit is used for processing the second population by utilizing a Q learning algorithm and a genetic algorithm to obtain a third population;
The second fitness calculating unit is used for calculating fitness values of second individuals in the second population and fitness values of third individuals in the third population;
the replacement unit is used for reserving second individuals with smaller fitness values in the second population by comparing the second population with the third population, and replacing the second individuals with larger fitness values in the second population with corresponding third individuals with smaller fitness values in the third population to obtain a target second population;
and the optimal individual unit is used for selecting the second individual with the smallest fitness value in the target second population as the optimal second individual.
Optionally, the new population unit includes:
an individual selection subunit, configured to process each second individual in the second population by using n preset parameter selection policies, so that corresponding n new second individuals are obtained for each second individual;
the cross mutation subunit is used for carrying out cross mutation treatment on n new second individuals according to a genetic algorithm to obtain n target second individuals;
and the Q value screening subunit is used for calculating the Q value of each target second individual according to a Q learning algorithm, and taking the target second individual with the largest Q value as a corresponding third individual in a third population to obtain the third population.
In summary, the embodiment of the invention utilizes the clustering algorithm to cluster the training set to obtain a plurality of clusters, then determines the cluster to which the prediction set data belongs based on the similarity between the prediction set data and the data in the clusters, takes the cluster highly close to the prediction set data as the training data, and screens out the rest data in the clustering result, thereby effectively screening out a small amount of accurate training data from the training set, and eliminating the rest interference data based on similarity analysis, so that the calculated amount of the subsequent model training process is greatly reduced, and the training accuracy is improved. In addition, the embodiment of the invention optimizes the model parameters through the Q learning algorithm and the genetic algorithm, and the optimized model parameters can enable the neural network to quickly converge to find the optimal point, thereby avoiding the neural network model from sinking into local optimal, further improving the accuracy of the algorithm, reducing the calculation time of the neural network and further achieving the effect of improving the prediction accuracy and efficiency.
The present invention also provides an electronic device, see fig. 4, comprising: a processor 901, a memory 902, and a computer program 9021 stored and executable on the memory, which when executed implements the method of bandwidth prediction for graphics encoding of the foregoing embodiments.
The present invention also provides a readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the method of bandwidth usage prediction for graphics encoding of the foregoing embodiments.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
It should be noted that, various information and data acquired in the embodiment of the present invention are acquired under the condition that the information/data holder is authorized.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. Furthermore, the present invention is not directed to any particular programming language. It should be appreciated that the teachings of the present invention described herein may be implemented using a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, 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 above 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 construed as reflecting the intention that: i.e., the claimed invention 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.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in a sorting device according to the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention may also be implemented as an apparatus or device program for performing part or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
The user information (including but not limited to user equipment information, user personal information, etc.), related data, etc. related to the present invention are all information authorized by the user or authorized by each party.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (12)

1. A method of bandwidth-using prediction for graphics coding, the method comprising:
Obtaining a historical usage bandwidth data set of the graphic code, wherein the historical usage bandwidth data set comprises a training set and a prediction set;
clustering the training set according to a preset clustering algorithm to obtain a plurality of clustering clusters;
determining a target cluster from all the clusters, and taking samples in the target cluster as training data; the target cluster is a cluster in which the distance between the cluster center and the sample of the prediction set meets the maximum deviation similarity criterion;
optimizing model parameters of the neural network model by using a Q learning algorithm and a genetic algorithm, and training the neural network model with the optimized model parameters by using the training data to obtain a target neural network model;
and inputting the samples in the prediction set into a target neural network model to obtain a prediction result of the use bandwidth of the graphic code.
2. The method of claim 1, wherein clustering the training set according to a preset clustering algorithm to obtain a plurality of clusters comprises:
determining optimal maximum deviation algorithm parameters according to the parameters required by the maximum deviation algorithm and the genetic algorithm;
and clustering the training set by utilizing the optimal maximum deviation algorithm parameter to obtain a plurality of clustering clusters.
3. The method of claim 2, wherein determining the optimal maximum deviation algorithm parameter based on the maximum deviation algorithm required parameter and the genetic algorithm comprises:
establishing a first population according to parameters required by a maximum deviation algorithm, wherein the first population comprises a plurality of first individuals, and each first individual corresponds to a group of maximum deviation algorithm parameters;
calculating the fitness value of each first individual in the first population, and determining the first individual with the smallest fitness value in the first population;
based on a genetic algorithm, the first population is subjected to cross mutation processing through multiple iterations, a first individual with the minimum fitness value is redetermined in each iteration, after the preset iteration times are reached, the first individual with the minimum fitness value determined in the last iteration is used as an optimal first individual, and the optimal first individual is used as an optimal maximum deviation algorithm parameter.
4. A method according to claim 3, wherein said establishing a first population based on parameters required by a maximum deviation algorithm comprises:
creating a first matrix, one row of elements in the first matrix representing a first individual;
Performing chaotic processing on the first matrix by randomly assigning random numbers within a preset range to elements in the first matrix;
and correcting the values of the elements in the first matrix after the chaotic processing according to the standard value range of the parameters required by the maximum deviation algorithm, and taking the corrected first matrix as the first population.
5. A method according to claim 3, wherein the maximum deviation algorithm parameters comprise: maximum deviation distance, similarity, degree of deviation, number of categories.
6. The method of claim 5, wherein the calculating fitness values for each first individual in the first population comprises:
randomly selecting the number of target samples of the category from the training set for each first individual, and taking the target samples as a first clustering center;
calculating the distance between each sample in the training set and the first clustering center according to the maximum deviation algorithm parameter of the first individual characterization, adding the samples with the distances meeting the maximum deviation similarity criterion into the first clustering clusters of the first clustering center, and obtaining the first clustering clusters with the category number;
And taking the accumulated value of the distance between each sample in the first cluster and the first cluster center as the fitness value of the first cluster, and taking the accumulated value of the fitness values of the first clusters of the category number as the fitness value of the first individual.
7. The method of claim 1, wherein optimizing model parameters of the neural network model using a Q learning algorithm and a genetic algorithm comprises:
initializing parameters of a genetic algorithm, parameters of a Q learning algorithm and model parameters of a neural network model;
establishing a second population according to model parameters of the neural network model, wherein the second population comprises a plurality of second individuals, and each second individual corresponds to a group of model parameters of the neural network model;
and selecting an optimal second individual from the second population according to the Q learning algorithm and the genetic algorithm, and setting the neural network model by using the model parameters represented by the optimal second individual to finish the model parameter optimization of the neural network model.
8. The method of claim 7, wherein selecting an optimal second individual from the second population according to the Q-learning algorithm and genetic algorithm comprises:
Processing the second population by using a Q learning algorithm and a genetic algorithm to obtain a third population;
calculating the fitness value of a second individual in the second population and the fitness value of a third individual in the third population;
the second individuals with smaller fitness values in the second population are reserved through comparison of the second population and the third population, and the second individuals with larger fitness values in the second population are replaced by the third individuals with smaller fitness values in the third population, so that a target second population is obtained;
and selecting the second individual with the smallest fitness value in the target second population as the optimal second individual.
9. The method of claim 8, wherein said processing said second population using a Q-learning algorithm and a genetic algorithm to obtain a third population comprises:
processing each second individual in the second population by using n preset parameter selection strategies, so that corresponding n new second individuals are obtained for each second individual;
according to a genetic algorithm, carrying out cross mutation treatment on n new second individuals to obtain n target second individuals;
and calculating the Q value of each target second individual according to a Q learning algorithm, and taking the target second individual with the largest Q value as a corresponding third individual in a third population to obtain the third population.
10. A bandwidth-used prediction apparatus for graphic encoding, the apparatus comprising:
the acquisition module is used for acquiring a historical use bandwidth data set of the graphic code, wherein the historical use bandwidth data set comprises a training set and a prediction set;
the clustering module is used for clustering the training set according to a preset clustering algorithm to obtain a plurality of clustering clusters;
the screening module is used for determining target cluster from all the cluster clusters and taking samples in the target cluster as training data; the target cluster is a cluster in which the distance between the cluster center and the sample of the prediction set meets the maximum deviation similarity criterion;
the training module is used for optimizing model parameters of the neural network model by utilizing a Q learning algorithm and a genetic algorithm, and training the neural network model with the optimized model parameters by utilizing the training data to obtain a target neural network model;
and the prediction module is used for inputting the samples in the prediction set into a target neural network model to obtain a prediction result of the use bandwidth of the graphic coding.
11. An electronic device, comprising:
a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the method according to any one of claims 1-9 when executing the program.
12. A readable storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1-9.
CN202211637752.XA 2022-12-16 2022-12-16 Method and device for predicting bandwidth used for graphic coding Pending CN116170328A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211637752.XA CN116170328A (en) 2022-12-16 2022-12-16 Method and device for predicting bandwidth used for graphic coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211637752.XA CN116170328A (en) 2022-12-16 2022-12-16 Method and device for predicting bandwidth used for graphic coding

Publications (1)

Publication Number Publication Date
CN116170328A true CN116170328A (en) 2023-05-26

Family

ID=86421080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211637752.XA Pending CN116170328A (en) 2022-12-16 2022-12-16 Method and device for predicting bandwidth used for graphic coding

Country Status (1)

Country Link
CN (1) CN116170328A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116504665A (en) * 2023-06-28 2023-07-28 全芯智造技术有限公司 CMP process prediction and prediction model training method and device and computing equipment
CN117041074A (en) * 2023-10-10 2023-11-10 联通在线信息科技有限公司 CDN bandwidth prediction method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116504665A (en) * 2023-06-28 2023-07-28 全芯智造技术有限公司 CMP process prediction and prediction model training method and device and computing equipment
CN117041074A (en) * 2023-10-10 2023-11-10 联通在线信息科技有限公司 CDN bandwidth prediction method and device, electronic equipment and storage medium
CN117041074B (en) * 2023-10-10 2024-02-27 联通在线信息科技有限公司 CDN bandwidth prediction method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN116170328A (en) Method and device for predicting bandwidth used for graphic coding
CN113905391B (en) Integrated learning network traffic prediction method, system, equipment, terminal and medium
CN112581263A (en) Credit evaluation method for optimizing generalized regression neural network based on wolf algorithm
CN112465120A (en) Fast attention neural network architecture searching method based on evolution method
Leung et al. Generating compact classifier systems using a simple artificial immune system
CN112001887B (en) Full convolution genetic neural network method for infant brain medical record image segmentation
CN116596044B (en) Power generation load prediction model training method and device based on multi-source data
CN114912673A (en) Water level prediction method based on whale optimization algorithm and long-term and short-term memory network
CN115115389A (en) Express customer loss prediction method based on value subdivision and integrated prediction
CN110796485A (en) Method and device for improving prediction precision of prediction model
CN115510963A (en) Incremental equipment fault diagnosis method
CN111832817A (en) Small world echo state network time sequence prediction method based on MCP penalty function
CN112036651A (en) Electricity price prediction method based on quantum immune optimization BP neural network algorithm
CN111353534A (en) Graph data category prediction method based on adaptive fractional order gradient
CN114241267A (en) Structural entropy sampling-based multi-target architecture search osteoporosis image identification method
CN116956160A (en) Data classification prediction method based on self-adaptive tree species algorithm
Chai et al. Correlation Analysis-Based Neural Network Self-Organizing Genetic Evolutionary Algorithm
CN116415177A (en) Classifier parameter identification method based on extreme learning machine
CN115438842A (en) Load prediction method based on adaptive improved dayflies and BP neural network
Azghani et al. Intelligent modified mean shift tracking using genetic algorithm
CN114220127B (en) Image recognition method based on gradient guided evolutionary algorithm
Kukolj et al. Data clustering using a reorganizing neural network
CN111461350B (en) Data error risk prediction method based on nonlinear integration model
Cuevas et al. An improved evolutionary algorithm for reducing the number of function evaluations
CN114912589B (en) Image identification method based on full-connection neural network optimization

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