CN116703466A - System access quantity prediction method based on improved wolf algorithm and related equipment thereof - Google Patents

System access quantity prediction method based on improved wolf algorithm and related equipment thereof Download PDF

Info

Publication number
CN116703466A
CN116703466A CN202310713976.2A CN202310713976A CN116703466A CN 116703466 A CN116703466 A CN 116703466A CN 202310713976 A CN202310713976 A CN 202310713976A CN 116703466 A CN116703466 A CN 116703466A
Authority
CN
China
Prior art keywords
training
prediction model
access
preset
test
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
CN202310713976.2A
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202310713976.2A priority Critical patent/CN116703466A/en
Publication of CN116703466A publication Critical patent/CN116703466A/en
Pending legal-status Critical Current

Links

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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application belongs to the technical field of financial science and technology, is applied to flow prediction of sales promotion, and relates to a system access amount prediction method based on an improved gray wolf algorithm and related equipment thereof; the system access amount corresponding to the target system in the latest unit time is collected and used as a prediction sample, and the system access amount in the next unit time is predicted, so that operation and maintenance personnel of a sales promotion activity are assisted to predict a high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of the system are improved.

Description

System access quantity prediction method based on improved wolf algorithm and related equipment thereof
Technical Field
The application relates to the technical field of financial science and technology, is applied to sales promotion flow prediction, in particular to a system access quantity prediction method based on an improved wolf algorithm and related equipment thereof.
Background
With the development of internet technology, the product sales mode is gradually changed from the traditional off-line channel to the on-line mode. Such online internet sales have become the largest commodity transaction channel, supporting these online sales are a wide variety of applications including APP, WEB applications, etc. The huge transaction amount brings huge examination to our background application, and the situation that the application program crashes and the traffic is influenced due to the fact that the concurrency amount is too large often occurs.
BP neural networks are the most widely used multi-layer perceptual networks at present, and are also often used for solving the prediction problem in various scenes because of their directional propagation characteristics. However, the BP neural network is easy to form a local extremum, and the algorithm convergence speed is relatively slow, so that the problem that the traditional BP neural network is easy to fall into the local extremum in predicting the access quantity of the system and cannot predict the access quantity of the target system timely and accurately exists. Therefore, when the system access amount is predicted in the prior art, the prediction cannot be timely and accurately performed, so that the prediction assistance cannot be improved for operation and maintenance personnel, and the problem of system breakdown is avoided.
Disclosure of Invention
The embodiment of the application aims to provide a system access quantity prediction method based on an improved gray wolf algorithm and related equipment thereof, so as to solve the problems that in the prior art, when the system access quantity is predicted, the prediction cannot be timely and accurately performed, the prediction assistance cannot be improved for operation and maintenance personnel, and the system breakdown is avoided.
In order to solve the technical problems, the embodiment of the application provides a system access amount prediction method based on an improved gray wolf algorithm, which adopts the following technical scheme:
a system access amount prediction method based on an improved wolf algorithm comprises the following steps:
acquiring the system access quantity of each unit time of a target system in a preset time period according to an access flow monitoring log of the target system, and constructing an initial sample;
sampling the initial sample according to a preset sampling rule, and obtaining and generating a training sample and a test sample according to a sampling result;
inputting the training sample into a pre-constructed visit amount prediction model, and performing model training to obtain a trained visit amount prediction model, wherein the visit amount prediction model is a BP neural network architecture model based on an improved gray wolf algorithm;
Inputting the test sample into the trained visit amount prediction model to obtain a visit amount measurement result;
performing secondary optimization on the trained visit amount prediction model by adopting an error back propagation algorithm of the BP neural network according to the visit amount test result to obtain a final visit amount prediction model;
and acquiring the system access quantity corresponding to the target system in the latest unit time, taking the system access quantity as a prediction sample, and predicting the access quantity of the target system based on the prediction sample and the final access quantity prediction model.
Further, the access flow monitoring log records the system access amount of the target system at each unit time, and the step of obtaining the system access amount of the target system at each unit time within a preset time period and constructing an initial sample specifically includes:
according to the access flow monitoring log, counting the system access amount of each unit time in the preset time period, wherein the unit time can be a preset specific time interval;
and acquiring and caching the statistical result into a preset ordered set in a time increment mode to complete the construction of the initial sample.
Further, the training sample includes a training set data set and a training expected data set, the test sample includes a testing set data set and a testing expected data set, the step of sampling the initial sample according to a preset sampling rule, obtaining and generating a training sample and a test sample according to a sampling result specifically includes:
step A, according to the sequence of a preset sampling step length and element subscripts from small to large, starting with an element subscript 1, collecting i groups of training data and i training expected data from the ordered set, wherein the preset sampling step length is N, and N is a positive integer which is preset to be more than 1;
step B, according to the acquisition sequence, the i groups of training data are arranged to obtain a training group data set, and the i training expected data are arranged to obtain a training expected data set;
step C, carrying out normalization processing on each group of training data in the training group data set according to a preset normalization processing formula to obtain a normalization processing result;
step D, after the step A is executed, acquiring a first element which is not acquired in the ordered set, and acquiring an element index of the first element, and marking the element index as a target index;
Step E, collecting j groups of test data and j test expected data from the ordered set according to the sequence from small to large of the sampling step length and the element subscript, starting with the target subscript;
and F, similarly, referring to the step B, obtaining a test group data set and a test expected data set.
Further, before performing the step of inputting the training samples into a pre-constructed access amount prediction model, the method further comprises:
introducing an adaptive convergence factor and searching and updating inertial weight, and improving an original gray wolf algorithm to obtain an improved gray wolf algorithm, wherein the specific implementation mode is as follows:
for the original wolf algorithm, its behavior is expressed as: d= | C.X P (t)-X(t)|,X(t+1)=X P (t) -A.D, wherein D is the distance between the individual wolf and the prey, t is the current iteration number, X p (t) is the position vector of the prey in t iterations, X (t) is the position vector of the individual gray wolves in t iterations, A and C are coefficient vectors, A=2a (r) 1 -1),C=2r 2 Wherein r is 1 And r 2 Is a random vector between (0, 1); a is a convergence factor, linearly decreasing between (2, 0);
by modifying the convergence factor a such that the convergence factorThereby improving the coefficient vector A to obtain A * Wherein a is max Is the maximum value of convergence factor, t max The maximum iteration number;
improving position vector X of prey in t iterations P (t) obtainingWherein (1)>Updating inertial weights for the search;
the improved gray wolf algorithm is as follows: x (t+1) =x P (t) * -A * D, Wherein (1)>Represents the maximum value of the search update inertia weight, +.>Representing a minimum value of the search update inertia weight;
and acquiring the improved gray wolf algorithm, and deploying the improved gray wolf algorithm as an optimal model screening algorithm into a BP neural network architecture to complete the pre-construction of the access quantity prediction model.
Further, the step of performing model training to obtain a trained access quantity prediction model specifically includes:
step a, acquiring a preset initialization BP weight and a preset threshold value, and deploying the initialization BP weight and the preset threshold value to a pre-constructed access quantity prediction model;
b, inputting normalization processing results corresponding to all sets of training data in the training set data set into the initialized access quantity prediction model, and iterating by adopting the improved wolf algorithm to obtain an actual prediction data set after the iterative processing;
step c, screening out BP weight and threshold when the fitness value is maximum after the iteration according to the actual prediction data set, the training expected data set and a preset fitness calculation formula;
D, reassigning the BP weight and the threshold value when the fitness value is the maximum value after the iteration to the pre-constructed access quantity prediction model, and repeatedly executing the steps b to d until an iteration termination condition is met, and acquiring the BP weight and the threshold value when the fitness value is the maximum value when the iteration is completed, wherein the iteration termination condition comprises that the preset maximum iteration times are reached or the fitness value meets a preset error range;
and e, setting the BP weight and the threshold value when the fitness value is the maximum value when iteration is completed as the BP weight and the threshold value of the pre-constructed access quantity prediction model, and obtaining the trained access quantity prediction model.
Further, the step of calculating the BP weight and the threshold when the fitness value is the maximum value after the current iteration according to the actual prediction data set, the training expected data set and a preset fitness calculation formula specifically includes:
according to a preset fitness calculation formula:calculating the fitness value of each group of training data after the iteration, wherein L is a constant coefficient; n is the node number, i.e. the number of groups of training data in the input layer, Y i The actual output value of the node i; z is Z i Is the desired output value;
Screening target group training data when the fitness value is the maximum value from the training group data set;
and when the training data of the target group is predicted, the BP weight and the threshold value of the corresponding BP neural grid neuron nodes of each layer are used as the BP weight and the threshold value when the fitness value is the maximum value after the iteration.
Further, the step of inputting the test sample into the trained visit amount prediction model to obtain a visit amount test result specifically includes:
acquiring the test group data set, inputting the test group data set into the trained visit amount prediction model, acquiring test data corresponding to each group of test data in the test group data set, and constructing a test data set as the visit amount test result;
and performing secondary optimization on the trained visit amount prediction model by adopting an error back propagation algorithm of the BP neural network according to the visit amount test result to obtain a final visit amount prediction model, wherein the method specifically comprises the following steps of:
and obtaining the access amount test result, and performing secondary optimization on the trained access amount prediction model according to an error back propagation algorithm of the BP neural network and the test expected data set to obtain the final access amount prediction model.
Further, after executing the step of obtaining the system access amount corresponding to the target system in the latest unit time, and taking the system access amount as a prediction sample, and predicting the access amount of the target system based on the prediction sample and the final access amount prediction model, the method further includes:
obtaining an access quantity prediction result;
identifying whether the access quantity prediction result meets the alarm requirement according to a preset access quantity alarm threshold;
if the access quantity predicted result exceeds a preset access quantity alarm threshold, sending the access quantity predicted result to a preset access quantity monitoring terminal for alarm processing;
and if the access quantity prediction result does not exceed the preset access quantity alarm threshold value, not performing alarm processing.
In order to solve the technical problems, the embodiment of the application also provides a system access quantity prediction device based on an improved wolf algorithm, which adopts the following technical scheme:
a system access amount prediction device based on an improved wolf algorithm, comprising:
the initial sample acquisition module is used for acquiring the system access quantity of each unit time of the target system in a preset time period according to the access flow monitoring log of the target system, and constructing an initial sample;
The sampling processing module is used for sampling the initial sample according to a preset sampling rule, and obtaining and generating a training sample and a test sample according to a sampling result;
the prediction model training module is used for inputting the training sample into a pre-constructed visit amount prediction model to perform model training to obtain a trained visit amount prediction model, wherein the visit amount prediction model is a BP neural network architecture model based on an improved gray wolf algorithm;
the prediction model test module is used for inputting the test sample into the trained visit amount prediction model to obtain a visit amount measurement result;
the prediction model tuning module is used for performing secondary tuning on the trained visit amount prediction model by adopting an error back propagation algorithm of the BP neural network according to the visit amount test result to obtain a final visit amount prediction model;
and the access quantity prediction module is used for acquiring the system access quantity corresponding to the target system in the latest unit time, taking the system access quantity as a prediction sample, and predicting the access quantity of the target system based on the prediction sample and the final access quantity prediction model.
In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical schemes:
A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the improved gray wolf algorithm based system access prediction method described above.
In order to solve the above technical problems, an embodiment of the present application further provides a computer readable storage medium, which adopts the following technical schemes:
a computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of a system access prediction method based on the modified wolf algorithm as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
according to the system access quantity prediction method based on the improved wolf algorithm, the access quantity of the target system corresponding to the target system in the latest unit time is obtained, the access quantity of the target system is predicted based on the final access quantity prediction model, the improved wolf algorithm is obtained by introducing the self-adaptive convergence factor and searching and updating the inertia weight, the convergence iteration efficiency of the access quantity prediction model is improved, and the training time of the access quantity prediction model is shortened to a certain extent; and the system access quantity corresponding to the target system in the latest unit time is collected and used as a prediction sample to predict the system access quantity in the next unit time, so that operation and maintenance personnel are assisted to predict a high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of the system are improved.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for the description of the embodiments of the present application, it being apparent that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without the exercise of inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a method for predicting system access based on an improved wolf algorithm in accordance with the present application;
FIG. 3 is a flow chart of one embodiment of step 201 of FIG. 2;
FIG. 4 is a flow chart of one embodiment of step 202 of FIG. 2;
FIG. 5 is a flow chart of one particular embodiment of training an access prediction model according to an embodiment of the present application;
FIG. 6 is a schematic diagram of one embodiment of a system access amount prediction apparatus based on an improved wolf algorithm in accordance with the present application;
FIG. 7 is a schematic diagram of an embodiment of a computer device in accordance with the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to make the person skilled in the art better understand the solution of the present application, the technical solution of the embodiment of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture ExpertsGroup Audio LayerIII, dynamic video expert compression standard audio plane 3), MP4 (Moving PictureExperts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the system access amount prediction method based on the improved wolf algorithm provided by the embodiment of the application is generally executed by a server/terminal device, and correspondingly, the system access amount prediction device based on the improved wolf algorithm is generally arranged in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of a method for predicting system access based on the modified gray wolf algorithm in accordance with the present application is shown. The system access quantity prediction method based on the improved wolf algorithm comprises the following steps:
Step 201, according to the access flow monitoring log of the target system, acquiring the system access amount of each unit time of the target system in a preset time period, and constructing an initial sample.
In this embodiment, the target system includes a sales promotion online activity scene newly developed by the e-commerce platform for commodity sales promotion, for example, a coupon online issue scene, a payment discount sales promotion scene, and the like.
In this embodiment, the access flow includes total data flow of transaction data or payment data or service data or purchase data that are highly concurrent by the e-commerce platform at the same time. And the transaction data are stored in a transaction pool corresponding to the service node.
In this embodiment, the access flow monitoring log records the system access amount of the target system at each unit time. The unit time is a preset time interval value, such as daily, one hour, one minute, 30 seconds, etc. The method aims to quantitatively process the continuous system access quantity, and the access quantity of the target system is quantitatively processed through unit time, so that operation and maintenance personnel can monitor and analyze conveniently.
With continued reference to fig. 3, fig. 3 is a flow chart of one embodiment of step 201 of fig. 2, comprising:
Step 301, counting the system access amount of each unit time in the preset time period according to the access flow monitoring log, wherein the unit time can be a preset specific time interval;
step 302, obtaining and caching the statistical result into a preset ordered set in a time increment mode, and completing the construction of the initial sample.
And counting the system access amount of each unit time in the preset time period, and caching the system access amount into a preset ordered set in a time increment mode, wherein the ordered set is adopted instead of an unordered set, so that the system access amount of different unit times can be conveniently subjected to post sampling according to the sequence of the access times. Meanwhile, the ordered collection is adopted instead of array storage, so that the boundary problem during array storage is avoided, the capacity expansion operation on the array is reduced, and the method and the device are more in line with the advance unknown of the number of collection elements during collection of the system access.
Step 202, sampling the initial sample according to a preset sampling rule, and obtaining and generating a training sample and a test sample according to a sampling result.
With continued reference to FIG. 4, FIG. 4 is a flow chart of one embodiment of step 202 of FIG. 2, including:
Step 401, according to a preset sampling step length and an element subscript sequence from small to large, starting with an element subscript 1, collecting i groups of training data and i training expected data from the ordered set, wherein the preset sampling step length is N, and N is a positive integer which is preset to be larger than 1;
assuming that the unit time is one day, the sampling step length is 7 days, namely seven elements with the subscripts of 1 to 7 are acquired from the ordered set, the first 6 elements are acquired to be constructed into a group of training data, the 7 th element is acquired to be used as training expected data, namely, in a period of one acquisition step length, the system access amount of the 7 th day is trained according to the system access amount of the first 6 days, and according to the training output result, the comparison is carried out with the training expected data, and whether the model is trained is completed is checked.
Through the mode, i groups of training data and i pieces of training expected data are collected, the training data and the training expected data are enriched, meanwhile, the visit amount of a target system is only used as a characteristic factor, and model training complexity caused by multiple characteristic factors is reduced.
Step 402, sorting the i sets of training data according to the acquisition sequence to obtain a training set data set, and sorting the i training expected data to obtain a training expected data set;
Continuing to refer to the above example, assuming i=5, a training set data set is obtained by sorting the training data of the 5 sets, a training set eigenvalue matrix of 6 rows and 5 columns is constructed in a unit of a set, and at the same time, a training expected data set of 1 row and 5 columns is also constructed as training output expected data.
Step 403, performing normalization processing on each group of training data in the training group data set according to a preset normalization processing formula to obtain a normalization processing result;
in this embodiment, the step of normalizing each set of training data in the training set of data sets according to a preset normalization processing formula to obtain a normalization processing result specifically includes: according to a preset normalization processing formula:normalizing each group of training data in the training group data set, wherein x is each original data in the current group of training data, and x is min X is the smallest data in the current set of training data max And m is the normalization result corresponding to the training data x in the current group.
And carrying out normalization processing on each group of training data in the training group data set, namely carrying out normalization processing on each row of data in the training group eigenvalue matrix, so that the model is convenient to train, and the eigenvalue weight of each group is obtained.
Step 404, after the step 401 is performed, acquiring a first element which is not acquired in the ordered set, and acquiring an element index thereof, and marking the element index as a target index;
step 405, according to the sequence from small to large of the sampling step length and the element index, starting with the target index, collecting j groups of test data and j test expected data from the ordered set;
step 406, and similarly, with reference to step 402, a test group data set and a test expected data set are obtained.
By adopting the same sampling step length and sampling construction mode, the test group data set and the test expected data set are obtained, so that the output test of a prediction model which is completed by later training is facilitated, and as the characteristic value weight of the model is obtained by training, normalization processing of test data is not needed, and the similarity relation or consistency relation between the test output result and the test expected data set can be verified by calculating the optimal model which is completed by training and the test data and combining the characteristic value weight, so that whether the test model is completed by training or not is verified.
And 203, inputting the training sample into a pre-constructed visit amount prediction model, and performing model training to obtain a trained visit amount prediction model, wherein the visit amount prediction model is a BP neural network architecture model based on an improved gray wolf algorithm.
In this embodiment, before performing the step of inputting the training samples into the pre-constructed access amount prediction model, the method further includes: introducing an adaptive convergence factor and searching and updating inertial weight, and improving an original gray wolf algorithm to obtain an improved gray wolf algorithm, wherein the specific implementation mode is as follows: for the original wolf algorithm, its behavior is expressed as: d= | C.X P (t)-X(t)|,X(t+1)=X P (t) -A.D, wherein D is the distance between the individual wolf and the prey, t is the current iteration number, X p (t) is the position vector of the prey in t iterations, X (t) is the position vector of the individual gray wolves in t iterations, A and C are coefficient vectors, A=2a (r) 1 -1),C=2r 2 Wherein r is 1 And r 2 Is a random vector between (0, 1); a is a convergence factor, linearly decreasing between (2, 0); by modifying the convergence factor a such that the convergence factorThereby improving the coefficient vector A to obtain A * Wherein a is max Is the maximum value of convergence factor, t max The maximum iteration number; improving position vector X of prey in t iterations P (t) obtaining->Wherein (1)>Updating inertial weights for the search; the improved gray wolf algorithm is as follows: x (t+1) =x P (t) * -A * D,/>Wherein (1)>Represents the maximum value of the search update inertia weight, +.>Representing a minimum value of the search update inertia weight; and acquiring the improved gray wolf algorithm, and deploying the improved gray wolf algorithm as an optimal model screening algorithm into a BP neural network architecture to complete the pre-construction of the access quantity prediction model.
The self-adaptive convergence factor and the search update inertia weight are introduced to improve the original gray wolf algorithm, so that the improved gray wolf algorithm is obtained, and the defect that the original gray wolf algorithm can only linearly decrease due to the convergence factor a and cannot distinguish global search and local search well is overcome; through improving the change rate of the convergence factor a, the value of the convergence factor is reduced in a nonlinear way along with the increase of the iteration times, namely the convergence early stage is reduced faster, the searching range is wider, and a plurality of potential extremum values can be found more rapidly when global searching is carried out; with the increase of iteration times, the search range is smaller in the later convergence period, and when local search is performed, a plurality of potential extremums can be found more comprehensively, so that the convergence speed of the access quantity prediction model is ensured, the number of the search extremums of the access quantity prediction model is also ensured, and the optimal solution is searched as far as possible.
Meanwhile, in order to ensure that the gray wolf algorithm has the ability of jumping out of a local extremum when the position is updated, a search update inertia weight is introduced, and the search update inertia weight is linearly decreased. When the searching update inertia weight is set larger, the risk of the algorithm falling into a local extremum can be reduced; when the search updating inertia weight is set smaller, the search precision of the algorithm can be improved, unnecessary iterative processes are reduced, the calculation efficiency of the algorithm is improved, namely the convergence iteration efficiency of the access quantity prediction model is improved, and the training time of the access quantity prediction model is reduced to a certain extent.
With continued reference to fig. 5 after introducing the modified wolf algorithm into the pre-constructed visit volume prediction model, fig. 5 shows a flowchart of one specific embodiment of training the visit volume prediction model in this embodiment, comprising:
step 501, acquiring a preset initialization BP weight and a preset threshold, and deploying the initialization BP weight and the preset threshold to a pre-constructed access quantity prediction model;
in this embodiment, since the BP neural network includes a multi-layer network structure, the initial BP weight is a weight matrix set according to the number of nodes of each layer of network structure and the number of layers of the network structure, and it is assumed that the BP neural network has three layers of input layer, hidden layer, and output layer, where the number of sets of training set data sets to be input into the BP neural network is 3, at this time, the number of nodes of the input layer is set to s=3, the number of nodes of the input layer is the same as the number of sets in the training set data set, and the hidden layer is 2s+1 nodes, and the output layer is fixedly set with 1 node, that is, the final output value of the model, or the predicted value of the system access amount.
Step 502, inputting normalization processing results corresponding to all sets of training data in the training set data set into the initialized access amount prediction model, and iterating by adopting the improved wolf algorithm to obtain an actual prediction data set after the iteration processing;
Step 503, screening out the BP weight and threshold when the fitness value is the maximum value after the current iteration according to the actual prediction data set, the training expected data set and a preset fitness calculation formula;
in this embodiment, the step of calculating the BP weight and the threshold when the fitness value is the maximum value after the current iteration according to the actual predicted data set, the training expected data set, and a preset fitness calculation formula specifically includes: according to a preset fitness calculation formula: calculating the fitness value of each group of training data after the iteration, wherein L is a constant coefficient; n is the node number, i.e. the number of groups of training data in the input layer, Y i The actual output value of the node i; z is Z i The expected output value of the node i is the expected output value, namely the data in the training expected data set; screening target group training data when the fitness value is the maximum value from the training group data set; and when the training data of the target group is predicted, the BP weight and the threshold value of the corresponding BP neural grid neuron nodes of each layer are used as the BP weight and the threshold value when the fitness value is the maximum value after the iteration.
Step 504, reassigning the BP weight and the threshold value when the fitness value is the maximum value after the iteration to the pre-constructed access quantity prediction model, and repeatedly executing the steps 502 to 504 until the iteration termination condition is met, so as to obtain the BP weight and the threshold value when the fitness value is the maximum value when the iteration is completed;
In this embodiment, the iteration termination condition includes reaching a preset maximum iteration number or an adaptability value to meet a preset error range.
And 505, setting BP weight and threshold when the fitness value is maximum when iteration is completed as BP weight and threshold of the pre-constructed access quantity prediction model, and obtaining the trained access quantity prediction model.
By adopting the improved wolf algorithm to carry out the visit quantity prediction model training, the model convergence speed is improved, the prediction model is beneficial to quickly training out the optimal weight, and the defects that the BP network is easy to sink into local optimal and the convergence speed is slow in the prediction model training process are overcome.
And 204, inputting the test sample into the trained visit amount prediction model to obtain a visit amount test result.
In this embodiment, the step of inputting the test sample into the trained visit amount prediction model to obtain a visit amount test result specifically includes: and acquiring the test group data set, inputting the test group data set into the trained visit amount prediction model, acquiring test data corresponding to each group of test data in the test group data set, and constructing a test data set as the visit amount test result.
And 205, performing secondary optimization on the trained visit amount prediction model by adopting an error back propagation algorithm of the BP neural network according to the visit amount test result to obtain a final visit amount prediction model.
In this embodiment, the step of performing secondary optimization on the trained access amount prediction model by using an error back propagation algorithm of a BP neural network according to the access amount test result to obtain a final access amount prediction model specifically includes: and obtaining the access amount test result, and performing secondary optimization on the trained access amount prediction model according to an error back propagation algorithm of the BP neural network and the test expected data set to obtain the final access amount prediction model.
And through the test group data set and the test expected data set, adopting an error back propagation algorithm of the BP neural network to moderately secondarily tune the access quantity prediction model trained in the previous step, and further ensuring high availability and prediction accuracy of the access quantity prediction model.
And 206, acquiring the system access quantity corresponding to the target system in the latest unit time, taking the system access quantity as a prediction sample, and predicting the access quantity of the target system based on the prediction sample and the final access quantity prediction model.
In this embodiment, after the step of obtaining, as a prediction sample, the system access amount corresponding to the target system in the latest unit time, and predicting the access amount of the target system based on the prediction sample and the final access amount prediction model, the method further includes: obtaining an access quantity prediction result; identifying whether the access quantity prediction result meets the alarm requirement according to a preset access quantity alarm threshold; if the access quantity predicted result exceeds a preset access quantity alarm threshold, sending the access quantity predicted result to a preset access quantity monitoring terminal for alarm processing; and if the access quantity prediction result does not exceed the preset access quantity alarm threshold value, not performing alarm processing.
And the system access quantity corresponding to the target system in the latest unit time is collected and used as a prediction sample to predict the system access quantity in the next unit time, so that operation and maintenance personnel are assisted to predict a high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of the system are improved.
According to the application, the access quantity of the target system is predicted based on the final access quantity prediction model by acquiring the system access quantity corresponding to the target system in the latest unit time, and the improved gray wolf algorithm is obtained by introducing the self-adaptive convergence factor and searching and updating the inertia weight, so that the convergence iteration efficiency of the access quantity prediction model is improved, and the training time of the access quantity prediction model is reduced to a certain extent; and the system access quantity corresponding to the target system in the latest unit time is collected and used as a prediction sample to predict the system access quantity in the next unit time, so that operation and maintenance personnel are assisted to predict a high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of the system are improved.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
In the embodiment of the application, the access quantity of the target system is predicted based on the final access quantity prediction model by acquiring the system access quantity corresponding to the target system in the latest unit time, and the improved gray wolf algorithm is obtained by introducing the self-adaptive convergence factor and searching and updating the inertia weight, so that the convergence iteration efficiency of the access quantity prediction model is improved, and the training time of the access quantity prediction model is reduced to a certain extent; and the system access quantity corresponding to the target system in the latest unit time is collected and used as a prediction sample to predict the system access quantity in the next unit time, so that operation and maintenance personnel are assisted to predict a high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of the system are improved.
With further reference to fig. 6, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a system access amount prediction apparatus based on an improved wolf algorithm, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 6, the system access amount prediction apparatus 600 based on the modified wolf algorithm according to the present embodiment includes: an initial sample acquisition module 601, a sampling processing module 602, a prediction model training module 603, a prediction model testing module 604, a prediction model tuning module 605 and an access amount prediction module 606. Wherein:
the initial sample acquisition module 601 is configured to acquire a system access amount of each unit time of a target system in a preset time period according to an access flow monitoring log of the target system, and construct an initial sample;
the sampling processing module 602 is configured to sample the initial sample according to a preset sampling rule, obtain and generate a training sample and a test sample according to a sampling result;
the prediction model training module 603 is configured to input the training sample into a pre-constructed access amount prediction model, perform model training, and obtain a trained access amount prediction model, where the access amount prediction model is a BP neural network architecture model based on an improved wolf algorithm;
A prediction model testing module 604, configured to input the test sample into the trained visit amount prediction model, and obtain a visit amount measurement result;
the prediction model tuning module 605 is configured to perform secondary tuning on the trained access amount prediction model by using an error back propagation algorithm of a BP neural network according to the access amount measurement result, so as to obtain a final access amount prediction model;
and the access amount prediction module 606 is configured to obtain, as a prediction sample, a system access amount corresponding to the target system in the latest unit time, and predict the access amount of the target system based on the prediction sample and the final access amount prediction model.
In some embodiments of the present application, the system access amount prediction device 600 based on the improved wolf algorithm further includes an algorithm optimization improvement module, where the algorithm optimization improvement module is configured to introduce an adaptive convergence factor and a search update inertia weight, improve the original wolf algorithm, and obtain the improved wolf algorithm, where a specific implementation manner is: for the original wolf algorithm, its behavior is expressed as: d= | C.X P (t)-X(t)|,X(t+1)=X P (t) -A.D, wherein D is the distance between the individual wolf and the prey, t is the current iteration number, X p (t) is the position vector of the prey in t iterations, X (t) is the position vector of the individual gray wolves in t iterations, A and C are coefficient vectors, A=2a (r) 1 -1),C=2r 2 Wherein r is 1 And r 2 Is a random vector between (0, 1); a is a convergence factor, linearly decreasing between (2, 0); by modifying the convergence factor a such that the convergence factorThereby improving the coefficient vector A to obtain A * Wherein a is max Is the maximum value of convergence factor, t max The maximum iteration number; improving position vector X of prey in t iterations P (t) obtaining->Wherein (1)>Updating inertial weights for the search; the improved gray wolf algorithm is as follows: x (t+1) =x P (t) * -A * D,/>Wherein (1)>Represents the maximum value of the search update inertia weight, +.>Representing a minimum value of the search update inertia weight; and acquiring the improved gray wolf algorithm, and deploying the improved gray wolf algorithm as an optimal model screening algorithm into a BP neural network architecture to complete the pre-construction of the access quantity prediction model.
In some embodiments of the present application, the system access amount prediction apparatus 600 based on the modified wolf algorithm further includes a fitness value calculation module, where the fitness value calculation module is configured to calculate a formula according to a preset fitness value:calculating the fitness value of each group of training data after the iteration, wherein L is a constant coefficient; n is the node number, i.e. the number of groups of training data in the input layer, Y i The actual output value of the node i; z is Z i Is the expected output value of node i; the target group training data when the fitness value is the maximum value is screened out from the training group data set; and the BP weight and the threshold value of the corresponding BP neural grid neuron nodes of each layer are used as the BP weight and the threshold value when the fitness value is the maximum value after the iteration when the training data of the target group is predicted.
In some embodiments of the present application, the system access amount prediction device 600 based on the improved wolf algorithm further includes an access amount alarm prompt module, where the access amount alarm prompt module is configured to obtain an access amount prediction result; the method is also used for identifying whether the access quantity prediction result meets the alarm requirement or not according to a preset access quantity alarm threshold value; the access quantity prediction result is used for sending the access quantity prediction result to a preset access quantity monitoring terminal for alarm processing if the access quantity prediction result exceeds a preset access quantity alarm threshold; and if the access quantity prediction result does not exceed the preset access quantity alarm threshold value, not performing alarm processing.
According to the application, the access quantity of the target system is predicted based on the final access quantity prediction model by acquiring the system access quantity corresponding to the target system in the latest unit time, and the improved gray wolf algorithm is obtained by introducing the self-adaptive convergence factor and searching and updating the inertia weight, so that the convergence iteration efficiency of the access quantity prediction model is improved, and the training time of the access quantity prediction model is reduced to a certain extent; by predicting the system access amount in the next unit time, operation and maintenance personnel are assisted to predict the high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of a system are improved.
Those skilled in the art will appreciate that implementing all or part of the above described embodiment methods may be accomplished by computer readable instructions, stored on a computer readable storage medium, that the program when executed may comprise the steps of embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 7, fig. 7 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 7 comprises a memory 7a, a processor 7b, a network interface 7c communicatively connected to each other via a system bus. It should be noted that only a computer device 7 having components 7a-7c is shown in the figures, but it should be understood that not all of the illustrated components need be implemented, and that more or fewer components may alternatively be implemented. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 7a includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 7a may be an internal storage unit of the computer device 7, such as a hard disk or a memory of the computer device 7. In other embodiments, the memory 7a may also be an external storage device of the computer device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 7. Of course, the memory 7a may also comprise both an internal memory unit of the computer device 7 and an external memory device. In this embodiment, the memory 7a is typically used to store an operating system and various types of application software installed on the computer device 7, such as computer readable instructions for a system access prediction method based on an improved gray wolf algorithm. Further, the memory 7a may be used to temporarily store various types of data that have been output or are to be output.
The processor 7b may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 7b is typically used to control the overall operation of the computer device 7. In this embodiment, the processor 7b is configured to execute computer readable instructions stored in the memory 7a or process data, such as computer readable instructions for executing the improved wolf algorithm based system access prediction method.
The network interface 7c may comprise a wireless network interface or a wired network interface, which network interface 7c is typically used for establishing a communication connection between the computer device 7 and other electronic devices.
The computer equipment provided by the embodiment belongs to the technical field of financial science and technology, and is applied to promotion flow prediction. According to the application, the access quantity of the target system is predicted based on the final access quantity prediction model by acquiring the system access quantity corresponding to the target system in the latest unit time, and the improved gray wolf algorithm is obtained by introducing the self-adaptive convergence factor and searching and updating the inertia weight, so that the convergence iteration efficiency of the access quantity prediction model is improved, and the training time of the access quantity prediction model is reduced to a certain extent; and the system access quantity corresponding to the target system in the latest unit time is collected and used as a prediction sample to predict the system access quantity in the next unit time, so that operation and maintenance personnel are assisted to predict a high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of the system are improved.
The present application also provides another embodiment, namely, a computer readable storage medium storing computer readable instructions executable by a processor to cause the processor to perform the steps of the system access prediction method based on the improved gray wolf algorithm as described above.
The computer readable storage medium provided by the embodiment belongs to the technical field of financial science and technology, and is applied to promotion flow prediction. According to the application, the access quantity of the target system is predicted based on the final access quantity prediction model by acquiring the system access quantity corresponding to the target system in the latest unit time, and the improved gray wolf algorithm is obtained by introducing the self-adaptive convergence factor and searching and updating the inertia weight, so that the convergence iteration efficiency of the access quantity prediction model is improved, and the training time of the access quantity prediction model is reduced to a certain extent; meanwhile, the system access amount in the next unit time is predicted, so that operation and maintenance personnel are assisted to predict a high-concurrency application scene early, timely adjustment is performed, the cost of an enterprise in the aspect of system maintenance is reduced, system breakdown is reduced, and the stability and the service life of a system are improved.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (11)

1. The system access amount prediction method based on the improved wolf algorithm is characterized by comprising the following steps of:
acquiring the system access quantity of each unit time of a target system in a preset time period according to an access flow monitoring log of the target system, and constructing an initial sample;
sampling the initial sample according to a preset sampling rule, and obtaining and generating a training sample and a test sample according to a sampling result;
inputting the training sample into a pre-constructed visit amount prediction model, and performing model training to obtain a trained visit amount prediction model, wherein the visit amount prediction model is a BP neural network architecture model based on an improved gray wolf algorithm;
inputting the test sample into the trained visit amount prediction model to obtain a visit amount measurement result;
performing secondary optimization on the trained visit amount prediction model by adopting an error back propagation algorithm of the BP neural network according to the visit amount test result to obtain a final visit amount prediction model;
and acquiring the system access quantity corresponding to the target system in the latest unit time, taking the system access quantity as a prediction sample, and predicting the access quantity of the target system based on the prediction sample and the final access quantity prediction model.
2. The method for predicting system access amount based on the improved wolf algorithm as set forth in claim 1, wherein the access flow monitoring log records the system access amount of the target system at each unit time, and the step of obtaining the system access amount of the target system at each unit time within a preset time period and constructing an initial sample specifically includes:
according to the access flow monitoring log, counting the system access amount of each unit time in the preset time period, wherein the unit time can be a preset specific time interval;
and acquiring and caching the statistical result into a preset ordered set in a time increment mode to complete the construction of the initial sample.
3. The method for predicting the system access amount based on the improved wolf algorithm as set forth in claim 2, wherein the training samples include a training group data set and a training expected data set, the test samples include a test group data set and a test expected data set, and the steps of sampling the initial samples according to a preset sampling rule, obtaining and generating training samples and test samples according to the sampling result include:
Step A, according to the sequence of a preset sampling step length and element subscripts from small to large, starting with an element subscript 1, collecting i groups of training data and i training expected data from the ordered set, wherein the preset sampling step length is N, and N is a positive integer which is preset to be more than 1;
step B, according to the acquisition sequence, the i groups of training data are arranged to obtain a training group data set, and the i training expected data are arranged to obtain a training expected data set;
step C, carrying out normalization processing on each group of training data in the training group data set according to a preset normalization processing formula to obtain a normalization processing result;
step D, after the step A is executed, acquiring a first element which is not acquired in the ordered set, and acquiring an element index of the first element, and marking the element index as a target index;
step E, collecting j groups of test data and j test expected data from the ordered set according to the sequence from small to large of the sampling step length and the element subscript, starting with the target subscript;
and F, similarly, referring to the step B, obtaining a test group data set and a test expected data set.
4. The improved gray wolf algorithm based system visit amount prediction method of claim 3, wherein prior to performing the step of inputting the training samples into a pre-constructed visit amount prediction model, the method further comprises:
Introducing an adaptive convergence factor and searching and updating inertial weight, and improving an original gray wolf algorithm to obtain an improved gray wolf algorithm, wherein the specific implementation mode is as follows:
for the original wolf algorithm, its behavior is expressed as: d= | C.X P (t)-(t)|,X(t+1)=X P (t) -. D, wherein D is the distance between the individual wolf and the prey, t is the current iteration number, X p () For the position vector of the prey at t iterations, X (t) is the position vector of the gray wolf individual at t iterations, a and C are coefficient vectors, a=2a (r 1 -1),C=2r 2 Wherein r is 1 And r 2 Is a random vector between (0, 1); a is a convergence factor, linearly decreasing between (2, 0);
by modifying the convergence factor a such that the convergence factorThereby improving the coefficient vector A to obtain A * Wherein a is max Is the most convergent factorLarge value, t max The maximum iteration number;
improving position vector X of prey in t iterations P (t) obtainingWherein (1)>Updating inertial weights for the search;
the improved gray wolf algorithm is as follows: x (t+1) =x P (t) * -A * D, Wherein (1)>Represents the maximum value of the search update inertia weight, +.>Representing a minimum value of the search update inertia weight;
and acquiring the improved gray wolf algorithm, and deploying the improved gray wolf algorithm as an optimal model screening algorithm into a BP neural network architecture to complete the pre-construction of the access quantity prediction model.
5. The method for predicting the system visit amount based on the improved wolf algorithm of claim 4, wherein the step of performing model training to obtain a trained visit amount prediction model comprises the following steps:
step a, acquiring a preset initialization BP weight and a preset threshold value, and deploying the initialization BP weight and the preset threshold value to a pre-constructed access quantity prediction model;
b, inputting normalization processing results corresponding to all sets of training data in the training set data set into the initialized access quantity prediction model, and iterating by adopting the improved wolf algorithm to obtain an actual prediction data set after the iterative processing;
step c, screening out BP weight and threshold when the fitness value is maximum after the iteration according to the actual prediction data set, the training expected data set and a preset fitness calculation formula;
d, reassigning the BP weight and the threshold value when the fitness value is the maximum value after the iteration to the pre-constructed access quantity prediction model, and repeatedly executing the steps b to d until an iteration termination condition is met, and acquiring the BP weight and the threshold value when the fitness value is the maximum value when the iteration is completed, wherein the iteration termination condition comprises that the preset maximum iteration times are reached or the fitness value meets a preset error range;
And e, setting the BP weight and the threshold value when the fitness value is the maximum value when iteration is completed as the BP weight and the threshold value of the pre-constructed access quantity prediction model, and obtaining the trained access quantity prediction model.
6. The method for predicting system access based on the improved wolf algorithm as set forth in claim 5, wherein the step of calculating the BP weight and the threshold when the fitness value is the maximum value after the current iteration according to the actual prediction data set, the training expected data set and a preset fitness calculation formula specifically includes:
according to a preset fitness calculation formula:calculating the fitness value of each group of training data after the iteration, wherein L is a constant coefficient; n is the node number, i.e. the number of groups of training data in the input layer, Y i The actual output value of the node i; z is Z i Is the desired output value;
screening target group training data when the fitness value is the maximum value from the training group data set;
and when the training data of the target group is predicted, the BP weight and the threshold value of the corresponding BP neural grid neuron nodes of each layer are used as the BP weight and the threshold value when the fitness value is the maximum value after the iteration.
7. The method for predicting the system visit amount based on the modified gray wolf algorithm according to any one of claims 3 to 6, wherein the step of inputting the test sample into the trained visit amount prediction model to obtain a visit amount test result specifically comprises:
Acquiring the test group data set, inputting the test group data set into the trained visit amount prediction model, acquiring test data corresponding to each group of test data in the test group data set, and constructing a test data set as the visit amount test result;
and performing secondary optimization on the trained visit amount prediction model by adopting an error back propagation algorithm of the BP neural network according to the visit amount test result to obtain a final visit amount prediction model, wherein the method specifically comprises the following steps of:
and obtaining the access amount test result, and performing secondary optimization on the trained access amount prediction model according to an error back propagation algorithm of the BP neural network and the test expected data set to obtain the final access amount prediction model.
8. The system access amount prediction method based on the modified wolf algorithm according to claim 7, wherein after the step of performing the obtaining the system access amount corresponding to the target system in the latest unit time as a prediction sample, predicting the access amount of the target system based on the prediction sample and the final access amount prediction model, the method further comprises:
Obtaining an access quantity prediction result;
identifying whether the access quantity prediction result meets the alarm requirement according to a preset access quantity alarm threshold;
if the access quantity predicted result exceeds a preset access quantity alarm threshold, sending the access quantity predicted result to a preset access quantity monitoring terminal for alarm processing;
and if the access quantity prediction result does not exceed the preset access quantity alarm threshold value, not performing alarm processing.
9. A system access amount prediction device based on an improved wolf algorithm, comprising:
the initial sample acquisition module is used for acquiring the system access quantity of each unit time of the target system in a preset time period according to the access flow monitoring log of the target system, and constructing an initial sample;
the sampling processing module is used for sampling the initial sample according to a preset sampling rule, and obtaining and generating a training sample and a test sample according to a sampling result;
the prediction model training module is used for inputting the training sample into a pre-constructed visit amount prediction model to perform model training to obtain a trained visit amount prediction model, wherein the visit amount prediction model is a BP neural network architecture model based on an improved gray wolf algorithm;
The prediction model test module is used for inputting the test sample into the trained visit amount prediction model to obtain a visit amount measurement result;
the prediction model tuning module is used for performing secondary tuning on the trained visit amount prediction model by adopting an error back propagation algorithm of the BP neural network according to the visit amount test result to obtain a final visit amount prediction model;
and the access quantity prediction module is used for acquiring the system access quantity corresponding to the target system in the latest unit time, taking the system access quantity as a prediction sample, and predicting the access quantity of the target system based on the prediction sample and the final access quantity prediction model.
10. A computer device comprising a memory having stored therein computer readable instructions which when executed implement the steps of the improved wolf algorithm based system access prediction method of any one of claims 1 to 8.
11. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the improved wolf algorithm based system access prediction method of any one of claims 1 to 8.
CN202310713976.2A 2023-06-15 2023-06-15 System access quantity prediction method based on improved wolf algorithm and related equipment thereof Pending CN116703466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310713976.2A CN116703466A (en) 2023-06-15 2023-06-15 System access quantity prediction method based on improved wolf algorithm and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310713976.2A CN116703466A (en) 2023-06-15 2023-06-15 System access quantity prediction method based on improved wolf algorithm and related equipment thereof

Publications (1)

Publication Number Publication Date
CN116703466A true CN116703466A (en) 2023-09-05

Family

ID=87832217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310713976.2A Pending CN116703466A (en) 2023-06-15 2023-06-15 System access quantity prediction method based on improved wolf algorithm and related equipment thereof

Country Status (1)

Country Link
CN (1) CN116703466A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117060984A (en) * 2023-10-08 2023-11-14 中国人民解放军战略支援部队航天工程大学 Satellite network flow prediction method based on empirical mode decomposition and BP neural network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117060984A (en) * 2023-10-08 2023-11-14 中国人民解放军战略支援部队航天工程大学 Satellite network flow prediction method based on empirical mode decomposition and BP neural network
CN117060984B (en) * 2023-10-08 2024-01-09 中国人民解放军战略支援部队航天工程大学 Satellite network flow prediction method based on empirical mode decomposition and BP neural network

Similar Documents

Publication Publication Date Title
CN109902222A (en) Recommendation method and device
CN110555714A (en) method and apparatus for outputting information
CN116684330A (en) Traffic prediction method, device, equipment and storage medium based on artificial intelligence
CN117093477A (en) Software quality assessment method and device, computer equipment and storage medium
CN116703466A (en) System access quantity prediction method based on improved wolf algorithm and related equipment thereof
WO2023050143A1 (en) Recommendation model training method and apparatus
CN116843483A (en) Vehicle insurance claim settlement method, device, computer equipment and storage medium
CN116777646A (en) Artificial intelligence-based risk identification method, apparatus, device and storage medium
CN116340864B (en) Model drift detection method, device, equipment and storage medium thereof
CN116307742B (en) Risk identification method, device and equipment for subdivision guest group and storage medium
CN111382346B (en) Method and system for recommending content
CN116681467A (en) Sales predicting method based on improved WOA algorithm and related equipment thereof
CN117235633A (en) Mechanism classification method, mechanism classification device, computer equipment and storage medium
CN118037455A (en) Financial data prediction method, device, equipment and storage medium thereof
CN117391782A (en) Advertisement putting method, device, equipment and storage medium thereof
CN117056782A (en) Data anomaly identification method, device, equipment and storage medium thereof
CN116611432A (en) Drunk driving risk identification method and device, computer equipment and storage medium
CN117078406A (en) Customer loss early warning method and device, computer equipment and storage medium
CN116167872A (en) Abnormal medical data detection method, device and equipment
CN117172226A (en) Form reconstruction method, device, equipment and storage medium thereof
CN116662160A (en) Software defect prediction method and processing device based on cost sensitive width learning
CN117609013A (en) Software defect prediction method and device based on fuzzy weighted width learning
CN117034114A (en) Data prediction method, device, equipment and storage medium based on artificial intelligence
CN116777065A (en) Data prediction method, device, equipment and storage medium based on artificial intelligence
CN116796140A (en) Abnormal analysis method, device, equipment and storage medium based on artificial intelligence

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