CN114445143A - Service data prediction method, device, equipment and medium - Google Patents

Service data prediction method, device, equipment and medium Download PDF

Info

Publication number
CN114445143A
CN114445143A CN202210113103.3A CN202210113103A CN114445143A CN 114445143 A CN114445143 A CN 114445143A CN 202210113103 A CN202210113103 A CN 202210113103A CN 114445143 A CN114445143 A CN 114445143A
Authority
CN
China
Prior art keywords
service
service data
data
prediction model
traffic
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
CN202210113103.3A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202210113103.3A priority Critical patent/CN114445143A/en
Publication of CN114445143A publication Critical patent/CN114445143A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • 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
    • 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
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Landscapes

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

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for predicting service data, wherein the method comprises the following steps: acquiring service data corresponding to a plurality of online services within preset time, and preprocessing each service data; according to the business quantity value corresponding to the online business, a target data prediction model is obtained from a plurality of basic data prediction models generated by pre-training, the preprocessed business data are input into the target data prediction model, a business quantity prediction result output by the target data prediction model is obtained, and a business risk prompt is sent out when the business quantity prediction result is detected to be larger than a preset business quantity threshold value. According to the technical scheme, the data prediction model corresponding to the multi-layer long-term and short-term memory network is generated through pre-training, the prediction accuracy of the multi-dimensional service data can be improved, and the applicability to different service dimension scenes can be improved.

Description

Service data prediction method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a method, a device, equipment and a medium for predicting service data.
Background
With the rapid development of online economy, the multidimensional online business of the banking industry generates a large amount of electronic data every day, and the dynamic prediction of the business volume is carried out based on the business data, so that the method has a positive effect on the healthy sustainable development of banking business.
At present, in the existing online service traffic prediction method, a mathematical statistic model such as a regression model or a bayesian model is mainly used to process historical service data of a multidimensional online service so as to predict and obtain a future traffic variation trend. However, with the continuous increase of service dimensions of online business in banking industry, the fitting capability of the prior art to multidimensional service data is poor, so the accuracy of traffic prediction is low.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for predicting service data, which can improve accuracy of predicting multidimensional service data and improve applicability to different service dimensional scenes.
In a first aspect, an embodiment of the present invention provides a method for predicting service data, including:
acquiring service data corresponding to at least one online service in preset time, and preprocessing each service data;
acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the business quantity value corresponding to the online business; the basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks;
inputting the preprocessed business data into the target data prediction model, obtaining a business volume prediction result output by the target data prediction model, and sending a business risk prompt when detecting that the business volume prediction result is larger than a preset business volume threshold value.
In a second aspect, an embodiment of the present invention further provides a device for predicting service data, including:
the service data acquisition module is used for acquiring service data corresponding to at least one online service in preset time and preprocessing each service data;
the target data prediction model acquisition module is used for acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the business quantity value corresponding to the online business; the basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks;
and the traffic prediction result acquisition module is used for inputting the preprocessed traffic data into the target data prediction model, acquiring a traffic prediction result output by the target data prediction model, and sending a traffic risk prompt when the traffic prediction result is detected to be larger than a preset traffic threshold.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more computer programs;
the prediction method of traffic data provided by any embodiment of the present invention is implemented when the one or more computer programs are executed by the one or more processors, such that the one or more processors execute the computer programs.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program implements the method for predicting service data provided in any embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the service data corresponding to a plurality of online services in the preset time are obtained, and the service data are preprocessed; and then according to the service quantity value corresponding to the online service, acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training, inputting each piece of service data after pre-processing into the target data prediction model, acquiring a service quantity prediction result output by the target data prediction model, sending a service risk prompt when detecting that the service quantity prediction result is greater than a preset service quantity threshold value, and generating a data prediction model corresponding to a multi-layer long-short term memory network through pre-training, so that the prediction accuracy of multi-dimensional service data can be improved, and the applicability to different service dimension scenes can be improved.
Drawings
Fig. 1 is a flowchart of a method for predicting service data according to a first embodiment of the present invention;
fig. 2A is a flowchart of a service data prediction method according to a second embodiment of the present invention;
fig. 2B is a schematic flowchart of a service data prediction method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a service data prediction apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in a fourth embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
Example one
Fig. 1 is a flowchart of a service data prediction method according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a data prediction model generated by pre-training and used for predicting future traffic according to service data of multidimensional online service; the method may be performed by a prediction apparatus of business data in the embodiment of the present invention, and the apparatus may be composed of hardware and/or software, and may be generally integrated in an electronic device, and typically, may be integrated in a computer device or a server. As shown in fig. 1, the method specifically includes the following steps:
s110, service data corresponding to at least one online service in a preset time are obtained, and preprocessing is carried out on each service data.
The preset time may be a preset time interval, for example, the preset time may be a day, a week, or a month. An online service, which may be an online service provided by a financial system (e.g., a bank), such as a loan service, a financial service, or a fund service; correspondingly, the service data may be electronic data generated by an online service. It should be noted that the present embodiment does not specifically limit the type of the online service.
In this embodiment, the business data generated by each online business provided by the enterprise in a past period (for example, one week or one month) may be collected, and the collected business data may be preprocessed, for example, invalid data is deleted or missing data is filled, so as to obtain the preprocessed business data.
Optionally, the service data may also be electronic data of the online service after statistical processing; for example, the quantity of the electronic data of each online service is counted every preset period (for example, 1 hour), and the quantity value is used as the service data corresponding to each online service; at this time, the service data of each online service in the preset time is the amount of the electronic data corresponding to each online service in each preset period.
And S120, acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the business quantity value corresponding to the online business.
It is understood that the same enterprise or company may provide a plurality of different types of services at the same time; for example, for a bank, it may offer a large number of online services such as loans, financing, funds, etc. simultaneously. In the prior art, when data prediction needs to be performed on the service data with such a plurality of dimensions, correct fitting of the multidimensional service data is difficult to achieve, so that accurate prediction on the service data volume is difficult to achieve.
Aiming at the problems, the embodiment can be trained in advance to obtain a certain number of basic data prediction models corresponding to different traffic volume values; therefore, after the service data of the multi-dimensional online service is collected, the target data prediction model matched with the current scene can be selected from the basic data prediction models according to the service quantity value of the current online service. At this time, since the target data prediction model is matched with the traffic volume value of the current online service, accurate prediction of company traffic volume for a period of time in the future (for example, one day or one week and the like) can be realized according to the collected multidimensional service data.
The basic data prediction model can be constructed based on a preset number of layers of long-term and short-term memory networks. The Long Short-Term Memory (LSTM) network is a time recurrent neural network, in which the output and the cell state at the current time can be memorized for a Long time, and when the next time is reached, the memorized output and cell state at the current time and the input data at the next time are used together as the input of the LSTM network for calculation to obtain the output and cell state at the next time. The preset number of layers may be a preset number of layers of the long-term and short-term memory network, and typically, the preset number of layers may be 3.
In this embodiment, the data prediction model is established by using a multi-layer LSTM network, which can improve the processing capability of the data prediction model on the multidimensional data, thereby realizing accurate prediction on the multidimensional service data and improving the prediction accuracy on the future traffic.
Optionally, the multiple layers of LSTM networks in the basic data prediction model may be homogeneous LSTM networks, that is, each layer of LSTM network includes the same number of LSTM units; or heterogeneous LSTM networks, i.e., each layer of LSTM network includes a different number of LSTM units. The number of LSTM units included in each layer of LSTM network is not specifically limited in this embodiment.
In an optional implementation manner of this embodiment, obtaining the target data prediction model from the plurality of basic data prediction models generated by pre-training according to the traffic volume value corresponding to the online service may include: and acquiring a target data prediction model matched with each service data according to the service quantity value corresponding to the online service and the corresponding relation between the pre-established service quantity value and the basic data prediction model.
In this embodiment, after the basic data prediction models are obtained through training, the corresponding relationship between the basic data prediction models and the traffic volume values may be stored in advance according to the traffic volume values corresponding to the training samples adopted by each basic data prediction model. Therefore, after the traffic volume value of the current online service is acquired, the target data prediction model matched with the current scene can be searched and acquired from the pre-stored corresponding relation.
S130, inputting each preprocessed service data into the target data prediction model, obtaining a service quantity prediction result output by the target data prediction model, and sending out a service risk prompt when the service quantity prediction result is detected to be larger than a preset service quantity threshold value.
In this embodiment, after determining the target data prediction model, the preprocessed business data may be input to the target data prediction model; the target data prediction model can perform feature extraction, pooling output and hidden state transmission on the input preprocessed service data through a plurality of layers of LSTM networks which are stacked up and down, and a corresponding service volume prediction result is output by the LSTM network at the bottommost layer. Further, after the traffic prediction result is obtained, the traffic prediction result may be compared with a preset traffic threshold.
If the traffic prediction result is detected to be greater than the preset traffic threshold, it indicates that there is a risk of sudden traffic increase in the future, and may send a corresponding traffic risk prompt, for example, "traffic warning, please note". And if the predicted result of the traffic is detected to be less than or equal to the preset traffic threshold, the future traffic is relatively stable, and the predicted result of the traffic can be output and displayed. It should be noted that, the preset traffic threshold may be adaptively set according to the business processing capability of the enterprise.
In the embodiment, the business volume prediction result output by the target data prediction model is obtained to predict the business volume of the enterprise in the future, and when the abnormal prediction business volume is detected, the corresponding warning information is given in time, so that the enterprise can take preventive measures in advance, the healthy sustainable development of the enterprise can be realized, and the safety of the enterprise is improved.
According to the technical scheme provided by the embodiment of the invention, the service data corresponding to a plurality of online services in the preset time are obtained, and the service data are preprocessed; and then according to the service quantity value corresponding to the online service, acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training, inputting each piece of service data after pre-processing into the target data prediction model, acquiring a service quantity prediction result output by the target data prediction model, sending a service risk prompt when detecting that the service quantity prediction result is greater than a preset service quantity threshold value, and generating a data prediction model corresponding to a multi-layer long-short term memory network through pre-training, so that the prediction accuracy of multi-dimensional service data can be improved, and the applicability to different service dimension scenes can be improved.
In another optional implementation manner of this embodiment, before obtaining the target data prediction model from the plurality of basic data prediction models generated by pre-training according to the traffic volume value corresponding to the online service, the method may further include:
acquiring a plurality of service data sets corresponding to different service quantity values, responding to a labeling request aiming at the service data sets, and respectively adding corresponding sample labels to each service data subset in each service data set so as to acquire each labeled service data set; the service data subsets in the same service data set contain the same number of service data;
establishing a matched initial data prediction model based on a preset number of layers of long-term and short-term memory networks according to the service quantity value corresponding to each service data set; each layer of long-short term memory network in the initial data prediction model comprises at least one long-short term memory unit, and the number of the long-short term memory units is the same as the traffic quantity value of the corresponding service data set; and training the matched initial data prediction models by adopting the marked service data sets respectively to obtain a plurality of trained basic data prediction models.
In this embodiment, the business data of each online business provided by the enterprise can be collected at different times, and the business data collected at the same time is added to one business data subset. It will be appreciated that the number of online services provided by an enterprise at a time is fixed, while the number of online services provided at different times may vary. Therefore, the traffic volume values of the online services corresponding to the traffic data subsets are different. At this time, the service data subsets corresponding to the same traffic volume value are added to one service data set to obtain a plurality of service data sets corresponding to different traffic volume values.
Further, after the service data sets are obtained, each service data subset in each service data set may be labeled to add a corresponding service data volume label to each service data subset. It can be understood that the service data volume after the data acquisition time corresponding to the service data subset may be monitored, and the monitored service data volume may be added to the corresponding service data subset as a tag. Therefore, a plurality of service data sets with finished labeling can be obtained.
After the labeled service data set is obtained, the number of LSTM units included in each layer of LSTM network in the corresponding initial data prediction model may be determined according to the traffic quantity value corresponding to the service data set. For example, when the traffic volume value corresponding to one service data set is 16, that is, the number of online services corresponding to the service data set is 16, it may be determined that the number of LSTM units included in the first layer LSTM network is 16. It is noted that each layer of LSTM network includes a plurality of LSTM units, each of which corresponds to traffic data of one online service for the first layer of LSTM network. Thus, a matching initial data prediction model may be determined for each traffic data set.
Then, supervised training can be performed on the matched initial data prediction model respectively by using each labeled business data set so as to obtain each trained basic data prediction model. Optionally, in order to reduce the labeling workload of the service data set, a pseudo label method may also be adopted, and a pseudo label corresponding to the unlabeled service data subset is determined through an intermediate data prediction model obtained by training a small number of labeled samples.
The advantages of the above arrangement are: the basic data prediction models corresponding to different service quantity values are obtained through pre-training, so that accurate prediction of service data generated by different quantities of online services can be realized, the accuracy of multi-dimensional online service traffic prediction is improved, and in addition, the method can adapt to continuously changing service conditions and improve the adaptability to different service scenes.
Example two
Fig. 2A is a flowchart of a service data prediction method provided in the second embodiment of the present invention, which is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with one or more of the foregoing implementations. Specifically, referring to fig. 2A, the method specifically includes the following steps:
s210, acquiring service data corresponding to at least one online service in a preset time, and preprocessing each service data.
S220, according to the business quantity value corresponding to the online business, a target data prediction model is obtained from a plurality of basic data prediction models generated through pre-training.
The basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks, and the target data prediction model can further comprise an attention unit. In this embodiment, an attention mechanism is introduced into the data prediction model to give a higher weight to the important features, so that the influence of the key output information on the final traffic prediction result is highlighted, and the accuracy of obtaining the traffic prediction result can be further improved.
And S230, calculating the input preprocessed service data through the long-short term memory network with the preset number of layers, and acquiring hidden layer outputs of the long-short term memory network with the bottommost layer at different moments.
Each LSTM unit of the LSTM network is controlled by using 3 control switches, namely three gates, namely a forgetting gate, an input gate and an output gate; specifically, it is determined by the forgetting gate how much information is retained from the cell state at the previous time to the current time, it is determined by the input gate what new information is stored in the cell state, and it is determined by the output gate what value is finally output. It should be noted that, in the same layer LSTM network, there is a unidirectional transmission of hidden state values between adjacent LSTM units.
In a specific implementation manner of this embodiment, the calculating, by using the long-short term memory network with the preset number of layers, each of the input preprocessed service data to obtain hidden layer outputs of the long-short term memory network with the bottommost layer at different times may specifically include: the output of the mth long-short term memory unit at the time t is calculated by the following formula
Figure BDA0003495387940000101
Figure BDA0003495387940000102
Figure BDA0003495387940000103
Figure BDA0003495387940000104
Figure BDA0003495387940000105
Figure BDA0003495387940000106
Figure BDA0003495387940000107
Wherein the content of the first and second substances,
Figure BDA0003495387940000108
represents the forgetting gate output of the long-short term memory unit, sigma represents the sigmoid function,
Figure BDA0003495387940000109
a weight matrix representing a forgetting gate,
Figure BDA00034953879400001010
the output at the moment of the mth long-short term memory unit t-1, i.e. the last state output value,
Figure BDA00034953879400001011
the input of the m-1 th long-short term memory unit at the moment t, namely the input value of the current state,
Figure BDA0003495387940000111
a bias term representing a forgetting gate,
Figure BDA0003495387940000112
representing the input gate output of the long and short term memory cells,
Figure BDA0003495387940000113
a weight matrix representing the input gate,
Figure BDA0003495387940000114
an offset term representing the input gate is entered,
Figure BDA0003495387940000115
representing the cell state input at time t, tanh represents the activation function,
Figure BDA0003495387940000116
a weight matrix representing the input at time t,
Figure BDA0003495387940000117
the bias term representing the input at time t,
Figure BDA0003495387940000118
indicating the state of the cell at time t,
Figure BDA00034953879400001115
meaning that the multiplication by the element is performed,
Figure BDA0003495387940000119
indicating the memory state at time t-1,
Figure BDA00034953879400001110
the output of the output gate is represented,
Figure BDA00034953879400001111
a weight matrix representing the output gates,
Figure BDA00034953879400001112
representing the bias term of the output gate. Wherein, each weight matrix and the corresponding bias term can be obtained by training the LSTM network.
S240, determining the hidden layers at different moments to output corresponding weight values through the attention unit.
Wherein, the attention unit can be a feature attention unit and also can be a time sequence attention unit; specifically, the feature attention unit determines a weight value corresponding to each feature quantity mainly based on the influence degree of each feature quantity on the current traffic prediction result; and the time sequence attention unit is mainly used for determining the weighted values respectively corresponding to the output information at different moments based on the influence degrees of the output information at different moments on the traffic prediction result. Optionally, a plurality of attention units may be superimposed to further improve the accuracy of the final traffic prediction result.
In an optional implementation manner of this embodiment, determining, by the attention unit, weight values respectively corresponding to hidden layer outputs at different times may include: calculating to obtain a weighted value alpha corresponding to the hidden layer output at the time t through the following formulat
Figure BDA00034953879400001113
Figure BDA00034953879400001114
Wherein T represents a preset time, WhWeight matrix representing attention units, bhIndicating the bias term for the attention unit. In this embodiment, when the attention unit is a time-series attention unit, the above formula can be used to calculate the weighted values corresponding to the hidden layer outputs at different times.
And S250, according to the hidden layer outputs and the corresponding weight values at different moments, obtaining the traffic prediction results corresponding to the service data.
In this embodiment, the hidden layer with the largest corresponding weight value may be selected to output according to the corresponding weight values of the hidden layer outputs at different times, and the selected hidden layer may be used as the traffic prediction result corresponding to each current service data; or, the hidden layer outputs at different time instants can be weighted and summed, and the sum value is used as a final traffic prediction result.
In an optional implementation manner of this embodiment, obtaining the traffic prediction result corresponding to each piece of service data according to the hidden layer outputs and the corresponding weight values at different times may include: and performing weighted summation processing according to hidden layer outputs at different moments and corresponding weight values, and taking the obtained sum value as a service volume prediction result corresponding to each service data.
In this embodiment, the hidden layer outputs at different times may be subjected to weighted summation according to the weight values corresponding to different times, and the sum of the weighted summations obtained through calculation is used as a final traffic prediction result.
According to the technical scheme provided by the embodiment of the invention, the service data corresponding to a plurality of online services in the preset time are obtained, and the service data are preprocessed; further, according to the service quantity value corresponding to the online service, a target data prediction model is obtained from a plurality of basic data prediction models generated by pre-training, input preprocessed service data are calculated through a preset number of layers of long-short term memory networks, and hidden layer outputs of the bottommost long-short term memory network at different moments are obtained; determining the weight values respectively corresponding to the hidden layer outputs at different moments through an attention unit; according to the hidden layer outputs and the corresponding weight values at different moments, the service volume prediction result corresponding to each service data is obtained; by adding the attention unit in the data prediction model, more accurate prediction of future traffic can be realized, and the accuracy of obtaining a traffic prediction result is further improved.
In a specific implementation manner of this embodiment, the prediction flow of the service data of this embodiment may be as shown in fig. 2B. The target data prediction model comprises three layers of isomorphic LSTM networks and attention units, each layer of LSTM network comprises the same number of LSTM units, and the transmission of a hidden layer state value h exists between adjacent LSTM units in the same layer of LSTM network, { X }1,X2,…,XTAnd the data are service data corresponding to different online services.
Specifically, electronic data generated by the banking multidimensional online service is input through an input layer, and corresponding feature extraction, pooling output, transmission of hidden states and the like are performed through a recurrent neural network constructed by three layers of LSTM networks stacked up and down. Furthermore, an attention mechanism is introduced into the last layer of the target data prediction model to determine weight values corresponding to the output results of the LSTM network of the multi-layer iteration above different moments, weighted summation is carried out according to the output results and the corresponding weight values, and then the sum of the weighted summation is used as a final traffic prediction result.
It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, and the like of the personal information of the related user all conform to the regulations of the relevant laws and regulations, and do not violate the common customs of the public order.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a service data prediction apparatus according to a third embodiment of the present invention. The device can be applied to a public product comprehensive management platform. As shown in fig. 3, the apparatus includes: a service data obtaining module 310, a target data prediction model obtaining module 320, and a traffic prediction result obtaining module 330. Wherein the content of the first and second substances,
a service data obtaining module 310, configured to obtain service data corresponding to at least one online service in a preset time, and pre-process each service data;
a target data prediction model obtaining module 320, configured to obtain a target data prediction model from multiple basic data prediction models generated by pre-training according to the traffic quantity value corresponding to the online service; the basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks;
a traffic prediction result obtaining module 330, configured to input each of the preprocessed traffic data into the target data prediction model, obtain a traffic prediction result output by the target data prediction model, and send a service risk prompt when it is detected that the traffic prediction result is greater than a preset traffic threshold.
According to the technical scheme provided by the embodiment of the invention, the service data corresponding to a plurality of online services in the preset time are obtained, and the service data are preprocessed; and then according to the service quantity value corresponding to the online service, acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training, inputting each piece of service data after pre-processing into the target data prediction model, acquiring a service quantity prediction result output by the target data prediction model, sending a service risk prompt when detecting that the service quantity prediction result is greater than a preset service quantity threshold value, and generating a data prediction model corresponding to a multi-layer long-short term memory network through pre-training, so that the prediction accuracy of multi-dimensional service data can be improved, and the applicability to different service dimension scenes can be improved.
Optionally, on the basis of the foregoing technical solution, the apparatus for predicting service data further includes:
a service data set obtaining module, configured to obtain multiple service data sets corresponding to different service quantity values, and in response to a labeling request for a service data set, add corresponding sample tags to each service data subset in each service data set, so as to obtain each labeled service data set; the service data subsets in the same service data set contain the same number of service data;
the initial data prediction model establishing module is used for establishing a matched initial data prediction model based on a long-term and short-term memory network with a preset number of layers according to the corresponding service quantity value of each service data set;
each layer of long-short term memory network in the initial data prediction model comprises at least one long-short term memory unit, and the number of the long-short term memory units is the same as the traffic quantity value of the corresponding service data set;
and the basic data prediction model acquisition module is used for training the matched initial data prediction models by adopting the marked business data sets respectively to acquire a plurality of trained basic data prediction models.
Optionally, on the basis of the foregoing technical solution, the target data prediction model obtaining module 320 is specifically configured to obtain a target data prediction model matched with each service data according to a service quantity value corresponding to the online service and a correspondence between a pre-established service quantity value and a basic data prediction model.
Optionally, on the basis of the above technical solution, the target data prediction model further includes an attention unit;
the traffic prediction result obtaining module 330 includes:
a hidden layer output obtaining unit, configured to calculate, through a preset number of long-and-short-term memory networks, each of the input preprocessed service data, and obtain hidden layer outputs of the bottommost long-and-short-term memory network at different times;
the weight value determining unit is used for determining the weight values respectively corresponding to the hidden layer outputs at different moments through the attention unit;
and the prediction result obtaining unit is used for obtaining the traffic prediction result corresponding to each service data according to the hidden layer output and the corresponding weight value at different moments.
Optionally, on the basis of the above technical solution, the hidden layer output obtaining unit is specifically configured to calculate the output of the mth long-short term memory unit at time t by using the following formula
Figure BDA0003495387940000151
Figure BDA0003495387940000152
Figure BDA0003495387940000153
Figure BDA0003495387940000154
Figure BDA0003495387940000155
Figure BDA0003495387940000156
Figure BDA0003495387940000157
Wherein the content of the first and second substances,
Figure BDA0003495387940000161
represents the forgetting gate output of the long-short term memory unit, sigma represents the sigmoid function,
Figure BDA0003495387940000162
a weight matrix representing a forgetting gate,
Figure BDA0003495387940000163
the output of the m-th long-short term memory unit at the time t-1 is shown,
Figure BDA0003495387940000164
the output of the m-1 th long-short term memory unit at the time t is shown,
Figure BDA0003495387940000165
a bias term representing a forgetting gate,
Figure BDA0003495387940000166
representing the input gate output of the long and short term memory cells,
Figure BDA0003495387940000167
a weight matrix representing the input gate,
Figure BDA0003495387940000168
a bias term representing an input gate is input,
Figure BDA0003495387940000169
representing the cell state input at time t, tanh represents the activation function,
Figure BDA00034953879400001610
a weight matrix representing the input at time t,
Figure BDA00034953879400001611
the bias term representing the input at time t,
Figure BDA00034953879400001612
indicating the state of the cell at time t,
Figure BDA00034953879400001613
meaning that the multiplication by the element is performed,
Figure BDA00034953879400001614
indicating the memory state at time t-1,
Figure BDA00034953879400001615
the output of the output gate is represented,
Figure BDA00034953879400001616
a weight matrix representing the output gates,
Figure BDA00034953879400001617
representing the bias term of the output gate.
Optionally, on the basis of the above technical solution, the weight value determining unit is specifically configured to calculate, by using the following formula, that the weight value corresponding to the hidden layer output at time t is αt
Figure BDA00034953879400001618
Figure BDA00034953879400001619
Wherein T represents a preset time, WhWeight matrix representing attention units, bhIndicating the bias term for the attention unit.
Optionally, on the basis of the foregoing technical solution, the prediction result obtaining unit is specifically configured to perform weighted summation processing according to hidden layer outputs at different times and corresponding weight values, and use an obtained sum value as a traffic prediction result corresponding to each piece of traffic data.
The device can execute the service data prediction method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the embodiments of the present invention, reference may be made to the prediction method of business data provided in the foregoing embodiments of the present invention.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, as shown in fig. 4, the electronic device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of the processors 410 in the electronic device may be one or more, and one processor 410 is taken as an example in fig. 4; the processor 410, the memory 420, the input device 430 and the output device 440 in the electronic apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 4. The memory 420 is used as a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a service data prediction method in any embodiment of the present invention (for example, the service data acquisition module 310, the target data prediction model acquisition module 320, and the traffic prediction result acquisition module 330 in a service data prediction device). The processor 410 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 420, so as to implement one of the above-mentioned prediction methods of business data. That is, the program when executed by the processor implements:
acquiring service data corresponding to at least one online service in preset time, and preprocessing each service data;
acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the business quantity value corresponding to the online business; the basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks;
inputting the preprocessed business data into the target data prediction model, obtaining a business volume prediction result output by the target data prediction model, and sending a business risk prompt when detecting that the business volume prediction result is larger than a preset business volume threshold value.
The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to an electronic device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus, and may include a keyboard, a mouse, and the like. The output device 440 may include a display device such as a display screen.
EXAMPLE five
Fifth, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to any embodiment of the present invention. Of course, the embodiment of the present invention provides a computer-readable storage medium, which can perform related operations in a service data prediction method according to any embodiment of the present invention. That is, the program when executed by the processor implements:
acquiring service data corresponding to at least one online service in preset time, and preprocessing each service data;
acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the business quantity value corresponding to the online business; the basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks;
inputting the preprocessed business data into the target data prediction model, obtaining a business volume prediction result output by the target data prediction model, and sending a business risk prompt when detecting that the business volume prediction result is larger than a preset business volume threshold value.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the foregoing prediction apparatus for business data, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for predicting service data, comprising:
acquiring service data corresponding to at least one online service in preset time, and preprocessing each service data;
acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the business quantity value corresponding to the online business; the basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks;
inputting the preprocessed business data into the target data prediction model, obtaining a business volume prediction result output by the target data prediction model, and sending a business risk prompt when detecting that the business volume prediction result is larger than a preset business volume threshold value.
2. The method of claim 1, further comprising, before obtaining a target data prediction model from a plurality of basic data prediction models generated by pre-training according to a traffic volume value corresponding to the online traffic,:
acquiring a plurality of service data sets corresponding to different service quantity values, responding to a labeling request aiming at the service data sets, and respectively adding corresponding sample labels to each service data subset in each service data set so as to acquire each labeled service data set; the service data subsets in the same service data set contain the same number of service data;
establishing a matched initial data prediction model based on a preset number of layers of long-term and short-term memory networks according to the service quantity value corresponding to each service data set;
each layer of long-short term memory network in the initial data prediction model comprises at least one long-short term memory unit, and the number of the long-short term memory units is the same as the traffic quantity value of the corresponding service data set;
and training the matched initial data prediction models by adopting the marked service data sets respectively to obtain a plurality of trained basic data prediction models.
3. The method of claim 2, wherein obtaining a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the traffic volume value corresponding to the online traffic comprises:
and acquiring a target data prediction model matched with each service data according to the service quantity value corresponding to the online service and the corresponding relation between the pre-established service quantity value and the basic data prediction model.
4. The method according to claim 1, wherein the target data prediction model further includes an attention unit, and the step of inputting each preprocessed service data into the target data prediction model and obtaining a service prediction result output by the target data prediction model comprises:
calculating each of the preprocessed service data through a preset number of layers of long-short term memory networks to obtain hidden layer outputs of the bottommost long-short term memory network at different moments;
determining, by the attention unit, weight values respectively corresponding to hidden layer outputs at different times;
and acquiring a traffic prediction result corresponding to each service data according to the hidden layer output and the corresponding weight value at different moments.
5. The method of claim 4, wherein the step of calculating each of the preprocessed service data through a preset number of long-short term memory networks to obtain hidden layer outputs of the bottommost long-short term memory network at different times comprises:
the output of the mth long-short term memory unit at the time t is calculated by the following formula
Figure FDA0003495387930000021
Figure FDA0003495387930000022
Figure FDA0003495387930000023
Figure FDA0003495387930000024
Figure FDA0003495387930000025
Figure FDA0003495387930000026
Figure FDA0003495387930000031
Wherein the content of the first and second substances,
Figure FDA0003495387930000032
represents the forgetting gate output of the long-short term memory unit, sigma represents the sigmoid function,
Figure FDA0003495387930000033
a weight matrix representing a forgetting gate,
Figure FDA0003495387930000034
the output of the m-th long-short term memory unit at the time t-1 is shown,
Figure FDA0003495387930000035
the output of the m-1 th long-short term memory unit at the time t is shown,
Figure FDA0003495387930000036
a bias term representing a forgetting gate,
Figure FDA0003495387930000037
representing the input gate output of the long and short term memory cells,
Figure FDA0003495387930000038
a weight matrix representing the input gate,
Figure FDA0003495387930000039
an offset term representing the input gate is entered,
Figure FDA00034953879300000310
unit shape for representing input at time tThe state, tanh, represents the activation function,
Figure FDA00034953879300000311
a weight matrix representing the input at time t,
Figure FDA00034953879300000312
the bias term representing the input at time t,
Figure FDA00034953879300000313
indicating the state of the cell at time t,
Figure FDA00034953879300000320
meaning that the multiplication by the element is performed,
Figure FDA00034953879300000314
indicating the memory state at time t-1,
Figure FDA00034953879300000315
the output of the output gate is represented,
Figure FDA00034953879300000316
a weight matrix representing the output gates is shown,
Figure FDA00034953879300000317
representing the bias term of the output gate.
6. The method according to claim 4, wherein determining, by the attention unit, weight values respectively corresponding to hidden layer outputs at different times comprises:
calculating to obtain a weighted value alpha corresponding to the hidden layer output at the time t through the following formulat
Figure FDA00034953879300000318
Figure FDA00034953879300000319
Wherein T represents a preset time, WhWeight matrix representing attention units, bhIndicating the bias term for the attention unit.
7. The method according to claim 4, wherein obtaining the traffic prediction result corresponding to each service data according to the hidden layer outputs and the corresponding weight values at different times comprises:
and performing weighted summation processing according to hidden layer outputs at different moments and corresponding weight values, and taking the obtained sum value as a service volume prediction result corresponding to each service data.
8. An apparatus for predicting traffic data, comprising:
the service data acquisition module is used for acquiring service data corresponding to at least one online service in preset time and preprocessing each service data;
the target data prediction model acquisition module is used for acquiring a target data prediction model from a plurality of basic data prediction models generated by pre-training according to the business quantity value corresponding to the online business; the basic data prediction model is constructed based on a preset number of layers of long-term and short-term memory networks;
and the traffic prediction result acquisition module is used for inputting the preprocessed traffic data into the target data prediction model, acquiring a traffic prediction result output by the target data prediction model, and sending a traffic risk prompt when the traffic prediction result is detected to be larger than a preset traffic threshold.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more computer programs;
the prediction method of traffic data according to any of claims 1-7 is implemented when the one or more computer programs are executed by the one or more processors such that the one or more processors execute the computer programs.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of prediction of traffic data according to any one of claims 1-7.
CN202210113103.3A 2022-01-29 2022-01-29 Service data prediction method, device, equipment and medium Pending CN114445143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210113103.3A CN114445143A (en) 2022-01-29 2022-01-29 Service data prediction method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210113103.3A CN114445143A (en) 2022-01-29 2022-01-29 Service data prediction method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114445143A true CN114445143A (en) 2022-05-06

Family

ID=81371623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210113103.3A Pending CN114445143A (en) 2022-01-29 2022-01-29 Service data prediction method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114445143A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114925939A (en) * 2022-07-19 2022-08-19 浪潮通信信息系统有限公司 East-west calculation heat data prediction method and device and electronic equipment
CN115984002A (en) * 2023-02-22 2023-04-18 上海信宝博通电子商务有限公司 Data processing method and device for vehicle transaction management
CN116170384A (en) * 2023-04-24 2023-05-26 北京智芯微电子科技有限公司 Edge computing service perception method and device and edge computing equipment
CN116991693A (en) * 2023-09-27 2023-11-03 宁波银行股份有限公司 Test method, device, equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114925939A (en) * 2022-07-19 2022-08-19 浪潮通信信息系统有限公司 East-west calculation heat data prediction method and device and electronic equipment
CN114925939B (en) * 2022-07-19 2022-10-21 浪潮通信信息系统有限公司 East-west calculation heat data prediction method and device and electronic equipment
CN115984002A (en) * 2023-02-22 2023-04-18 上海信宝博通电子商务有限公司 Data processing method and device for vehicle transaction management
CN115984002B (en) * 2023-02-22 2024-01-16 上海信宝博通电子商务有限公司 Data processing method and device for vehicle transaction management
CN116170384A (en) * 2023-04-24 2023-05-26 北京智芯微电子科技有限公司 Edge computing service perception method and device and edge computing equipment
CN116991693A (en) * 2023-09-27 2023-11-03 宁波银行股份有限公司 Test method, device, equipment and storage medium
CN116991693B (en) * 2023-09-27 2023-12-26 宁波银行股份有限公司 Test method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN114445143A (en) Service data prediction method, device, equipment and medium
US20210264272A1 (en) Training method and system of neural network model and prediction method and system
WO2018040944A1 (en) System, method, and device for identifying malicious address/malicious purchase order
CN110751286B (en) Training method and training system for neural network model
CN110751285B (en) Training method and system and prediction method and system for neural network model
CN110751287B (en) Training method and system and prediction method and system for neural network model
CN110264270B (en) Behavior prediction method, behavior prediction device, behavior prediction equipment and storage medium
CN111814910B (en) Abnormality detection method, abnormality detection device, electronic device, and storage medium
US11811708B2 (en) Systems and methods for generating dynamic conversational responses using cluster-level collaborative filtering matrices
CN111429204A (en) Hotel recommendation method, system, electronic equipment and storage medium
US20230342797A1 (en) Object processing method based on time and value factors
CN110781970A (en) Method, device and equipment for generating classifier and storage medium
CN111667024A (en) Content pushing method and device, computer equipment and storage medium
CN111160600A (en) Behavior prediction method, behavior prediction device, computer equipment and storage medium
CN111179055A (en) Credit limit adjusting method and device and electronic equipment
CN112950291B (en) Model deviation optimization method, device, equipment and computer readable medium
CN114511387A (en) Product recommendation method and device, electronic equipment and storage medium
CN114187009A (en) Feature interpretation method, device, equipment and medium of transaction risk prediction model
CN113705698A (en) Information pushing method and device based on click behavior prediction
CN117391466A (en) Novel early warning method and system for contradictory dispute cases
CN116664306A (en) Intelligent recommendation method and device for wind control rules, electronic equipment and medium
CN117081941A (en) Flow prediction method and device based on attention mechanism and electronic equipment
WO2021012263A1 (en) Systems and methods for end-to-end deep reinforcement learning based coreference resolution
US20230305904A1 (en) Systems and methods for correlating probability models with non-homogenous time dependencies to generate time-specific data processing predictions
CN113298642B (en) Order detection method and device, electronic equipment and storage medium

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