CN115509868A - Method, device and equipment for predicting node time consumption and storage medium - Google Patents
Method, device and equipment for predicting node time consumption and storage medium Download PDFInfo
- Publication number
- CN115509868A CN115509868A CN202211304032.1A CN202211304032A CN115509868A CN 115509868 A CN115509868 A CN 115509868A CN 202211304032 A CN202211304032 A CN 202211304032A CN 115509868 A CN115509868 A CN 115509868A
- Authority
- CN
- China
- Prior art keywords
- time
- node
- prediction model
- determining
- data
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3006—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/328—Computer systems status display
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application provides a method, a device, equipment and a storage medium for predicting node time consumption, wherein the method comprises the following steps: acquiring first time-consuming data of a node in a historical time period, a first cycle value of a service and preset comparison information; the node is used for executing the service; determining a periodic identifier of the node according to the first time-consuming data and the first period value; determining a prediction model to be called according to the periodic identification and preset comparison information; and determining second time consumption data of the node in the current time period according to the prediction model to be called and the first time consumption data. Compared with a mode of predicting the consumed time of the node by adopting a single model in the related technology, the mode provided by the embodiment is beneficial to determining the calling model which accords with the periodic identification of the node, so that the consumed time prediction precision of the node is improved, and the phenomenon of error prompt of overtime operation of the node easily caused when the consumed time prediction result of the node is not accurate is avoided.
Description
Technical Field
The present application relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a storage medium for predicting node time consumption.
Background
Currently, in the field of data processing, a plurality of nodes are generally required to perform a certain service in sequence, and when the time consumed by a node in the service during task execution is long, the time consumed by the whole service is normal, and the service cannot be guaranteed to be completed on time. Therefore, in order to ensure that the service is completed on time, the time consumption of each node in the service is usually predicted in advance, and in the actual operation process of the node, if the actual time consumption of the node is greater than the predicted time consumption, a prompt is sent to the user, so that the user can adjust the time consumption in time.
Therefore, how to accurately predict the time consumed by the node so as to improve the accuracy of the prompt message sent to the user is an urgent problem to be solved.
Disclosure of Invention
The node time consumption prediction method, device, equipment and storage medium are used for improving the accuracy of node time consumption prediction.
In a first aspect, the present application provides a method for predicting node time consumption, including:
acquiring first time-consuming data of a node in a historical time period, a first cycle value of a service and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model in the process of predicting the periodic time sequence; the second precision information is used for representing the prediction precision of the prediction model when the aperiodic time sequence is predicted;
determining a periodic identifier of the node according to the first time consumption data and the first period value; the periodicity identification is used for indicating whether the first time-consuming data has periodicity or not;
determining a prediction model to be called according to the periodic identification and the preset comparison information; and determining second time-consuming data of the node in the current time period according to the to-be-called prediction model and the first time-consuming data.
In a possible implementation manner, determining a prediction model to be called according to the periodic identifier and the preset comparison information includes:
if the periodicity identification indicates that the first time-consuming data has periodicity, determining a first prediction model to be processed, wherein the first prediction model to be processed is a prediction model corresponding to first precision information with the largest value in the preset comparison information; determining a prediction model to be called based on the first prediction model to be processed;
if the periodicity identification indicates that the first time-consuming data does not have periodicity, determining a second prediction model to be processed, wherein the second prediction model to be processed is a prediction model corresponding to second precision information with the largest value in the preset comparison information; and determining the prediction model to be called based on the second prediction model to be processed.
In a possible implementation manner, determining a prediction model to be invoked based on the first prediction model to be processed includes:
if the number of the first prediction models to be processed is determined to be multiple, acquiring a first operation time length of the first prediction models to be processed, wherein the first operation time length is used for representing the consumed time of the first prediction models to be processed in the process of predicting a preset periodic time sequence; the value quantity of the preset periodic time sequence is the same as the value quantity contained in the first time-consuming data;
and determining the first to-be-processed prediction model corresponding to the first operation time length with the minimum value as the to-be-called prediction model.
In a possible implementation manner, determining the periodic identifier of the node according to the first time-consuming data and the first period value includes:
determining power spectral density information corresponding to the first time-consuming data;
determining a second period value corresponding to the first time-consuming data according to the power spectral density information;
and determining the periodic identification of the node according to the second period value and the first period value.
In a possible implementation manner, acquiring first time consumption data of a node in a history period includes:
acquiring initial time consumption data of a node in a historical time period and an abnormal event table in the historical time period; wherein the abnormal event table comprises nodes in abnormal states in the historical period;
and if the node is determined not to be located in the abnormal event table, determining the first time-consuming data based on the initial time-consuming data.
In one possible implementation, determining the first time-consuming data based on the initial time-consuming data includes:
and performing data format conversion processing on the initial time-consuming data, and taking the processed initial time-consuming data as the first time-consuming data.
In one possible implementation, the method further includes:
acquiring actual time-consuming data of the node in the current time period;
if the actual time-consuming data is determined to be larger than the third time-consuming data, sending prompt information to a user, wherein the prompt information is used for indicating that the node runs overtime; and the third time consumption data is the sum of the second time consumption data and preset redundant time consumption.
In a second aspect, the present application provides an apparatus for predicting node time consumption, including:
the first acquisition unit is used for acquiring first time-consuming data of the node in a historical time period, a first cycle value of a service and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model when the prediction model predicts the periodic time sequence; the second precision information is used for representing the prediction precision of the prediction model when the aperiodic time sequence is predicted;
a first determining unit, configured to determine a periodic identifier of the node according to the first time consumption data and the first period value; the periodicity identification is used for indicating whether the first time-consuming data has periodicity or not;
the second determining unit is used for determining a prediction model to be called according to the periodic identification and the preset comparison information;
and the third determining unit is used for determining second time-consuming data of the node in the current time period according to the to-be-called prediction model and the first time-consuming data.
In one possible implementation manner, the second determining unit includes:
a first determining module, configured to determine a to-be-processed first prediction model if the periodicity identifier indicates that the first time-consuming data has periodicity, where the to-be-processed first prediction model is a prediction model corresponding to first precision information with a largest value in the preset comparison information;
the second determination module is used for determining the prediction model to be called based on the first prediction model to be processed;
a third determining module, configured to determine a second prediction model to be processed if the periodicity identifier indicates that the first time-consuming data does not have periodicity, where the second prediction model to be processed is a prediction model corresponding to second precision information with a largest value in the preset comparison information;
the fourth determination module is used for determining the prediction model to be called based on the second prediction model to be processed;
in a possible implementation manner, the second determining module is specifically configured to:
if the number of the first prediction models to be processed is determined to be multiple, acquiring a first operation time length of the first prediction models to be processed, wherein the first operation time length is used for representing the consumed time of the first prediction models to be processed in the process of predicting a preset periodic time sequence; the value quantity of the preset periodic time sequence is the same as the value quantity contained in the first time-consuming data;
and determining the first to-be-processed prediction model corresponding to the first operation time length with the minimum value as the to-be-called prediction model.
In one possible implementation manner, the first determining unit includes:
a fifth determining module, configured to determine power spectral density information corresponding to the first time-consuming data;
a sixth determining module, configured to determine, according to the power spectral density information, a second period value corresponding to the first time-consuming data;
a seventh determining module, configured to determine a periodicity index of the node according to the second periodicity value and the first periodicity value.
In a possible implementation manner, the first obtaining unit includes:
the first acquisition module is used for acquiring initial time consumption data of the node in a historical time period and an abnormal event table in the historical time period; wherein the abnormal event table comprises nodes in abnormal states in the historical period;
an eighth determining module, configured to determine the first time-consuming data based on the initial time-consuming data if it is determined that the node is not located in the abnormal event table;
and the second acquisition module is used for acquiring the first cycle value of the service and the preset comparison information.
In a possible implementation manner, the eighth determining module is specifically configured to:
and performing data format conversion processing on the initial time-consuming data, and taking the processed initial time-consuming data as the first time-consuming data.
In one possible implementation, the apparatus further includes:
the second acquisition unit is used for acquiring actual time-consuming data of the node in the current time period;
a prompting unit, configured to send a prompting message to a user if it is determined that the actual time-consuming data is greater than the third time-consuming data, where the prompting message is used to indicate that the node runs overtime; and the third time consumption data is the sum of the second time consumption data and preset redundant time consumption.
In a third aspect, the present application provides an electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method according to any one of the first aspect according to the executable instructions.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method according to any one of the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program that, when executed by a processor, implements the method of any of the first aspects.
The application provides a method, a device, equipment and a storage medium for predicting node time consumption, wherein the method comprises the following steps: acquiring first time-consuming data of a node in a historical time period, a first cycle value of a service and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model in the process of predicting the periodic time sequence; the second precision information is used for representing the prediction precision of the prediction model when the aperiodic time sequence is predicted; determining a periodic identifier of the node according to the first time-consuming data and the first period value; the periodicity identification is used for indicating whether the first time-consuming data has periodicity or not; determining a prediction model to be called according to the periodic identification and the preset comparison information; and determining second time-consuming data of the node in the current time period according to the prediction model to be called and the first time-consuming data. Compared with a mode of predicting the consumed time of the node by adopting a single model in the related technology, the mode provided by the embodiment is beneficial to determining the calling model which accords with the periodic identification of the node, so that the consumed time prediction precision of the node is improved, and the phenomenon of error prompt of overtime operation of the node easily caused when the consumed time prediction result of the node is not accurate is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of a method for predicting node time consumption according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another method for predicting node time consumption according to the embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another method for predicting node time consumption according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a device for predicting node time consumption according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of another apparatus for predicting node time consumption according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects of the present application.
At present, when the time consumption of a node is predicted, a single prediction model is often selected, acquired historical time consumption data are used as input of the selected prediction model, and then an output result of the model is used as predicted node time consumption data. In the time-consuming prediction process of the nodes, due to the fact that the change rules of historical time-consuming data of different nodes are different, the accuracy of prediction results is low easily when a single prediction model is adopted for prediction, and then invalid prompt information is easily sent to a user.
The method, the device, the equipment and the storage medium for predicting the node time consumption are used for solving the technical problems.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. These several specific embodiments may be combined with each other below, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a method for predicting node time consumption according to an embodiment of the present disclosure, as shown in fig. 1, the method includes the following steps:
s101, acquiring first time-consuming data of a node in a historical period, a first cycle value of a service and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model when the periodic time sequence is predicted; the second precision information is used for representing the prediction precision of the prediction model when the aperiodic time sequence is predicted;
illustratively, the business in this embodiment is a business having a periodic rule in an actual execution process (referred to as batch processing business in actual application), for example, in the actual application process, the business may be a daily reconciliation business of a bank. A node may be understood as a node that is used to perform a certain process in a service when the service is executed by a device. In addition, the first period value corresponding to the service may be regarded as a period for the device to execute the service, for example, if the service is a daily reconciliation operation, the value of the first period value may be 1 day. In addition, the first period value of the service may be input by the user through the operation interface when the first period value of the service is acquired, or may be determined by the device based on the acquired period value indicating the request for executing the service.
In addition, the first time-consuming data of the node in the history period can be regarded as a set of time-consuming data in a plurality of periods arranged according to the chronological order. The time-consuming data may be understood as an actual operation duration of the node in the execution process of each service in a certain period. For example, when the service is a daily reconciliation job, at this time, the actual running time length of each day node in the historical period can be used as the first time-consuming data in the historical period.
The preset comparison information in this embodiment includes at least one prediction model. Wherein each predictive model may be used to make a prediction of data. Each prediction model is also correspondingly provided with respective first precision information and second precision information, wherein the first precision information of the prediction model can be used for indicating the prediction precision of the prediction model in the process of predicting the periodic time sequence; the second accuracy information of the prediction model can be used for indicating the prediction accuracy of the prediction model when the non-periodic time sequence is predicted; the first precision information and the second precision information may be common model prediction evaluation indexes such as an average absolute error, a root mean square error, a standard deviation, and the like, and the embodiment is not particularly limited. The preset comparison information in this embodiment may be obtained through a model test.
S102, determining a periodic identifier of the node according to the first time-consuming data and the first period value; the periodicity flag is used to indicate whether the first time-consuming data has periodicity.
After acquiring the first time consumption data and the first period value, it may be determined whether the time consumption of the node is periodic based on the first time consumption data and the first period value.
In an example, when determining whether the consumed time of a node is periodic, determining a period value of first consumed time data according to a change rule of the first consumed time data along with time, and if the period value corresponding to the first consumed time data is greater than the first period value, determining that the node does not have periodicity; otherwise, the node may be considered to have periodicity;
in one example, when it is determined that the consumed time of a node is periodic, a value of a periodic identifier of the node may be set to a first value; if it is determined that the node does not have periodicity, the value of the periodicity identification of the node may be set to a second value, where the first value is different from the second value.
S103, determining a prediction model to be called according to the periodic identification and preset comparison information.
For example, after the periodic identifier of the node is obtained, the prediction model to be invoked may be selected from the prediction models included in the preset comparison information according to the periodic identifier of the node and the preset comparison information.
In an example, when the first time-consuming data of the periodic identifier token node has periodicity, at this time, a prediction model corresponding to first precision information that meets the user expected precision requirement may be arbitrarily selected as a prediction model to be called from first precision information corresponding to prediction models of preset comparison information, for example, a prediction model corresponding to first precision information that meets the user expected precision requirement and is first matched in the preset comparison information may be used as the prediction model to be called.
Similarly, when the first time-consuming data of the periodic identifier representation node does not have periodicity, at this time, a prediction model corresponding to second precision information which meets the precision requirement expected by the user can be arbitrarily selected from second precision information corresponding to prediction models of preset comparison information to serve as the prediction model to be called.
And S104, determining second time-consuming data of the node in the current time period according to the prediction model to be called and the first time-consuming data.
For example, in this embodiment, after the prediction model to be called is determined in step S103, the prediction model may be directly called, and the acquired first time-consuming data of the node may be used as input data of the prediction model to be called, so as to predict the time-consuming data of the node in the current period through the model to be called.
It can be understood that, in the embodiment, when predicting the node consumed time, it is first determined whether the node consumed time has periodicity based on the first consumed time data of the node in the historical time period, and then it is determined that the prediction model to be called performs the node consumed time prediction in the preset comparison information based on the determination result of the node periodicity. Compared with a mode of predicting the consumed time of the node by adopting a single model in the related technology, the mode provided by the embodiment is beneficial to determining the calling model which accords with the periodic identification of the node, so that the consumed time prediction precision of the node is improved, and the phenomenon that the node overtime operation error prompt is easily caused when the consumed time prediction result of the node is inaccurate is avoided.
Fig. 2 is a schematic flowchart of another method for predicting node time consumption according to an embodiment of the present disclosure, as shown in fig. 2, the method includes the following steps:
s201, acquiring first time consumption data, a first cycle value of a service and preset comparison information of a node in a historical period; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model in the process of predicting the periodic time sequence; the second precision information is used for representing the prediction precision of the prediction model when the aperiodic time sequence is predicted.
For example, the specific principle of step S201 may be referred to step S101, and is not described herein again.
S202, power spectral density information corresponding to the first time-consuming data is determined.
For example, in this embodiment, when determining whether the first time-consuming data of the node has periodicity, at this time, power spectral density information corresponding to the first time-consuming data may be determined. For example, the power spectral density information corresponding to the first time-consuming data may be determined according to a periodogram method and a fourier transform in the related art, that is, after the fourier transform is performed on the first time-consuming data, the power spectral density information is obtained by dividing the square of the amplitude-frequency characteristic after the fourier transform by the length of the first time-consuming data. In a possible implementation, the periodogram method may also be modified, for example, an average periodogram method may be used to determine the power spectral density information, and the specific implementation is not particularly limited herein.
S203, determining a second period value corresponding to the first time-consuming data according to the power spectral density information.
For example, in this embodiment, after determining the power spectral density information corresponding to the first time-consuming data, a period value, that is, a second period value, corresponding to the first time-consuming data may be estimated according to the obtained power spectral density information.
In one example, when the period value of the first time-consuming data is determined according to the power spectral density information, in this case, in the correspondence between the frequency and the amplitude represented by the power spectral density information, the first N amplitude values (where N is a positive integer) of the amplitude value and the frequency corresponding to the first N amplitude values may be taken to determine the second period value corresponding to the first time-consuming data.
And S204, determining the periodic identification of the node according to the second period value and the first period value.
For example, when the second period value corresponding to the first time-consuming data of the node is estimated, whether the first time-consuming data of the node has periodicity may be determined based on the first period value and the second period value.
In an example, when the second period value is greater than the first period value, that is, the periodicity possessed by the node is greater than the periodicity corresponding to the service itself corresponding to the node, it may be determined that the time-consuming data of the node does not have periodicity, otherwise, it may be determined that the node has periodicity.
In one example, when the periodic identification of the node is determined, a confidence interval is also set in advance, for example, the confidence interval may be (0.9,0.95). And determining a value interval according to the preset confidence interval and the first period value, namely, taking an interval formed by values corresponding to multiplication processing of values of the first period value and the upper and lower boundaries of the confidence interval as the value interval. And when the determined second periodic value is located in the value interval, the first time-consuming data of the node is considered to have periodicity, otherwise, the first time-consuming data of the node is determined not to have periodicity.
It can be understood that, in this embodiment, when determining whether the first time-consuming data corresponding to the node has periodicity, the second period value corresponding to the node time-consuming data may be further estimated according to the power spectral density information corresponding to the first time-consuming data of the node, and whether the time-consuming data of the node has periodicity is further determined based on the first period value and the second period value, so as to improve the accuracy of node periodicity determination and improve the accuracy of time-consuming prediction of subsequent nodes.
S205, if the periodicity identification indicates that the first time-consuming data has periodicity, determining a first prediction model to be processed, wherein the first prediction model to be processed is a prediction model corresponding to the first precision information with the largest value in the preset comparison information.
For example, in this embodiment, when it is determined that the first time-consuming data has periodicity, at this time, the prediction model corresponding to the precision information with the largest value in the first precision information may be determined as the to-be-processed first prediction model by comparing the first precision information corresponding to the prediction model in the preset comparison information.
S206, determining the prediction model to be called based on the first prediction model to be processed.
For example, after the to-be-processed first prediction model is determined, the to-be-called prediction model may be determined in the to-be-processed first prediction model.
In one example, when the number of the to-be-processed first prediction models is one, the to-be-processed first prediction models may be directly used as the to-be-called prediction models, and when the number of the to-be-processed first prediction models is multiple, one to-be-processed first prediction model may be randomly selected as the to-be-called prediction model.
In one example, step S206 includes the following steps: if the number of the first prediction models to be processed is determined to be multiple, acquiring a first operation time length of the first prediction models to be processed, wherein the first operation time length is used for representing the time consumption of the first prediction models to be processed in the process of predicting the preset periodic time sequence; the value quantity of the preset periodic time sequence is the same as the value quantity contained in the first time-consuming data; and determining the first prediction model to be processed corresponding to the first operation time with the minimum value as the prediction model to be called.
For example, in this embodiment, when determining the first prediction models to be processed and when determining that the number of the first prediction models to be processed is multiple, at this time, the first operation time lengths corresponding to the first prediction models to be processed may be obtained. The first operation duration can be regarded as time consumed by the first prediction model to be processed when the preset periodic time sequence prediction is carried out; and the number of values included in the preset periodic time sequence, that is, the number of data included in the preset periodic time sequence, is the same as the number of values included in the first time-consuming data.
Then, after the first operation duration corresponding to the first prediction model to be processed is determined, the prediction model to be called is determined in the first prediction model to be processed, and the first prediction model to be processed corresponding to the first operation duration with the minimum value can be determined as the prediction model to be called.
It can be understood that, in this embodiment, when determining the prediction model to be called, the first operation duration of the model is also considered, so that the to-be-processed first operation model with a shorter first operation duration is selected as the final prediction model to be called, and thus the efficiency of node time consumption prediction is improved.
And S207, if the periodicity identification indicates that the first time-consuming data does not have periodicity, determining a second prediction model to be processed, wherein the second prediction model to be processed is a prediction model corresponding to second precision information with the largest value in the preset comparison information.
For example, in this embodiment, when it is determined that the first time-consuming data does not have periodicity, the prediction model corresponding to the precision information with the largest value in the first precision information may be determined as the second prediction model to be processed by comparing the second precision information corresponding to the prediction model in the preset comparison information.
And S208, determining the prediction model to be called based on the second prediction model to be processed.
For example, after the second prediction model to be processed is determined, the prediction model to be invoked may be determined among the second prediction models to be processed.
In one example, when the number of the first prediction models to be processed is one, the second prediction models to be processed may be directly used as the prediction models to be called, and when the number of the second prediction models to be processed is multiple, one second prediction model to be processed may be randomly selected as the prediction model to be called.
In an actual application process, for example, when it is determined that the first time-consuming data of the node has periodicity, an XGBoost (eXtreme Gradient Boosting) model in the preset comparison information may be selected as a prediction model to be called. When it is determined that the first time-consuming data of the node does not have periodicity, the Prophet model in the preset comparison information can be selected as the prediction model to be called.
It should be noted that, in this step, when the first time-consuming data of the node does not have periodicity, and when the prediction model to be called is determined, the prediction model to be called may also be determined according to the second precision information in the preset comparison information by referring to the principle in steps S205 to S206, which is not described herein again.
It can be understood that, in the embodiment, in determining the prediction model to be called according to the periodic identifier of the node, the prediction model to be called may be selected from the prediction models with the largest value of the first precision information or the prediction model to be called may be selected from the prediction models with the largest value of the second precision information, and thus, the accuracy of the time-consuming prediction result of the node may be improved by the above method.
S209, determining second time-consuming data of the node in the current time period according to the prediction model to be called and the first time-consuming data.
For example, the specific principle of step S209 may refer to step S104, and is not described herein again.
In the embodiment, in the determination of the prediction model to be called according to the periodic identifier of the node, the prediction model to be called can be selected from the prediction models with the largest value of the first precision information or the prediction model to be called can be selected from the prediction models with the largest value of the second precision information, and the accuracy of the time-consuming prediction result of the node can be improved by the method. And when the to-be-called prediction model is determined, the first operation time of the model is also considered, so that the to-be-processed first operation model with shorter first operation time is selected as the final to-be-called prediction model, and the efficiency of node time consumption prediction is improved.
Fig. 3 is a schematic flowchart of another method for predicting node time consumption according to an embodiment of the present disclosure, where as shown in fig. 3, the method includes the following steps:
s301, acquiring initial time consumption data of a node in a historical time period and an abnormal event table in the historical time period; wherein, the abnormal event table comprises nodes which are in abnormal state in the history period.
For example, when determining the first time consumption data of the node in the history period in the embodiment, first, the initial time consumption data of the node in the history period and the abnormal event table in the history period are obtained. The abnormal event table includes a node in an abnormal state in a history period, where the abnormal state may be understood as a state in which the node cannot execute a task corresponding to the node.
S302, if the node is not located in the abnormal event table, determining first time-consuming data based on the initial time-consuming data.
For example, after the abnormal event table is obtained, the node may be compared with the node in the abnormal event table, if it is determined that the node is not included in the abnormal event table, the node may be considered to be able to normally operate in the historical time period, and then the first time consumption data may be determined according to the initial time consumption data. In one example, when it is determined that the node is not in the abnormal event table, it may be considered that the currently acquired initial time-consuming data may represent an actually referenceable running time of the node in the historical period, and at this time, the initial time-consuming data may be directly determined as the first time-consuming data.
In addition, in the actual processing process, when it is determined that the node is located in the abnormal event table, it may be considered that untrusted data exists in the currently acquired initial time-consuming data, and then the untrusted data in the initial time-consuming data may be directly deleted, or remaining data in a period of time adjacent to the untrusted data in the initial time-consuming data may be used as data of a period of time in which the untrusted data is located.
In one example, it can be appreciated that the time-consuming data of a node within a certain period can be considered as the difference between the starting runtime and the ending runtime of the node within a certain period as its corresponding time-consuming data. When the end running time of the node or the start running time of the node cannot be acquired, at this time, the data in the period can be directly deleted, or the data in the period adjacent to the period can be multiplexed.
It can be understood that, in this embodiment, when determining the first time consumption data of the node, the operation state of the node in the history period is also fully considered, so that the obtained time consumption data is the time consumption data of the node in the normal operation state, and the accuracy of the time consumption prediction result finally obtained by the node is improved.
In one example, the step "determining the first time consumption data based on the initial time consumption data" in the step S302 includes the following steps: and performing data format conversion processing on the initial time-consuming data, and taking the processed initial time-consuming data as first time-consuming data.
For example, in this embodiment, when the first time-consuming data is determined based on the initial time-consuming data, format conversion processing is also performed on the initial time-consuming data, so as to avoid a problem that input data cannot be accurately identified in a subsequent model operation process.
In one example, when performing the format conversion process, the time-consuming data may be converted into time-consuming data in units of minutes, and the format-converted data may be used as the first time-consuming data.
S303, acquiring a first cycle value of the service and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model in the process of predicting the periodic time sequence; the second precision information is used for representing the prediction precision of the prediction model when the aperiodic time sequence is predicted.
S304, determining a periodic identifier of the node according to the first time-consuming data and the first period value; the periodicity indicator is used for indicating whether the first time-consuming data has periodicity.
S305, determining a prediction model to be called according to the periodic identification and preset comparison information.
S306, according to the prediction model to be called and the first time consumption data, determining second time consumption data of the node in the current time period.
For example, the specific principle of steps S303 to S306 may refer to steps S101 to S104, which are not described herein again.
And S307, acquiring actual time consumption data of the node in the current time period.
For example, in this embodiment, after the second time-consuming data of the node is determined, when the service corresponding to the node starts to be executed, the actual time-consuming data corresponding to the node may be monitored in real time at this time.
S308, if the actual time-consuming data is determined to be larger than the third time-consuming data, sending prompt information to a user, wherein the prompt information is used for indicating that the node runs overtime; and the third time consumption data is the sum of the second time consumption data and the preset redundant time consumption.
Illustratively, the third consumed time data of this embodiment is the sum of the second consumed time data and the preset redundant consumed time. The preset redundant time-consuming data can be a time-consuming data redundant value specified in advance by a user according to actual experience, or a redundant value determined according to the determined model precision information of the prediction model to be called.
In the actual monitoring process, when it is determined that the actual time consumption data of the node is greater than the third time consumption data, the operation of the node is considered to be overtime at the moment, and a prompt message can be sent to a user, so that the user can obtain the overtime operation state of the node in time, and the user can adjust the service in time. Here, the manner of sending the prompt information to the user is not specifically limited in this embodiment, and may be a voice prompt, a vibration prompt, or the like.
It can be understood that, in this embodiment, the actual time-consuming data of the node may also be monitored and determined based on the second time-consuming data obtained through prediction and the preset redundant time-consuming data, and when the actual time-consuming data is greater than the sum of the second time-consuming data and the preset redundant time-consuming data, a prompt message is sent to the user, so that the user may adjust the service in time.
Fig. 4 is a schematic structural diagram of a device for predicting node consumption according to an embodiment of the present disclosure, as shown in fig. 4, the device includes:
a first obtaining unit 401, configured to obtain first time consumption data of a node in a history period, a first cycle value of a service, and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model when the periodic time sequence is predicted; the second precision information is used for representing the prediction precision when the prediction model predicts the aperiodic time sequence.
A first determining unit 402, configured to determine a periodic identifier of a node according to the first time-consuming data and the first period value; the periodicity flag is used to indicate whether the first time-consuming data has periodicity.
The second determining unit 403 is configured to determine the prediction model to be called according to the periodic identifier and preset comparison information.
The third determining unit 404 determines second time consumption data of the node in the current time period according to the prediction model to be called and the first time consumption data. .
The apparatus provided in this embodiment is configured to implement the technical solution provided by the foregoing method, and the implementation principle and the technical effect are similar, which are not described again.
Fig. 5 is a schematic structural diagram of another apparatus for predicting node consumption according to an embodiment of the present application, and based on the embodiment shown in fig. 4, a second determining unit 403 in this embodiment includes:
a first determining module 4031, configured to determine a first prediction model to be processed if the periodicity identifier indicates that the first time-consuming data has periodicity, where the first prediction model to be processed is a prediction model corresponding to first precision information with a largest value in the preset comparison information.
A second determining module 4032, configured to determine, based on the first prediction model to be processed, a prediction model to be invoked.
A third determining module 4033, configured to determine a second prediction model to be processed if the periodicity identifier indicates that the first time consumption data does not have periodicity, where the second prediction model to be processed is a prediction model corresponding to second accuracy information with a largest value in the preset comparison information.
A fourth determining module 4034, configured to determine the prediction model to be invoked based on the second prediction model to be processed.
In a possible implementation manner, the second determining module 4032 is specifically configured to:
if the number of the first prediction models to be processed is determined to be multiple, acquiring a first operation time length of the first prediction models to be processed, wherein the first operation time length is used for representing the consumed time of the first prediction models to be processed in the process of predicting the preset periodic time sequence; the value quantity of the preset periodic time sequence is the same as the value quantity contained in the first time-consuming data;
and determining the first to-be-processed prediction model corresponding to the first operation time length with the minimum value as the to-be-called prediction model.
In a possible implementation manner, the first determining unit 402 includes:
a fifth determining module 4021, configured to determine power spectral density information corresponding to the first time-consuming data.
A sixth determining module 4022, configured to determine a second period value corresponding to the first time-consuming data according to the power spectral density information.
A seventh determining module 4023, configured to determine the periodicity identifier of the node according to the second periodicity value and the first periodicity value.
In a possible implementation manner, the first obtaining unit 401 includes:
a first obtaining module 4011, configured to obtain initial time-consuming data of a node in a history period and an abnormal event table in the history period; wherein, the abnormal event table comprises nodes which are in abnormal state in the history period.
An eighth determining module 4012, configured to determine the first time-consuming data based on the initial time-consuming data if it is determined that the node is not located in the abnormal event table.
The second obtaining module 4013 is configured to obtain the first period value of the service and preset comparison information.
In a possible implementation manner, the eighth determining module 4012 is specifically configured to:
and performing data format conversion processing on the initial time-consuming data, and taking the processed initial time-consuming data as first time-consuming data.
In one possible implementation, the apparatus further includes:
a second obtaining unit 405, configured to obtain actual time-consuming data of the node in the current time period.
A prompt unit 406, configured to send a prompt message to a user if it is determined that the actual time consumption data is greater than the third time consumption data, where the prompt message is used to indicate that the node runs overtime; the third time consumption data is the sum of the second time consumption data and the preset redundant time consumption.
The apparatus provided in this embodiment is used to implement the technical solution provided by the above method, and the implementation principle and the technical effect are similar and will not be described again.
The application provides an electronic device, including: a memory, a processor;
a memory; a memory for storing processor-executable instructions;
the processor is used for executing the method according to the executable instruction.
Fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, and as shown in fig. 6, the electronic device includes:
a processor (processor) 291, the electronic device further comprising a memory (memory) 292; a Communication Interface 293 and bus 294 may also be included. The processor 291, the memory 292, and the communication interface 293 may communicate with each other via the bus 294. Communication interface 293 may be used for the transmission of information. The processor 291 may call logic instructions in the memory 292 to perform the methods of the above embodiments.
Furthermore, the logic instructions in the memory 292 may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 292 is a computer-readable storage medium for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 291 executes the software programs, instructions and modules stored in the memory 292 to execute functional applications and data processing, i.e., to implement the methods in the above-described method embodiments.
The memory 292 may 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 device, and the like. Further, the memory 292 may include a high speed random access memory and may also include a non-volatile memory.
The present application provides a computer-readable storage medium having stored thereon computer-executable instructions for performing any of the methods when executed by a processor.
A computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of any one.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
1. A method for predicting the time consumption of a node is characterized by comprising the following steps:
acquiring first time consumption data of a node in a historical time period, a first cycle value of a service and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model when the prediction model predicts the periodic time sequence; the second precision information is used for representing the prediction precision when the prediction model predicts the aperiodic time sequence;
determining a periodic identifier of the node according to the first time-consuming data and the first period value; the periodicity identification is used for indicating whether the first time-consuming data has periodicity or not;
determining a prediction model to be called according to the periodic identification and the preset comparison information; and determining second time-consuming data of the node in the current time period according to the to-be-called prediction model and the first time-consuming data.
2. The method according to claim 1, wherein determining the prediction model to be invoked according to the periodicity identification and the preset comparison information comprises:
if the periodicity identification indicates that the first time-consuming data has periodicity, determining a first prediction model to be processed, wherein the first prediction model to be processed is a prediction model corresponding to the first precision information with the largest value in the preset comparison information; determining a prediction model to be called based on the first prediction model to be processed;
if the periodicity identification indicates that the first time-consuming data does not have periodicity, determining a second prediction model to be processed, wherein the second prediction model to be processed is a prediction model corresponding to second precision information with the largest value in the preset comparison information; and determining the prediction model to be called based on the second prediction model to be processed.
3. The method of claim 2, wherein determining the predictive model to be invoked based on the first predictive model to be processed comprises:
if the number of the first prediction models to be processed is determined to be multiple, acquiring a first operation time length of the first prediction models to be processed, wherein the first operation time length is used for representing the consumed time of the first prediction models to be processed in the process of predicting a preset periodic time sequence; the value quantity of the preset periodic time sequence is the same as the value quantity contained in the first time-consuming data;
and determining the first to-be-processed prediction model corresponding to the first operation time length with the minimum value as the to-be-called prediction model.
4. The method of claim 1, wherein determining a periodic identification of the node based on the first elapsed time data and the first periodic value comprises:
determining power spectral density information corresponding to the first time-consuming data;
determining a second period value corresponding to the first time-consuming data according to the power spectral density information;
and determining the periodic identification of the node according to the second period value and the first period value.
5. The method of claim 1, wherein obtaining first time-consuming data of the node during the history period comprises:
acquiring initial time consumption data of a node in a historical time period and an abnormal event table in the historical time period; wherein the abnormal event table comprises nodes in abnormal states in the historical period;
and if the node is determined not to be located in the abnormal event table, determining the first time-consuming data based on the initial time-consuming data.
6. The method of claim 5, wherein determining the first time-consuming data based on the initial time-consuming data comprises:
and performing data format conversion processing on the initial time-consuming data, and taking the processed initial time-consuming data as the first time-consuming data.
7. The method according to any one of claims 1-6, further comprising:
acquiring actual time-consuming data of the node in the current time period;
if the actual time-consuming data is determined to be larger than the third time-consuming data, sending prompt information to a user, wherein the prompt information is used for indicating that the node runs overtime; and the third time consumption data is the sum of the second time consumption data and preset redundant time consumption.
8. An apparatus for predicting a node's elapsed time, comprising:
the first acquisition unit is used for acquiring first time-consuming data of the node in a historical time period, a first cycle value of a service and preset comparison information; the node is used for executing the service; the preset comparison information comprises: at least one prediction model, first accuracy information of the prediction model, and second accuracy information of the prediction model; the first precision information is used for representing the prediction precision of the prediction model when the prediction model predicts the periodic time sequence; the second precision information is used for representing the prediction precision of the prediction model when the aperiodic time sequence is predicted;
a first determining unit, configured to determine a periodic identifier of the node according to the first time consumption data and the first period value; the periodicity identification is used for indicating whether the first time-consuming data has periodicity or not;
the second determining unit is used for determining a prediction model to be called according to the periodic identification and the preset comparison information;
and the third determining unit is used for determining second time consumption data of the node in the current time period according to the prediction model to be called and the first time consumption data.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program is executed by a processor to implement the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211304032.1A CN115509868A (en) | 2022-10-24 | 2022-10-24 | Method, device and equipment for predicting node time consumption and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211304032.1A CN115509868A (en) | 2022-10-24 | 2022-10-24 | Method, device and equipment for predicting node time consumption and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115509868A true CN115509868A (en) | 2022-12-23 |
Family
ID=84512007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211304032.1A Pending CN115509868A (en) | 2022-10-24 | 2022-10-24 | Method, device and equipment for predicting node time consumption and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115509868A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117455643A (en) * | 2023-10-13 | 2024-01-26 | 厦门国际银行股份有限公司 | Intelligent monitoring method, device and equipment for batch processing operation |
-
2022
- 2022-10-24 CN CN202211304032.1A patent/CN115509868A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117455643A (en) * | 2023-10-13 | 2024-01-26 | 厦门国际银行股份有限公司 | Intelligent monitoring method, device and equipment for batch processing operation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9846601B2 (en) | Method and apparatuses for determining a leak of resource and predicting usage of resource | |
CN114140034B (en) | Quality monitoring method based on working conditions and related device | |
CN115509868A (en) | Method, device and equipment for predicting node time consumption and storage medium | |
CN115034519A (en) | Method and device for predicting power load, electronic equipment and storage medium | |
CN113688026B (en) | Data simulation method, device, equipment and storage medium | |
CN109284193B (en) | Distributed data processing method based on multithreading and server | |
CN115098198B (en) | Method for realizing a large number of timers | |
CN112215511B (en) | Attendance data calculation method, device and equipment | |
CN110347572A (en) | A kind of performance logs output method, device, system, equipment and medium | |
CN114301805B (en) | Method and device for determining number of devices and electronic device | |
CN115934568A (en) | Method and related device for automatically testing performance of exported file | |
CN112083946B (en) | Method, device, terminal and medium for predicting program load rate of direct current protection system | |
CN114462710A (en) | Short-term prediction method, device and medium for fan generated power | |
CN118013419B (en) | Predictive maintenance data acquisition method and system for petrochemical industry | |
CN113517989B (en) | Resource charging method and device for IaaS cloud platform | |
CN116069471B (en) | Deterministic scheduling method and device for tasks and electronic equipment | |
CN110113434B (en) | Method, device and equipment for balancing automatic scheduling of jobs and storage medium | |
CN114840380A (en) | Alarm method, alarm device, electronic equipment and storage medium | |
CN108805778A (en) | Electronic device, the method and storage medium for acquiring collage-credit data | |
CN111984538A (en) | System information output method and device, computer readable storage medium and terminal | |
CN117234865A (en) | Method, device, equipment, medium and controller for determining software performance data | |
CN113064714A (en) | Method and device for processing task by using idle resource in research and development environment | |
CN118963964A (en) | Multi-task processing method and device, electronic equipment and storage medium | |
CN116955501A (en) | Data verification method, device, equipment and medium for database pull chain table | |
CN114036033A (en) | Load rate calculation method and calculation system |
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 |