CN113902260A - Information prediction method, information prediction device, electronic equipment and medium - Google Patents

Information prediction method, information prediction device, electronic equipment and medium Download PDF

Info

Publication number
CN113902260A
CN113902260A CN202111076962.1A CN202111076962A CN113902260A CN 113902260 A CN113902260 A CN 113902260A CN 202111076962 A CN202111076962 A CN 202111076962A CN 113902260 A CN113902260 A CN 113902260A
Authority
CN
China
Prior art keywords
reference value
moving average
data
ema
dif
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
CN202111076962.1A
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.)
Shanghai Qiyue Information Technology Co Ltd
Original Assignee
Shanghai Qiyue Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qiyue Information Technology Co Ltd filed Critical Shanghai Qiyue Information Technology Co Ltd
Priority to CN202111076962.1A priority Critical patent/CN113902260A/en
Publication of CN113902260A publication Critical patent/CN113902260A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0637Strategic management or analysis, e.g. setting a goal or target of an organisation; Planning actions based on goals; Analysis or evaluation of effectiveness of goals
    • G06Q10/06375Prediction of business process outcome or impact based on a proposed change

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Educational Administration (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an information prediction method, an information prediction device, electronic equipment and a medium. The method comprises the steps of obtaining historical data in a preset time period, and calculating two corresponding index moving average values according to the historical data; calculating a first reference value according to the designated exponential moving average value; smoothing the first reference value to obtain a second reference value; obtaining a third reference value based on the first reference value and the second reference value; the first reference value, the second reference value and the third reference value are analyzed based on time, thereby obtaining a prediction result. The information prediction method based on the invention completes the trend analysis of the historical cost, predicts from the angle of objective change of data, has reliable prediction conclusion and guaranteed data safety, and is beneficial to automatically controlling the increase and decrease of data in application scene decision.

Description

Information prediction method, information prediction device, electronic equipment and medium
Technical Field
The present invention relates to the field of data processing, and in particular, to an information prediction method, system device, and medium.
Background
In data processing in fields related to production, economy (including but not limited to finance, funds, stocks) and the like with higher requirements on data security, an analysis mode is generally adopted, data are analyzed and processed mainly by relying on experience accumulation of people, understanding of industries, policies, environments and the like by research institutions, and data development trends are predicted.
Thus, there is a need for an automatic and more accurate information prediction method.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a technical scheme of an information prediction method, a device, equipment and a medium, aiming at solving the technical problem of predicting the future data change trend based on the historical data change; furthermore, the technical problem of how to use the conversion data of the historical data to determine the change state of the MACD through an exponential smooth different-identical moving average first-sum-difference value algorithm so as to accurately predict the change trend of the future data is solved, and further, the technical problem of how to automatically predict so as to realize intelligent decision and even intelligent automatic data control (such as automatically increasing, reducing corresponding production and business data and the like according to prediction) is solved.
In order to solve the above technical problem, a first aspect of the present invention provides an information prediction method, including the following steps: calculating a first reference value based on two corresponding index moving average values EMA calculated by the acquired historical data in two preset time periods; determining a third reference value according to the first reference value and a second reference value obtained by smoothing the first reference value; and predicting and outputting a result according to the index moving average value, the first reference value, the second reference value and the third reference value.
According to a preferred embodiment of the present invention, the calculating of the first reference value based on the two corresponding exponential moving average values EMA calculated from the acquired historical data for the two preset time periods includes: calculating two corresponding exponential moving average values EMA based on the obtained historical data of each time point in two preset time periods; the two preset time periods are two historical time lengths which are specified by a user and are earlier than the current time, and the starting points of the two historical time lengths are the same while the end points are different; and performing difference calculation on two corresponding exponential moving average values EMA to obtain the first reference value.
According to a preferred embodiment of the present invention, calculating two corresponding index moving average values EMA based on the obtained historical data of each time point in two preset time periods specifically includes: pre-constructing a definition formula of an exponential moving average value EMA; and calculating EMAs of the two preset time periods according to the historical data of the common starting time point and the two different ending time points of the two preset time periods to be predicted based on the definitional formula.
According to a preferred embodiment of the present invention, based on the definitional formula, the calculating an EMA of each preset time period according to historical data of a common starting time point and two different ending time points of two preset time periods to be predicted specifically includes: let xnFor the nth time point history data, xn-1For the (n-1) th time point historical data, ta and tb are respectively different ending time points of two preset time periods, and the EMA formula of each preset time period is calculated based on the definition formula as follows:
Figure BDA0003262597280000021
Figure BDA0003262597280000022
calculating a difference between two corresponding exponential moving average values EMA to obtain the first reference value, specifically including: the first reference value is a difference value DIF; EMA with early ending time point in two preset time periodsta(xn) EMA with late ending time subtractedtb(xn) Obtaining the difference value DIF (x)n)。
According to a preferred embodiment of the present invention, smoothing the first reference value to obtain a second reference value specifically includes: and smoothing the difference value DIF to obtain a corresponding different and same moving average DEA, wherein the calculation formula is as follows:
DEA(xn)=EMA[DIF(xn)];
wherein DEA (x) is obtained based on said definitionn) Denotes the difference value DIF (x)n) The dissimilarity moving average of the corresponding time point t delta; wherein t Δ is a time point earlier than the two end time points in the two preset time periods; the iso-moving average DEA is taken as the second reference value.
According to a preferred embodiment of the present invention, determining a third reference value according to a first reference value and a second reference value obtained by smoothing the first reference value specifically includes: based on the difference value DIF and the dissimilarity moving average DEA, obtaining an exponential smooth dissimilarity moving average MACD through weighted moving average calculation, wherein the calculation formula is as follows:
MACD(xn)=[DIF(xn)-DEA(xn)]×2。
wherein, MACD (x)n) Indicating the corresponding difference value DIF (x)n) Is used to smooth the iso-moving average line.
According to a preferred embodiment of the present invention, predicting and outputting a result according to analyzing the exponential moving average, the first reference value, the second reference value, and the third reference value includes: inputting two calculated exponential moving average values EMA corresponding to two different end time points in two preset time periods to be predicted, a difference value DIF serving as a first reference value, a dissimilarity moving average DEA serving as a second reference value and corresponding to the difference value DIF, and an exponential smooth dissimilarity moving average MACD serving as a third reference value and corresponding to the difference value DIF into a trained machine learning model for prediction; and comparing the predicted information with a threshold value, determining a corresponding data control result and outputting the data control result.
According to a preferred embodiment of the present invention, further comprising: the machine learning model is an XGBOOST algorithm; training the machine learning model, specifically comprising: defining positive and negative samples by analyzing a difference value DIF and a dissimilarity moving average DEA of the historical data in the selected time period or analyzing an index smooth dissimilarity moving average MACD, the difference value DIF and the dissimilarity moving average DEA of the historical data in the selected time period; extracting feature data corresponding to the positive and negative samples, wherein the feature data at least comprise an exponential moving average value EMA, a difference value DIF, an iso-moving average DEA and an exponential smooth iso-moving average MACD; inputting the positive and negative samples and the corresponding characteristic data as a training set and a test set into the machine learning model for model training to obtain a trained machine learning model; the prediction is to predict two input exponential moving average values EMA, a first reference value, a second reference value and a third reference value by using a function predict _ proba (); the predicted information is a probability value, and the threshold value is a probability value selected from 0 to 1; when the predicted information is greater than the threshold, determining that the data control result is required to be reduced; when the predicted information is less than the threshold, the data control result is determined to need to be increased.
A second aspect of the present invention provides an information prediction apparatus, including: the first reference value calculation module is used for calculating a first reference value based on two corresponding index moving average values EMA calculated by the acquired historical data in two preset time periods; a third reference value calculating module, configured to determine a third reference value according to the first reference value and a second reference value obtained by smoothing the first reference value; a result output module: and the index moving average value is used for predicting and outputting a result according to the analysis of the index moving average value, the first reference value, the second reference value and the third reference value.
A third aspect of the present invention provides an electronic device, comprising: a memory for storing a computer executable program and a processor for executing the computer executable program in the memory to implement the steps of the method of the first aspect.
The fourth aspect of the present invention also proposes a computer readable medium storing one or more programs which, when executed by a processor, implement the steps of the method of the first aspect.
A fifth aspect of the present invention also proposes a computer program implementing the steps of the method of the first aspect when executed.
Based on the information prediction method, the data change and/or development trend analysis and processing are completed through the historical data, the accuracy and the correctness of information prediction are improved, and the safety and the reliability of data information analysis and prediction can be more effectively ensured.
Furthermore, in the process of processing historical data, through trend analysis of cost information and the like in the historical data, from the perspective of objective massive data, the change of a reference value and the change of the cost development trend are finally predicted completely on the basis of the change rule of the objective data, manpower and experience factors are not needed, so that the obtained information prediction result is more correct and accurate, further, due to the fact that subjective interference is reduced, authenticity and interpretability of the information better accord with objective rules, and the information is fully used and reasonably predicted and explained.
Further, according to the reliable and accurate prediction result, intelligent decision under production and marketing scenes can be realized according to the threshold values of DIF and MACD, for example, the service change of each stage can be intelligently determined according to the threshold values, for example: the marketing putting magnitude and the like, so that reasonable judgment and decision can be made. Even the automatic data change control of the corresponding rule (for example, increasing or decreasing the data amount of the corresponding production material, increasing or decreasing the number of business processes, increasing or decreasing the business data, etc.) can be intelligently performed according to the accurate, safe and reliable prediction and the rule of the predetermined matching prediction trend and the business control.
Drawings
In order to make the technical problems solved by the present invention, the technical means adopted and the technical effects obtained more clear, the following will describe in detail the embodiments of the present invention with reference to the accompanying drawings. It should be noted, however, that the drawings described below are only illustrations of exemplary embodiments of the invention, from which other embodiments can be derived by those skilled in the art without inventive step.
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of an information prediction method according to the present invention;
FIG. 2 is a schematic flow chart diagram illustrating an embodiment of an information prediction method according to another embodiment of the present invention;
FIG. 3 is a diagram illustrating the trend of index of DIF, DEA, and MACD when automatically analyzing the intelligent marketing cost of 1-6 months in a year in another embodiment according to the technical solution of the present invention;
FIG. 4 is a block diagram of an embodiment of an information prediction apparatus according to the present invention;
FIG. 5 is a block diagram of an embodiment of an electronic device in accordance with the present invention;
fig. 6 is a block diagram of an embodiment of a computer-readable storage medium according to the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention may be embodied in many specific forms, and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art.
The structures, properties, effects or other characteristics described in a certain embodiment may be combined in any suitable manner in one or more other embodiments, while still complying with the technical idea of the invention.
In describing particular embodiments, specific details of structures, properties, effects, or other features are set forth in order to provide a thorough understanding of the embodiments by one skilled in the art. However, it is not excluded that a person skilled in the art may implement the invention in a specific case without the above-described structures, performances, effects or other features.
The flow chart in the drawings is only an exemplary flow demonstration, and does not represent that all the contents, operations and steps in the flow chart are necessarily included in the scheme of the invention, nor does it represent that the execution is necessarily performed in the order shown in the drawings. For example, some operations/steps in the flowcharts may be divided, some operations/steps may be combined or partially combined, and the like, and the execution order shown in the flowcharts may be changed according to actual situations without departing from the gist of the present invention.
The block diagrams in the figures generally represent functional entities and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The same reference numerals denote the same or similar elements, components, or parts throughout the drawings, and thus, a repetitive description thereof may be omitted hereinafter. It will be further understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, or sections, these elements, components, or sections should not be limited by these terms. That is, these phrases are used only to distinguish one from another. For example, a first device may also be referred to as a second device without departing from the spirit of the present invention. Furthermore, the term "and/or", "and/or" is intended to include all combinations of any one or more of the listed items.
The following may explain or explain terms that may be involved in various embodiments of the present invention:
DIF (Difference value) difference value. The variance value is an index that measures the variance of data over a period of time. Taking the analysis of stock market data as an example, a difference value can be used as a signal for measuring the change of the market quotation, such as subtracting the EMA value of 26 days from the EMA value of 12 days; in a continuous trend of data change such as rising, the 12-day EMA is above the 26-day EMA, and the positive difference (+ DIF) therebetween will be larger, whereas in falling, the difference may become negative (-DIF) and larger.
EMA (explicit Moving Average) index Moving Average. Also called the EXPMA index, is a trend-like index, and the exponential moving average is a moving average weighted exponentially decreasing.
DEA (Difference Exponential Average) index smoothing index is an index different from the moving Average.
MACD (Moving Average Convergence and Divergence) index smooth iso-Moving Average. The dissimilarity moving average line is developed from a double-exponential moving average line, and a fast line DIF is obtained by subtracting a slow exponential moving average line (for example, EMA: EMA26 at 26 days) from a fast exponential moving average line (for example, EMA: EMA12 at 12 days); next, calculate the EMA (9 th day) value DEA for DIF, and obtain the MACD column using 2 × (fast line DIF-DIF, such as a 9 th day weighted moving average DEA). The change of MACD represents the change of data trend, and the MACD of different K line levels represents the increase, decrease/fall or fluctuation trend in the current level period.
In an embodiment of the technical solution of the present invention, specifically, based on historical data (e.g., historical cost, historical stock price, sales volume, etc.), a difference value algorithm is used to move an average line rapidly and a slow moving average line, and a value of the average line of the two is used to measure a basis of a difference value DIF between the two, and then a smooth moving average line of an N period of the DIF is obtained, and the value of the DIF is compared with a value of an exponential smooth different average line to obtain a predicted data change state (e.g., cost trend, stock price rising and falling trend, etc.).
The information prediction scheme provided by the invention starts from data, can evaluate and predict future data change from the historical data change of a month (for example, predict the future cost trend in the cost change during production or marketing, and the like), and can complete the update of new tasks (for example, the stimulation cost, and the like). Furthermore, a more accurate data change prediction result is obtained based on the analysis and processing of objective massive historical data, so that the data safety and reliability are guaranteed, and the data change condition is taken as the basis, so that the serious data safety risk caused by misleading due to inaccuracy or error of data change is avoided.
Furthermore, the more accurate prediction result can also ensure that the subsequent data processing and decision making are more accurate, thereby correctly guiding the production and operation activities, such as marketing and the like, to have more definite data indexes and better interpretability in the decision making, and the following decision making is as follows: and determining the trend of business change in a production or marketing scene, and the like (for example, the put tasks in marketing can change according to the trend of daily cost change). The whole big data processing scheme does not intervene in artificial participation and judgment, realizes analysis, prediction and judgment according to the fact objective data, can provide guidance decision-making in more places, really realizes intelligent decision-making and provides basic data accuracy guarantee for various application scenes such as production, marketing and the like, namely effectively ensures that a safe, objective, reliable and intelligent data processing basis is provided.
[ example 1]
The implementation of the present invention is described below with reference to the flowchart of fig. 1 showing an embodiment of the information prediction method of the present invention. By the prediction method, the historical data can be reasonably used for predicting the state of future data change, and further, according to the threshold value, corresponding judgment can be made on data safety and reliability, so that whether to continue to increase services such as the delivery magnitude and the like can be reasonably judged in an actual service scene. The present embodiment includes:
step 101, obtaining historical data in two preset time periods, and calculating two corresponding index moving average values EMA based on the historical data.
In one embodiment, the preset time period may be specified by a user according to an actual application scenario. Further, the two preset time periods are two historical time lengths which are specified by the user and are earlier than the current time. Further, the start time and the end time of the two time periods may be the same and different. Further, by an EMA definitional expression, EMA defining the start time and two end times of two time periods, two corresponding EMA are calculated based on the history data of each time point in the two time periods.
Specifically, taking the service data processing as an example, the time period may be set according to the requirement or may be set according to a predetermined type of time point. If the two preset time periods are preset by day, namely from day to day, the historical data may include the business data required for calculation for each day in each time period; if preset on an hourly basis, i.e., hours to hours, the historical data may include hourly traffic data required for calculations in each time period; and so on. But generally the predetermined type of time points of the two time periods are the same.
During calculation, the historical data generated by the services corresponding to the respective type time points in the TA and the TB in two preset time periods are used for calculating the moving average value in the corresponding time period, for example, the historical data in the TA is used for calculating to obtain the first exponential moving average value EMA1, namely the EMAtaCalculating historical data in TB to obtain a second index moving average value EMA2 namely EMAtb
Further, when the EMA is calculated, the defined formula can be constructed in advance: pair sequence { x ] of EMAnDefine an exponential moving average EMA with period N up to the nth termN(xn) Comprises the following steps:
Figure BDA0003262597280000091
wherein N, k and N are natural numbers.
Further, the value of k may theoretically be infinite, and in practical applications, k is generally limited to be less than or equal to n.
In particular, the pair sequence { x of EMA in the inventionnDefine an exponential moving average EMA with period N up to the nth termN(xn) Comprises the following steps:
Figure BDA0003262597280000092
i.e. the value of k is limited to n-1, the historical data at the first point in time is practically the same as the historical data at the previous point in time, i.e. there is no previous data.
Specifically, the method comprises the following steps: calculation of EMA at the start time of the time period: according to the definition, since x1There is no data before, and the start of the two preset time periods are the same, so x0=x-1=x-2=…=x1
Can obtain
EMAN(x1)=x1
Since the two time period end time points are different, the definition of EMA for the respective end time point is calculated:
as TA period end point TA:
Figure BDA0003262597280000093
as the TB period end point TB:
Figure BDA0003262597280000094
this allows to calculate any point x in time of the time periodnThe respective EMA of the two time periods is calculated:
let xnFor the nth time point service history data, xn-1Service history data for the previous, i.e. the (n-1) th time point, with tend as the end point of each time period, whereby the formula calculated according to the definitional formula is
Figure BDA0003262597280000095
Taking the foregoing TA ending at TA and TB ending at TB as an example, the EMA calculation formula obtained according to the defined formula for the TA and TB time points corresponding to the two preset time periods is:
Figure BDA0003262597280000101
Figure BDA0003262597280000102
specifically, taking the service data of the intelligent marketing scene as an example: in the prediction, a time period (e.g., a first time period: 1 month, 1 day to 12 days) is directly set, historical data of the time period, such as cost price per day, etc., is obtained, and a moving average of marketing costs may be calculated to obtain an exponential moving average (e.g., a first exponential moving average), and similarly, another time period (e.g., a second time period: 1 month, 1 day to 26 days) is directly set, historical data of the time period, such as cost price per day, etc., is obtained, and a moving average of marketing costs may be calculated to obtain another exponential moving average (e.g., a second exponential moving average).
In one embodiment, the EMA is calculated, taking historical data such as the historical cost price of the marketing scenario as an example:
the construction definition formula: pair sequence { x ] of EMAnDefine an exponential moving average EMA with period N up to the nth termN(xn) Comprises the following steps:
Figure BDA0003262597280000103
the characteristic of the EMA weighted average can be seen from the definitional equation. In the EMA index, the weight coefficient of daily/daily cost is scaled down exponentially. The closer the time is to the present/current moment, the more its weight is. The EMA function strengthens the weight ratio to the recent price and can reflect the fluctuation condition of the data such as the recent cost price in time. The upper limit on k in practical applications may be limited to n-1.
EMA calculation on the same start day for two preset time periods: according to the definition, since x1Has no data before, so x0=x-1=x-2=…=x1. Can obtain
EAAN(x1)=x1
EMA calculation for the end days of both periods: in conjunction with the foregoing calculation of the start day, defining the EMA on day 12 and the EMA on day 26 as:
Figure BDA0003262597280000104
Figure BDA0003262597280000111
this allows calculation of any day x in the time periodnCost price data, whereby different EMA for two time periods are calculated: let xnIs the nth cost price, xn-1Is the cost price of the (n-1) th day, therefore,
Figure BDA0003262597280000112
Figure BDA0003262597280000113
and 102, calculating a first reference value according to the exponential moving average value, wherein the first reference value is a difference value between the exponential moving average value and the exponential moving average value.
In one embodiment, the first reference value may be determined by performing a difference calculation on the two calculated exponential moving averages, and the first reference value may be a difference value.
Bearing the above example of TA and TB time periods, EMA was obtainedtaAnd EMAtbThe DIF value is calculated as: EMAta-EMAtbFurther DIF (x)n)=EMA12(xn)-EMA26(xn)。
Specifically, taking an intelligent marketing scenario as an example: in the case of the two preceding time periods, the exponential moving average for day 12 was subtracted by the exponential moving average for day 26. As shown in Table 1, the simulation table is an intelligent marketing cost simulation table for a certain service line in 1-6 months of a year, and EMA is calculated according to the cost price of 1 month and 1 day to 12 days of a year12Calculating the cost price of each day from 1 month and 1 day to 26 days to obtain EMA26And finally EMA is used12-EMA26And calculating to obtain a DIF value.
And 103, smoothing the first reference value to obtain a second reference value.
In one embodiment, the dissimilarity moving average DEA of the first reference value, e.g. the difference value DIF fast line, is calculated, which is a slow line indicator. The smoothing process uses a calculation method similar to an exponential moving average. Further, the DEA slow line index is obtained by smoothing the DIF index, which represents the dissimilarity moving average of the DIF fast line.
In the foregoing example, the calculation of DEA refers to the calculation of EMA, for example, based on the difference value DIF, by using the EMA definition formula:
DEA(xn)=EMA[DIF(xn)]
let xnFor the nth time point service history data, xn-1For the (n-1) th time point service historical data, namely:
Figure BDA0003262597280000121
where t Δ is a time point existing in each preset time period, which indicates that DIF (x) is calculatedn) DEA (x) of the corresponding weighted moving average of the time length from the start time point of the time period to the t delta time pointn). The t delta is a time point in two preset time periods which is earlier than two ending time points.
Specifically, taking an intelligent marketing scenario as an example: the time period is as for days 12 and 26 of the foregoing scene example, and the 9-day weighted moving average line DEA of DIF is calculated, as is DEA9The slow line index is obtained by smoothing the DIF index, and represents the isomorphic moving average of the DIF fast lines. And DEA9Is calculated by an EMA definitional formula based on a difference value DIF, and specifically, DEA is calculated in a similar manner to the EMA9The equation for the slow line may be:
DEA(xn)=EMA9[DIF(xn)]
let xnIs the nth cost price, xn-1For the n-1 th day cost price, namely:
Figure BDA0003262597280000122
a third reference value is determined 104 based on the first reference value and the second reference value.
In one embodiment, the MACD, i.e. the iso-moving average or MACD column, is calculated by weighting the moving average based on a first reference value, e.g. the difference value DIF and a second reference value DEA.
Taking the foregoing example, the fast moving average EMA is obtained from the double-exponential moving averagetaEMA minus slow exponential moving average linetbAnd obtaining a fast line DIF, and multiplying the DIF by the difference value of DEA of the corresponding t delta time length of the DIF and by 2 to obtain an index smooth different moving average line MACD column. The change in MACD can reflect a trend in the data, while the K-line graph represents the trend of the data increasing/decreasing in the current level cycle.
For example, in the foregoing scenario application, the fast line DIF is obtained by subtracting the slow exponential moving average line (EMA26) from the fast exponential moving average line (EMA12), and then the MACD column is obtained by 2 × (the 9-day weighted moving average line DEA of the fast line DIF-DIF). Thus, the resulting change in MACD reflects a change in the trend of the data, with MACDs at different K (daily K column) line levels representing a trend of increasing or decreasing data in the current level period.
The calculation formula of the exponential smoothing dissimilarity moving average line is as follows:
MACD(xn)=[DIF(xn)-DEA(xn)]×2
specifically, taking the aforementioned intelligent marketing scenario as an example, MACD can express the trend of rising and falling of cost price, stock price, and the like. Examples of data changes for MACD can be found in the column for the exponential smoothed isometry results MACD calculated from the marketing cost data in table 1.
And 105, predicting and outputting a result based on the index moving average, the first reference value, the second reference value and the third reference value.
Specifically, feature data such as two calculated exponential moving average values EMA corresponding to two different end time points in two preset time periods to be predicted, a difference value DIF serving as a first reference value, a dissimilarity moving average DEA corresponding to the difference value DIF serving as a second reference value, and an exponential smooth dissimilarity moving average line MACD corresponding to the difference value DIF serving as a third reference value are input into a trained machine learning model for prediction; and comparing the predicted information with a threshold value, determining a corresponding data control result and outputting the data control result. The machine learning model is an XGBOOST algorithm; the prediction is such feature data input using the function predict _ proba (): predicting two exponential moving averages, a first reference value, a second reference value and a third reference value; the predicted information is a probability value, and the threshold value is a probability value selected from 0 to 1; when the predicted information is greater than the threshold, determining that the data control result is required to be reduced; when the predicted information is less than the threshold, the data control result is determined to need to be increased. Furthermore, it is also possible to automatically display and output an analysis chart, a trend graph, or the like in accordance with the control, and even directly increase or decrease the corresponding data amount or the like.
For example: the method is applied to actual business scenes, can draw various chart display requirements, and further can directly realize automatic control from prediction to decision of production capacity, business monitoring and the like, such as directly controlling production according to the rule and inputting material types and quantity according to the corresponding preset rule, directly increasing or reducing the cost of inputting preset amount according to the rule and the corresponding preset rule, increasing or reducing the quantity of corresponding preset processing documents and the like.
Further, positive and negative samples are defined by analyzing DIF and DEA of data (such as various historical data in corresponding scenes) in a selected time period, or by analyzing MACD, DIF and DEA of data in a selected time period; extracting feature data corresponding to the positive and negative samples, wherein the feature data at least comprise an exponential moving average value EMA, a difference value DIF, an iso-moving average DEA and an exponential smooth iso-moving average MACD; and inputting the positive and negative samples and the corresponding characteristic data as a training set and a test set into the machine learning model for model training to obtain the trained machine learning model.
In one embodiment, the index of the exponential moving average EMA, the difference value DIF, the difference moving average DEA of the DIF fast line, and the exponential smooth difference moving average line MACD calculated based on the historical data are analyzed, corresponding predicted data values are sequentially drawn according to the time sequence to form a trend line of data change, and then, the prediction result is output and control is output, for example, the drawn trend line or a data change state diagram is displayed, and various graphs are displayed and output.
In one embodiment, the above calculated indicators (EMA, DIF, DEA, MACD, etc.) are evaluated based on historical experience and the actual data is automatically analyzed. Such as during analysis of historical data over a longer period of time Tl:
when the data of some time lengths in the longer time Tl are DIF and DEA which are both larger than 0 and the values of DIF and DEA are gradually increased, defining the data in the time lengths as positive samples and marking the data as 1;
when the data of some time lengths in the longer time Tl are DIF and DEA which are both less than 0 and the values of DIF and DEA are gradually reduced, defining the data in the time lengths as negative samples and marking the negative samples as 0;
when the data of some time lengths in the longer time Tl shows that MACD is changed from positive to negative, and the values of DIF and DEA are gradually reduced, defining the data in the time lengths as negative samples and marking the negative samples as 0;
when the data of some time duration within the longer time Tl shows that MACD changes from negative to positive, and the values of DIF and DEA are gradually increasing, the data in these time duration is defined as a positive sample, and is marked as 1.
Defining positive and negative samples, extracting/calculating data characteristics of the positive and negative samples in the Tl, using the sample data and the characteristics thereof in the Tl as a training set and a test set, and inputting the sample data and the characteristics into an algorithm model for model training. The algorithm model may use, for example, the XGBOOST algorithm.
Further, EMA of history data of dates (such as the aforementioned time periods TA, TB) to be predicted is requiredta、EMAtbAfter indexes such as DIF, DEA, MACD and the like are calculated (such as the calculation process), the indexes are input into the trained model for prediction to obtain an output result, and the output result is obtained according to the input resultAnd judging the change trend of the current data according to the result. Taking the XGBOOST algorithm as an example, after the index is input, a prediction _ proba () method is used to obtain a prediction that the input feature data is [0,1]]The probability value between 0 and 1, which is predicted as 1 in the output result, can be taken to judge the trend.
Further, the decision can be made according to the trend state of data increase and decrease, such as business increase and decrease, business change and the like in various scenes of controlling production, marketing and the like.
Specifically, taking the foregoing intelligent marketing scenario as an example, referring to the data in table 1, through the above calculation of indexes such as the Exponential Moving Average (EMA), the difference value (DIF), the difference moving average (DEA) of the DIF fast line, and the exponential smooth difference Moving Average (MACD), etc., of the intelligent marketing cost, the drawing of the map of the DIF, DEA, MACD indexes of the intelligent marketing cost in 1-6 months in a certain year is completed, as shown in fig. 3.
The analysis process mainly includes the study and judgment of the calculated indexes (EMA, DIF, DEA, MACD and the like) and the automatic analysis of actual data according to historical experience, and the cost price is taken as an example by combining the data in FIG. 3 and the data in Table 1:
I) and data in 2 months and 3 days to 2 months and 12 days can conclude that when the DIF and DEA are both greater than 0, and the values of the DIF and DEA are gradually increased, the cost is on the whole in an ascending trend. The data in this period is defined as positive samples, namely label: 1.
II) data of 24 days in 3 months to 13 days in 4 months can conclude that when the DIF and the DEA are both less than 0, and the values of the DIF and the DEA are gradually reduced, the cost is in a descending trend as a whole. And the data in this period is defined as negative samples, namely label: 0.
III) data of 12 days in month 2-27 days in month 3-13 days in month 3-24 days in month 5-2 days in month 5-26 days in month 3, it can be seen that when MACD is changed from positive to negative, and the values of DIF and DEA are gradually reduced, the cost is reduced as a whole. And the data in this period is defined as negative samples, namely label: 0.
IV) data of 27 days in month 2-13 days in month 3 and 13 days in month 4-2 days in month 5, when MACD is changed from negative to positive, and the values of DIF and DEA are gradually increased, the cost is on the whole in an ascending trend. And the data during this period is defined as positive samples, i.e. label: 1.
thus, for the definition of positive and negative samples and the calculation of data features, the XGBOOST algorithm in machine learning is used to train a model by using data from 2 months and 3 days to 5 months and 26 days for 113 days as a training set and a test set, then we calculate indexes such as EMA (12), EMA (26), DIF, DEA, MACD and the like of the predicted date, and input the 5 calculated features into the model, an array predicting the input feature data to be [0,1] can be obtained by using a predict _ proba () method, and a probability value between 0 and 1, for which the output result is predicted to be 1, is taken to study and judge the trend of marketing cost under the current data, specifically for example:
when the model output probability value y is greater than 0.5, the cost is probably in an ascending trend, and the intelligent marketing data input amount is controlled to achieve the purpose of controlling the cost under the same conversion condition.
When the model output probability value y is less than 0.5, the cost is probably in a descending trend, and the intelligent marketing data input amount is increased so as to achieve the purpose of improving marketing conversion in a cost controllable range.
Therefore, the method can complete automatic trend analysis of historical data, finally predicts the change and cost trend of the reference values from the data perspective, is more accurate in prediction, has no interference of subjective factors from the data perspective, enables the obtained conclusion to be more authentic and interpretable, ensures the safety and reliability of data, and realizes full use of information and reasonable prediction and interpretation of information. According to the reliable and accurate prediction result, intelligent decision under various mass data analysis scenes (such as production and marketing scenes) is realized according to the threshold values of the DIF and the MACD, for example, the change of the business data of each stage can be intelligently determined according to the threshold values, for example: the marketing putting magnitude and the like, so that reasonable judgment and decision can be made. And even further performing direct intelligent production automation data control, business processing automation data control and the like.
[ example 2 ]
The following is a main flow chart of the prediction process applied to an actual scene according to an embodiment of the technical solution of the present invention with reference to fig. 2. Here, the information prediction method of the present invention is specifically described with reference to fig. 1, 3 and table 1, taking a case of an intelligent marketing scenario, such as a stock market, as an example. The information prediction method comprises the following steps:
step 201, calculating an intelligent marketing cost moving average (EMA);
pair sequence { x ] of EMAnDefine an exponential moving average EMA with period N up to the nth termN(xn) Comprises the following steps:
Figure BDA0003262597280000161
the characteristic of the EMA weighted average can be seen from the definitional equation. In the EMA index, the weight coefficient of the cost per day is reduced in an exponential equal proportion mode. The closer the time is to the moment of the day, the more its weight. The EMA function strengthens the weight ratio to the recent price and can reflect the recent price fluctuation condition in time. In actual calculation, the upper limit ∞ of k in the definition formula may be specifically defined as n-1.
According to the formula, since x1Has no data before, so x0=x-1=x-2=…=x1. Can obtain
EMAN(x1)=x1
We therefore define day 12 EMA and day 26 EMA as:
Figure BDA0003262597280000171
Figure BDA0003262597280000172
let xnIs the nth cost price, xn-1Is the cost price of the (n-1) th day, therefore,
Figure BDA0003262597280000173
Figure BDA0003262597280000174
step 202, calculating a difference value (DIF) of the intelligent marketing cost;
the difference value is the result of subtracting the value of the marketing cost EMA of 26 days from the value of the marketing cost EMA of 12 days, namely
DIF(xn)=EMA12(xn)-EMA26(xn)
Based on the above formula, we can calculate the value of DIF. If attached table 1 is a business line intelligent marketing cost simulation table in 1-6 months of a year, EMA is calculated according to cost price of 1 month, 1 day and 12 days of a year12Calculating the cost price of 1 month, 1 day to 26 days26And finally EMA is used12-EMA26Formula we calculate the DIF value.
Step 203, calculating the dissimilarity moving average (DEA) of the DIF fast line;
the DEA slow line index is the smoothing treatment of the DIF index, which means the different moving average of the DIF fast line, the calculation method of the index is the same as the calculation method of the EMA, and the calculation formula of the DEA slow line is as follows:
DEA(xn)=EMA9[DIF(xn)]
let xnIs the nth cost price, xn-1For the n-1 th day cost price, namely:
Figure BDA0003262597280000175
step 204, calculating an exponential smooth iso-Moving Average (MACD);
the calculation formula of the exponential smoothing dissimilarity moving average line is as follows:
MACD(xn)=[DIF(xn)-DEA(xn)]×2
the results of the exponential smoothed heterologs calculated using the marketing cost data in the table are shown in the MACD column in table 1.
Step 205, making a decision on an index;
through the calculation of indexes such as the index moving average (EMA), the difference value (DIF), the difference moving average (DEA) of the DIF fast line, the index smooth difference moving average line (MACD) and the like of the intelligent marketing cost, the drawing of index trend graphs of the DIF, DEA and MACD of the intelligent marketing cost in 1-6 months in a certain year is completed, and the drawing is shown in figure 3. According to the judgment of the indexes and the analysis of the actual data:
table 1:
Figure BDA0003262597280000181
Figure BDA0003262597280000191
Figure BDA0003262597280000201
Figure BDA0003262597280000211
from the data of day 2/month 3 — day 2/month 12 in fig. 3 and table 1, it can be concluded that when both DIF and DEA are greater than 0, and the values of DIF and DEA are gradually increased, the cost as a whole shows an upward trend. The data during this period is defined as positive samples, i.e. label: 1.
from the data of 24 days in 3 months to 13 days in 4 months in fig. 3 and table 1, it can be concluded that when DIF and DEA are both less than 0, and the values of DIF and DEA are gradually decreased, the cost is reduced as a whole. The data during this period is defined as negative samples, namely label: 0.
from the data of 2/12/2/27/3/13/3/24/5/2/5/26/3 in fig. 3 and table 1, it can be seen that the cost is reduced as a whole when MACD is changed from positive to negative and the values of DIF and DEA are gradually reduced. The data during these periods are defined as negative samples, namely label: 0.
from the data of 27 days 2-13 days 3-13 days 4-13 days 5-2 days 5 in fig. 3 and table 1, the cost as a whole shows a rising trend when MACD changes from negative to positive and the values of DIF and DEA are gradually increased. The data for these periods are defined for positive samples, i.e. label: 1.
through the definition of the positive and negative samples and the calculation of the data characteristics, the XGB OST algorithm in machine learning is used for carrying out model training by using data of 2 months and 3 days to 5 months and 26 days for 113 days as a training set and a test set. Then, for the example of the dates to be predicted, for example, the aforementioned 12 days and 26 days, the corresponding indicators such as EMA (12), EMA (26), DIF, DEA, MACD, etc. are calculated in the aforementioned manner, and the 5 calculated features are input into the model, an array predicting the input feature data as [0,1] can be obtained by using the predict _ proba () method, and the probability value between 0 and 1, at which the output result is predicted to be 1, is taken to study the trend of marketing cost under the current data, specifically for example:
when the model output probability value y is greater than 0.5, the cost is probably in an ascending trend, and the intelligent marketing data input amount is controlled to achieve the purpose of controlling the cost under the same conversion condition.
When the model output probability value y is less than 0.5, the cost is probably in a descending trend, and the intelligent marketing data input amount is increased so as to achieve the purpose of improving marketing conversion in a cost controllable range.
In this embodiment 2, the above steps S201 to S204 are used to complete the EMA for intelligent marketing cost12、EMA26And the indexes such as DIF, DEA, MACD and the like are calculated, so that actual service data are used as a basis in each step, and the change of the indexes and the cost trend are summarized in the step S205 to finally predict the intelligent marketing cost.
Therefore, in the marketing process of the intelligent marketing scene, the application history conversion data is fully utilized, reasonable prediction and explanation on intelligent marketing cost trend are realized, more accurate increase and decrease of data are ensured, and data safety is ensured. Particularly, the change of the MACD column and the like are calculated by using the exponential smooth iso-moving average line and the difference value, historical conversion data is reasonably used for predicting the future cost change trend, and reasonable decision and judgment are carried out on the intelligent marketing delivery magnitude according to the DIF and the MACD threshold (or the size change state).
The invention realizes that all from the data perspective, the machine learning algorithm is used for fitting the data, and finally the service data trend prediction is realized, including but not limited to the trend prediction analysis about the increase and decrease/rise and fall of mass data applied to various production control scenes and the marketing scenes of the example, and further the increase and decrease control of the corresponding data volume can be directly executed according to the preset rule. Therefore, the obtained data analysis result has objectivity, accuracy, authenticity and interpretability, and even in the range of data safety and controllability, the automatic service delivery can be controlled more intelligently, and the like.
[ example 3 ]
Fig. 4 is a block diagram of an embodiment of an information prediction apparatus according to the present invention. As shown in fig. 4, the information prediction methods in embodiments 1 and 2 can reasonably use historical data to predict the future data change state through the prediction, and further can make a reasonable decision such as judgment and evaluation on whether to continue to increase traffic, such as an input level, according to a threshold. The device at least comprises:
an exponential moving average calculation module: the method is used for acquiring historical data in two preset time periods and calculating two corresponding index moving average values EMA based on the historical data. For specific functions of this module, refer to the specific processing described in step 101 in embodiment 1, and are not described herein again.
And the first reference value calculating module is used for calculating a first reference value according to the exponential moving average value, wherein the first reference value is a difference value between the exponential moving average value and the first reference value. The specific functions of the module refer to the specific processing described in step 102 in embodiment 1, and are not described herein again.
And the second reference value calculating module is used for smoothing the first reference value to obtain a second reference value. The specific function of this module refers to the specific processing described in step 103 in embodiment 1. And will not be described in detail herein.
A third reference value calculation module for determining a third reference value based on the first reference value and the second reference value. The specific functions of this module refer to the specific processing described in step 104 in embodiment 1, and are not described herein again.
And a result output module (prediction result) for performing prediction and outputting a result based on the analysis of the exponential moving average, the first reference value, the second reference value, and the third reference value. The specific functions of this module refer to the specific processing described in step 105 in embodiment 1, and are not described herein again.
Therefore, the method can complete automatic trend analysis of historical data, finally predicts the change and cost trend of the reference values from the data perspective, is more accurate in prediction, has no interference of subjective factors from the data perspective, enables the obtained conclusion to be more authentic and interpretable, ensures the safety and reliability of data, and realizes full use of information and reasonable prediction and interpretation of information. According to the reliable and accurate prediction result, intelligent decision under various mass data analysis scenes (such as production and marketing scenes) is realized according to the threshold values of the DIF and the MACD, for example, the change of the business data of each stage can be intelligently determined according to the threshold values, for example: the marketing putting magnitude and the like, so that reasonable judgment and decision can be made. And even further performing direct intelligent production automation data control, business processing automation data control and the like.
[ example 4 ]
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as an implementation in physical form for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 5 is a block diagram of an exemplary embodiment of an electronic device according to the present invention. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic apparatus 200 of the exemplary embodiment is represented in the form of a general-purpose data processing apparatus. The components of the electronic device 200 may include, but are not limited to: a processor and memory, e.g., processing unit 210 and storage unit 220.
Specifically, in this example, the electronic apparatus includes: at least one processing unit 210, at least one memory unit 220, a bus 230 connecting different system components (including the memory unit 220 and the processing unit 210), a display unit 240, and the like.
The storage unit 220 stores a computer readable program, which may be a code of a source program or a read-only program. The program may be executed by the processing unit 210 such that the processing unit 210 performs the steps of various embodiments of the present invention. For example, the processing unit 210 may perform the steps shown in fig. 1 and 2.
The memory unit 220 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)2201 and/or a cache memory unit 2202, and may further include a read only memory unit (ROM) 2203. The storage unit 220 may also include a program/utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 230 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, display, network device, bluetooth device, etc.), enable a user to interact with the electronic device 200 via the external devices 300, and/or enable the electronic device 200 to communicate with one or more other data processing devices (e.g., router, modem, etc.). Such communication may occur via input/output (I/O) interfaces 250, and may also occur via network adapter 260 with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network such as the Internet). The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
[ example 5 ]
FIG. 6 is a schematic diagram of one embodiment of a computer-readable medium of the present invention. As shown in fig. 6, the computer program may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. The computer program, when executed by one or more data processing devices, enables the computer-readable medium to implement the above-described methods of the present invention.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a data processing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the present invention can be implemented as a method, an apparatus, an electronic device, or a computer-readable medium executing a computer program. Some or all of the functions of the present invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP).
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.

Claims (11)

1. An information prediction method, comprising the steps of:
calculating a first reference value based on two corresponding index moving average values EMA calculated by the acquired historical data in two preset time periods;
determining a third reference value according to the first reference value and a second reference value obtained by smoothing the first reference value;
and predicting and outputting a result according to the index moving average value, the first reference value, the second reference value and the third reference value.
2. The method of claim 1, wherein calculating the first reference value based on two corresponding exponential moving averages EMA calculated from the acquired historical data over two preset time periods comprises:
calculating two corresponding exponential moving average values EMA based on the obtained historical data of each time point in two preset time periods; the two preset time periods are two historical time lengths which are specified by a user and are earlier than the current time, and the starting time points of the two historical time lengths are the same, and the ending time points of the two historical time lengths are different;
and performing difference calculation on two corresponding exponential moving average values EMA to obtain the first reference value.
3. The method of claim 2, wherein calculating two corresponding exponential moving average values EMA based on the obtained historical data for each time point within two preset time periods comprises:
pre-constructing a definition formula of an exponential moving average value EMA;
and calculating EMAs of the two preset time periods according to the historical data of the common starting time point and the two different ending time points of the two preset time periods to be predicted based on the definitional formula.
4. The method of claim 3,
based on the definitional formula, according to historical data of a common starting time point and two different ending time points of two preset time periods to be predicted, calculating the EMA of each preset time period, and specifically comprising the following steps:
let xnFor the nth time point history data, xn-1For the (n-1) th time point historical data, ta and tb are respectively different ending time points of two preset time periods, and the EMA formula of each preset time period is calculated based on the definition formula as follows:
Figure FDA0003262597270000021
Figure FDA0003262597270000022
calculating a difference between two corresponding exponential moving average values EMA to obtain the first reference value, specifically including:
the first reference value is a difference value DIF;
EMA with early ending time point in two preset time periodsta(xn) Minus the end timeNight EMAtb(xn) Obtaining the difference value DIF (x)n)。
5. The method according to claim 4, wherein smoothing the first reference value to obtain a second reference value specifically comprises:
and smoothing the difference value DIF to obtain a corresponding different and same moving average DEA, wherein the calculation formula is as follows:
DEA(xn)=EMA[DIF(xn)];
wherein DEA (x) is obtained on the basis of the defined formulan) Denotes the difference value DIF (x)n) The dissimilarity moving average of the corresponding time point t delta; wherein t Δ is a time point earlier than the two end time points in the two preset time periods;
the iso-moving average DEA is taken as the second reference value.
6. The method according to claim 5, wherein determining a third reference value based on the first reference value and a second reference value obtained by smoothing the first reference value comprises:
based on the difference value DIF and the corresponding dissimilarity moving average DEA, obtaining an exponential smooth dissimilarity moving average MACD through weighted moving average calculation, wherein the calculation formula is as follows:
MACD(xn)=[DIF(xn)-DEA(xn)]×2。
wherein, MACD (x)n) Indicating the corresponding difference value DIF (x)n) Is used to smooth the iso-moving average line.
7. The method of any one of claims 1 to 5, wherein predicting and outputting a result based on analyzing the exponential moving average, the first reference value, the second reference value, and the third reference value comprises:
inputting two calculated exponential moving average values EMA corresponding to two different end time points in the two preset time periods to be predicted, a difference value DIF serving as a first reference value, a dissimilarity moving average DEA serving as a second reference value and corresponding to the difference value DIF, and an exponential smooth dissimilarity moving average line MACD serving as a third reference value and corresponding to the difference value DIF into a trained machine learning model for prediction;
and comparing the predicted information with a threshold value, determining a corresponding data control result and outputting the data control result.
8. The method of claim 7, further comprising:
the machine learning model is an XGBOOST algorithm;
training the machine learning model, specifically comprising:
defining positive and negative samples by analyzing a difference value DIF and a dissimilarity moving average DEA of the historical data in the selected time period or analyzing an index smooth dissimilarity moving average MACD, the difference value DIF and the dissimilarity moving average DEA of the historical data in the selected time period;
extracting feature data corresponding to the positive and negative samples, wherein the feature data at least comprise an exponential moving average value EMA, a difference value DIF, an iso-moving average DEA and an exponential smooth iso-moving average MACD;
inputting the positive and negative samples and the corresponding characteristic data as a training set and a test set into the machine learning model for model training to obtain a trained machine learning model;
the prediction is to predict two input exponential moving average values EMA, a first reference value, a second reference value and a third reference value by using a function predict _ proba ();
the predicted information is a probability value, and the threshold value is a probability value selected from 0 to 1;
when the predicted information is greater than the threshold, determining that the data control result is required to be reduced;
when the predicted information is less than the threshold, the data control result is determined to need to be increased.
9. An information prediction apparatus comprising:
the first reference value calculation module is used for calculating a first reference value based on two corresponding index moving average values EMA calculated by the acquired historical data in two preset time periods;
a third reference value calculating module, configured to determine a third reference value according to the first reference value and a second reference value obtained by smoothing the first reference value;
a result output module: and the index moving average value is used for predicting and outputting a result according to the analysis of the index moving average value, the first reference value, the second reference value and the third reference value.
10. An electronic device, comprising: a processor and a memory storing computer-executable instructions, characterized in that the computer-executable instructions, when executed, cause the processor to perform the steps of the method according to any one of claims 1 to 8.
11. A computer readable medium, characterized in that the computer readable medium stores one or more programs which, when executed by a processor, implement the steps of the method of any one of claims 1 to 8.
CN202111076962.1A 2021-09-14 2021-09-14 Information prediction method, information prediction device, electronic equipment and medium Pending CN113902260A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111076962.1A CN113902260A (en) 2021-09-14 2021-09-14 Information prediction method, information prediction device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111076962.1A CN113902260A (en) 2021-09-14 2021-09-14 Information prediction method, information prediction device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113902260A true CN113902260A (en) 2022-01-07

Family

ID=79028144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111076962.1A Pending CN113902260A (en) 2021-09-14 2021-09-14 Information prediction method, information prediction device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113902260A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151277A1 (en) * 2022-02-08 2023-08-17 深圳前海微众银行股份有限公司 Data processing method and apparatus, device, and storage medium
CN117726195A (en) * 2024-02-07 2024-03-19 创意信息技术股份有限公司 City management event quantity change prediction method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463678A (en) * 2014-12-18 2015-03-25 上海银天下科技有限公司 Industrial investment data processing method based on average optimization model
CN108549957A (en) * 2018-04-11 2018-09-18 中译语通科技股份有限公司 Internet topic trend auxiliary prediction technique and system, information data processing terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463678A (en) * 2014-12-18 2015-03-25 上海银天下科技有限公司 Industrial investment data processing method based on average optimization model
CN108549957A (en) * 2018-04-11 2018-09-18 中译语通科技股份有限公司 Internet topic trend auxiliary prediction technique and system, information data processing terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151277A1 (en) * 2022-02-08 2023-08-17 深圳前海微众银行股份有限公司 Data processing method and apparatus, device, and storage medium
CN117726195A (en) * 2024-02-07 2024-03-19 创意信息技术股份有限公司 City management event quantity change prediction method, device, equipment and storage medium
CN117726195B (en) * 2024-02-07 2024-05-07 创意信息技术股份有限公司 City management event quantity change prediction method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20230049089A1 (en) Method and Apparatus For Predicting Power Consumption, Device and Readiable Storage Medium
CN106095942B (en) Strong variable extracting method and device
CN110084271B (en) Method and device for identifying picture category
CN112541122A (en) Recommendation model training method and device, electronic equipment and storage medium
CN113902260A (en) Information prediction method, information prediction device, electronic equipment and medium
CN113837488B (en) Method, system and equipment for predicting energy consumption data
CN116307215A (en) Load prediction method, device, equipment and storage medium of power system
CN103617146B (en) A kind of machine learning method and device based on hardware resource consumption
CN112988840A (en) Time series prediction method, device, equipment and storage medium
CN107622413A (en) A kind of price sensitivity computational methods, device and its equipment
EP4040421B1 (en) Method and apparatus for predicting traffic data and electronic device
CN115994611A (en) Training method, prediction method, device and storage medium for category prediction model
CN114154252B (en) Risk assessment method and device for failure mode of power battery system of new energy automobile
CN109460474B (en) User preference trend mining method
CN112785111A (en) Production efficiency prediction method, device, storage medium and electronic equipment
CN117592510A (en) Load prediction method and system based on safety constraint
WO2023246391A1 (en) Extraction of risk feature description
CN114549032A (en) Stock processing method and device, computer storage medium and electronic equipment
CN113934894A (en) Data display method based on index tree and terminal equipment
CN106909744B (en) Method and system for dynamically evaluating reliability of process model
CN111210110A (en) Method and device for generating prevention strategy based on stress test and electronic equipment
CN118378632B (en) Digital teaching interaction method, system, equipment and storage medium
CN112785415B (en) Method, device and equipment for constructing scoring card model and computer readable storage medium
US7957943B2 (en) Method and system for modeling effects visually
CN118536673A (en) Method and device for predicting future technical hotspots, memory and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: Zhong Guo

Address after: Room 1109, No. 4, Lane 800, Tongpu Road, Putuo District, Shanghai, 200062

Applicant after: Shanghai Qiyue Information Technology Co.,Ltd.

Address before: Room a2-8914, 58 Fumin Branch Road, Hengsha Township, Chongming District, Shanghai, 201500

Applicant before: Shanghai Qiyue Information Technology Co.,Ltd.

Country or region before: Zhong Guo