CN112905909A - Data prediction method and device, computer readable storage medium and electronic equipment - Google Patents

Data prediction method and device, computer readable storage medium and electronic equipment Download PDF

Info

Publication number
CN112905909A
CN112905909A CN201911134599.7A CN201911134599A CN112905909A CN 112905909 A CN112905909 A CN 112905909A CN 201911134599 A CN201911134599 A CN 201911134599A CN 112905909 A CN112905909 A CN 112905909A
Authority
CN
China
Prior art keywords
time
data
period
reference data
target reference
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.)
Granted
Application number
CN201911134599.7A
Other languages
Chinese (zh)
Other versions
CN112905909B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911134599.7A priority Critical patent/CN112905909B/en
Publication of CN112905909A publication Critical patent/CN112905909A/en
Application granted granted Critical
Publication of CN112905909B publication Critical patent/CN112905909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0224Discounts or incentives, e.g. coupons or rebates based on user history
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0252Targeted advertisements based on events or environment, e.g. weather or festivals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure provides a data prediction method, a data prediction apparatus, a computer-readable storage medium, and an electronic device; relates to the technical field of computers. The method comprises the following steps: determining a plurality of reference time periods according to the specific time period and the time period variation range in the preset cycle; acquiring a historical data sequence corresponding to an event to be predicted in a previous preset period, and calculating reference data corresponding to the event to be predicted in a plurality of reference time periods respectively according to the historical data sequence; selecting target reference data meeting preset conditions from the reference data, and determining a target reference time interval corresponding to the target reference data from a plurality of reference time intervals; and predicting reference data corresponding to a target reference time interval of the event to be predicted in the current preset period according to the target reference data. The method in the present disclosure can predict data corresponding to an event in a future period by correlating a relationship between a date and the event so as to maximize an event profit from the data.

Description

Data prediction method and device, computer readable storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data prediction method, a data prediction apparatus, a computer-readable storage medium, and an electronic device.
Background
In real life, the occurrence of date-related events on different dates will generally produce different effects. For example, in a holiday, the user activity of the application program for group purchase of the coupons is usually higher than that of the application program in a non-holiday, and the background maintainer can adjust and schedule the computing resources according to the user activity to adapt to the current user amount, so that the problem of server abnormality when the user uses the application program is avoided.
Generally, people adjust and schedule computing resources in real time according to the user activity, however, scheduling delay exists, that is, the increasing speed of the user activity increasing rate is faster than the scheduling speed of the computing resources, and further server abnormality is easily caused, so that the content in the application program cannot be accessed, and the use experience of the user is affected.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a data prediction method, a data prediction apparatus, a computer-readable storage medium, and an electronic device, which can determine a required optimal time period and data corresponding to the time period according to a relationship between historical data and a date, so as to predict data corresponding to the time period in the future according to the time period and the data, thereby facilitating relevant people to make a countermeasure in advance by predicting the data in the future.
For example, for an application program for group purchase of coupons, the application can determine a target time period with higher user activity according to the relation between historical user activity data and dates, so that background maintenance personnel can adjust and schedule computing resources in advance before a future target time period, and further better deal with the upcoming target time period, improve the user experience, and improve the use viscosity of users.
For another example, when the method is applied to the stocks, the time period with the maximum profit can be determined according to the historical fluctuation amplitude of the stocks, and then the profit in the future time period can be predicted according to the historical profit in the time period, so that investors can invest according to the prediction data, and the profit is maximized.
For another example, for a hot spot information publishing platform, more hot spot information is usually published on some special dates, such as a hero day of a disaster in a souvenir. Before and after the dates, the access amount generally increases along with the increase of the number of the hotspot information, and when the method is applied to the hotspot information publishing platform, the special dates and the access amount data are associated to further determine the access amount data corresponding to the time period of each special date, so that relevant personnel can conveniently carry out advertisement putting according to the access amount, and the advertisement putting effect is improved.
Therefore, the scheduling delay problem can be solved, the user activity data corresponding to the future time period with higher user activity can be predicted by correlating the relationship between the user activity data and the date, and relevant personnel can adjust and schedule the computing resources in advance according to the data. In summary, the application can predict the data corresponding to the event in the future period by associating the relationship between the date and the event, so as to maximize the event profit according to the data.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a data prediction method, comprising:
determining a plurality of reference time periods according to the specific time period and the time period variation range in the preset cycle; wherein the intersection of the reference time periods is a specific time period;
acquiring a historical data sequence corresponding to an event to be predicted in a previous preset period, and calculating reference data corresponding to the event to be predicted in a plurality of reference time periods respectively according to the historical data sequence; the historical data sequence is used for representing the development trend of the event to be predicted on a time scale;
selecting target reference data meeting preset conditions from the reference data, and determining a target reference time interval corresponding to the target reference data from a plurality of reference time intervals;
and predicting reference data corresponding to a target reference time interval of the event to be predicted in the current preset period according to the target reference data.
According to a second aspect of the present disclosure, there is provided a data prediction apparatus comprising a reference period determination unit, a reference data calculation unit, a data selection unit, and a data prediction unit, wherein:
a reference period determining unit for determining a plurality of reference periods according to a specific period and a period variation range within a preset cycle; wherein the intersection of the reference time periods is a specific time period;
the reference data calculation unit is used for acquiring a historical data sequence corresponding to the event to be predicted in the previous preset period and calculating reference data corresponding to the event to be predicted in a plurality of reference time periods respectively according to the historical data sequence; the historical data sequence is used for representing the development trend of the event to be predicted on a time scale;
the data selection unit is used for selecting target reference data meeting preset conditions from the reference data and determining a target reference time interval corresponding to the target reference data from a plurality of reference time intervals;
and the data prediction unit is used for predicting reference data corresponding to the target reference time interval of the event to be predicted in the current preset cycle according to the target reference data.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any one of the above via execution of the executable instructions.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
Exemplary embodiments of the present disclosure may have some or all of the following benefits:
in the data prediction method provided in an example embodiment of the present disclosure, a plurality of reference periods may be determined according to a specific period (e.g., national day) and a period variation range (e.g., 20 days) within a preset period; wherein the intersection of the reference time periods is a specific time period; furthermore, a historical data sequence corresponding to the event to be predicted in a previous preset period (for example, within one year) can be obtained, and reference data corresponding to the event to be predicted in a plurality of reference time periods respectively are calculated according to the historical data sequence; the historical data sequence is used for representing the development trend of the event to be predicted on a time scale; furthermore, target reference data meeting preset conditions can be selected from the reference data, and a target reference time interval corresponding to the target reference data is determined from a plurality of reference time intervals; furthermore, reference data corresponding to a target reference time interval of the event to be predicted in the current preset period can be predicted according to the target reference data. According to the technical description, on one hand, the target reference time interval and the target reference data which meet the preset conditions can be determined by correlating the historical data sequence and the time interval, and the data prediction of the event can be realized according to the target reference time interval and the target reference data, so that the relevant personnel can make corresponding measures according to the prediction result, and the controllability of the event is improved; on the other hand, by predicting the data of the event, relevant personnel can make a countermeasure according to the prediction result, and the event benefit is maximized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a schematic diagram illustrating an exemplary system architecture to which a data prediction method and a data prediction apparatus according to an embodiment of the present disclosure may be applied;
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device used to implement embodiments of the present disclosure;
FIG. 3 schematically illustrates a flow diagram of a data prediction method according to one embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart for determining a plurality of reference time periods according to a specific time period and a time period variation range within a preset cycle, according to one embodiment of the present disclosure;
FIG. 5 schematically shows a flow chart for selecting target reference data satisfying preset conditions from the reference data according to one embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow diagram for determining a target reference time period corresponding to target reference data from a plurality of reference time periods according to one embodiment of the present disclosure;
FIG. 7 schematically illustrates a flow diagram of a manner of predictive parameter adjustment according to one embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow diagram of a data prediction method according to another embodiment of the present disclosure;
fig. 9 schematically shows a block diagram of a data prediction apparatus in an embodiment according to the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. 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 devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating an exemplary system architecture to which a data prediction method and a data prediction apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The data prediction method provided by the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the data prediction apparatus is generally disposed in the server 105. However, it is easily understood by those skilled in the art that the data prediction method provided in the embodiment of the present disclosure may also be executed by the terminal devices 101, 102, and 103, and accordingly, the data prediction apparatus may also be disposed in the terminal devices 101, 102, and 103, which is not particularly limited in the exemplary embodiment.
For example, in an exemplary embodiment, the server 105 may determine a plurality of reference periods according to a specific period and a period variation range within a preset cycle; acquiring a historical data sequence corresponding to an event to be predicted in a previous preset period, and calculating reference data corresponding to the event to be predicted in a plurality of reference time periods respectively according to the historical data sequence; selecting target reference data meeting preset conditions from the reference data, and determining a target reference time interval corresponding to the target reference data from a plurality of reference time intervals; and predicting reference data corresponding to a target reference time interval of the event to be predicted in the current preset period according to the target reference data.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
The technical solution of the embodiment of the present disclosure is explained in detail below:
in the development of behavioral finance, Calendar effect (Calendar effect) is one of the earliest discovered market phenomena, and the Calendar effect means that the return rate of securities has significant systematic deviation at different times or time periods; the calendar effect mainly comprises a quarterly effect, a month effect, a week effect, a date effect, a festival effect, an event effect and the like, and the calendar effect respectively refers to abnormal profits of the financial market related to seasons, months, weeks, festivals, time and the like. This type of periodic paradox is contrary to the effective market hypothesis, as asset returns are no longer random, but rather based on certain predictability during a particular calendar. If the influence of the calendar effect on the event (such as securities) can be determined, that is, the data (such as the rise and fall amplitude) corresponding to the event in different time periods of the calendar effect is determined, the investment strategy can be adjusted according to the data, so as to maximize the profit, and how to realize the above manner to maximize the profit becomes a problem which needs to be solved at present.
Based on the above-mentioned problems, the present exemplary embodiment provides a data prediction method. The data prediction method may be applied to the server 105, and may also be applied to one or more of the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment. Referring to fig. 3, the data prediction method may include the following steps S310 to S340:
step S310: determining a plurality of reference time periods according to the specific time period and the time period variation range in the preset cycle; wherein the intersection between the multiple reference time periods is a specific time period.
Step S320: acquiring a historical data sequence corresponding to an event to be predicted in a previous preset period, and calculating reference data corresponding to the event to be predicted in a plurality of reference time periods respectively according to the historical data sequence; wherein the historical data sequence is used for representing the development trend of the event to be predicted on a time scale.
Step S330: target reference data meeting preset conditions are selected from the reference data, and a target reference time interval corresponding to the target reference data is determined from the multiple reference time intervals.
Step S340: and predicting reference data corresponding to a target reference time interval of the event to be predicted in the current preset period according to the target reference data.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S310, determining a plurality of reference periods according to a specific period and a period variation range within a preset cycle; wherein the intersection between the multiple reference time periods is a specific time period.
The preset period may be within a year, a week, a month, or a quarter, and the embodiments of the present disclosure are not limited thereto. The specific time period is used to represent a period of time, which may span minutes, hours, days, months, etc., and the disclosed embodiments are not limited thereto. The time period variation range may be understood as a threshold range, for example, (0 days, 20 days), and the number unit of the time period variation range may be seconds, minutes, hours, days, months, etc., and the embodiment of the present disclosure is not limited thereto. The reference period is also used to represent a period of time, the reference period being in an inclusive relationship with the specific period, i.e. the reference period contains the specific period. There are no two identical reference periods between the multiple reference periods, and the intersection between each two reference periods is a specific period.
For example, if the predetermined period is within one year, the specific time periods are (1 month, 5 days, 2 months, 5 days) and (3 months, 5 days, 4 months, 5 days), and the time period variation range is (0 day, 2 days). In this case, the reference periods corresponding to the specific periods (1 month 5 day, 2 month 5 day) may be (1 month 4 day, 2 month 5 day), (1 month 3 day, 2 month 5 day), (1 month 5 day, 2 month 6 day), (1 month 5 day, 2 month 7 day), (1 month 4 day, 2 month 6 day) and (1 month 3 day, 2 month 7 day), and the reference periods corresponding to the specific periods (3 month 5 day, 4 month 5 day) may be (3 month 4 day, 4 month 5 day), (3 month 3 day, 4 month 5 day), (3 month 5 day, 4 month 6 day), (3 month 5 day, 4 month 7 day), (3 month 4 day, 4 month 6 day) and (3 month 3 day, 4 month 7 day). It can be seen that the reference periods corresponding to the specific periods (1 month, 5 days, 2 months, 5 days) are plural, and the reference periods corresponding to the specific periods (3 months, 5 days, 4 months, 5 days) are also plural. And, the intersection of the reference periods (1 month 4 day, 2 month 5 day), (1 month 3 day, 2 month 5 day), (1 month 5 day, 2 month 6 day), (1 month 5 day, 2 month 7 day), (1 month 4 day, 2 month 6 day), and (1 month 3 day, 2 month 7 day) is the specific period (1 month 5 day, 2 month 5 day). The intersection of the reference periods (3 month 4 day, 4 month 5 day), (3 month 3 day, 4 month 5 day), (3 month 5 day, 4 month 6 day), (3 month 5 day, 4 month 7 day), (3 month 4 day, 4 month 6 day), and (3 month 3 day, 4 month 7 day) is the specific period (3 month 5 day, 4 month 5 day).
In addition, before step S310, the following steps may be further included: and determining the preset period according to the type of the calendar effect. For example, if the type of calendar effect is quarterly effect, the preset period is one year; if the type of the calendar effect is a week effect, the preset period is one week, and if the type of the calendar effect is a month effect, the preset period is one month; if the type of the calendar effect is a date effect, the preset period is one month; if the type of the calendar effect is a festival effect, the preset period is a festival time length; if the type of the calendar effect is an event effect, the preset period is an event duration. The type of calendar effect can be seen in the following exemplary table, among others:
Figure BDA0002279239970000091
in this example implementation manner, optionally, referring to fig. 4, fig. 4 schematically shows a flowchart for determining a plurality of reference time periods according to a specific time period and a time period variation range within a preset cycle according to an embodiment of the present disclosure, including steps S410 to S430, where:
step S410: and determining at least one specific meaning corresponding to each unit time in a preset period.
Step S420: each unit time is divided into a plurality of specific time periods according to specific meanings.
Step S430: and respectively changing the upper limit time and the lower limit time of each specific time interval according to the values in the time interval change range until all the values in the time change range are traversed to obtain a plurality of reference time intervals respectively corresponding to each specific time interval.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S410, at least one specific meaning corresponding to each unit time in the preset period is determined.
Each unit time may be a day, an hour, a month, or the like, and the embodiments of the present disclosure are not limited thereto. For example, if the predetermined period is one year and each unit time is one day, since 365 days are generally included in one year, 365 unit times are included in the predetermined period. In addition, since a plurality of unit times may be included in one preset period, a plurality of specific meanings may be included in one preset period. And because one unit time can correspond to one or more specific meanings, when one unit time corresponds to a plurality of specific meanings (for example, 11 months and 11 days simultaneously comprise the specific meaning of the optical stick festival and the E-commerce promotion event day), the number of the specific meanings included in the preset period is higher than the number of the unit time.
Specifically, the manner of determining at least one specific meaning corresponding to each unit time in the preset period may be: matching unit time in a preset period with a calendar information base to determine calendar information corresponding to the unit time; further, according to the searching heat of each calendar information, the calendar information is sorted from high to low, and the top N bits are determined as the specific meaning corresponding to the unit time; traversing all unit time in a preset period in the manner of determining the specific meanings of the unit time to determine the specific meanings respectively corresponding to the unit time, wherein the number of the specific meanings depends on N, if N is 1, the specific meaning is one, and if N is more than 1, the specific meanings are multiple; wherein N is a positive integer.
In step S420, each unit time is divided into a plurality of specific periods according to specific meanings.
For example, if the unit time is 1 month 1 day, 1 month 2 days, … …,2 month 1 day, 2 month 2 days, … …, 11 month 1 day, 11 month 2 days, … …, 12 month 1 day, and 12 month 2 days, that is, each day in 365 days of the year is taken as a unit time, the unit time is each day in 365 days of the year. If the specific meaning is quarterly, the specific meanings of 1 month, 2 days, … …, 3 months, 30 days, and 3 months, 31 days per unit time are quarterly first, and thus, 1 month, 1 day, 1 month, 2 days, … …, 3 months, 30 days, and 3 months, 31 days per unit time may be divided into a specific period (1 month, 1 day, 3 months, 31 days). And, specific meanings of the unit times of 4 month 1 day, 4 month 2 day, … …, 6 month 29 day, and 6 month 30 day are all the second quarter, and thus, the unit times of 4 month 1 day, 4 month 2 day, … …, 6 month 29 day, and 6 month 30 day may be divided into a specific period (4 month 1 day, 6 month 30 day). And, specific meanings of 7 month 1 day, 7 month 2 day, … …, 9 month 29 day, and 9 month 30 day per unit time are all the third quarter, and thus, 7 month 1 day, 7 month 2 day, … …, 9 month 29 day, and 9 month 30 day per unit time may be divided into a specific period (7 month 1 day, 9 month 30 day). And, specific meanings of the unit time of 10 month 1 day, 10 month 2 day, … …, 12 month 30 day, and 12 month 31 day are quarterly, and thus, the unit time of 10 month 1 day, 10 month 2 day, … …, 12 month 30 day, and 12 month 31 day may be divided into a specific period (10 month 1 day, 12 month 31 day).
In the present exemplary embodiment, optionally, dividing each unit time into a plurality of specific time periods according to a specific meaning includes:
and clustering the unit time with the specific meanings belonging to the same type to obtain a clustering result comprising a plurality of specific time periods.
If the unit time corresponding to the specific meanings is the first quarter, the unit times belong to the same type, and if the unit time corresponding to the specific meaning is the first quarter, the unit time corresponding to the specific meaning is the second quarter, the unit time corresponding to the specific meaning is the third quarter, and the unit time corresponding to the specific meaning is the fourth quarter are clustered, clustering results respectively corresponding to the first quarter, the second quarter, the third quarter, and the fourth quarter can be obtained, each clustering result corresponds to a specific time period, and the specific time period is composed of the unit times in the clustering results.
In addition, optionally, if the specific meanings corresponding to the plurality of unit times are respectively the mid-autumn festival, the national festival and the New year's day, the specific meanings corresponding to the plurality of unit times also belong to the same type, that is, the festival type, and if the plurality of unit times are clustered, the specific time period corresponding to the clustering result is a plurality of discontinuous sub-time periods.
Therefore, by implementing the optional implementation mode, the required clustering result can be obtained by clustering the unit time of the same type, the application range of the method is expanded, so that the user can select the type to be clustered according to different requirements, and further determine the required reference time period.
In step S430, the upper limit time and the lower limit time of each specific time interval are respectively changed according to the values in the time interval variation range until all the values in the time interval variation range are traversed to obtain a plurality of reference time intervals corresponding to each specific time interval.
The time period variation range may include at least two values, and the values may be integers or fractions which are not endless and are not wireless and endless, and the embodiment of the present disclosure is not limited. If the time interval varies within (0 day, 2 days), the upper limit time is 2 days, and the lower limit time is 0 days.
In this exemplary embodiment, optionally, the respectively changing the upper limit time and the lower limit time of each specific time period according to the values in the time period variation range includes:
adding the upper limit time of each specific time interval and the numerical value in the time interval variation range to obtain first upper limit time corresponding to each specific time interval, and obtaining a reference time interval corresponding to each specific time interval according to the combination of the first upper limit time and the lower limit time; and the number of the first and second groups,
adding the lower limit time of each specific time interval and the numerical value in the time interval change range to obtain first lower limit time corresponding to each specific time interval, and obtaining another reference time interval corresponding to each specific time interval according to the combination of the upper limit time and the first lower limit time; and the number of the first and second groups,
and obtaining another reference time interval corresponding to each specific time interval according to the combination of the first upper limit time and the first lower limit time.
For example, when the present disclosure is applied to the field of stock investments, please refer to the following table:
Figure BDA0002279239970000121
wherein if the specific time period is(s)i,ei) Then, the upper limit time of the specific period (i.e., the start day of the specific period) is eiThe lower limit time of the specific period (i.e., the deadline of the specific period) is si(ii) a Wherein i is a positive integer, and each specific time period can be represented as(s)1,e1)、(s2,e2)、(s3,e3)、……、(si,ei)、……、(sN,eN) N is a positive integer, and the number of specific time periods is N.
In addition, if the period variation range is (0, M), both the number of observation days moved forward and the number of observation days moved backward may be one of (0, M). If the observation days of forward movement is 1 and the observation days of backward movement is 0, then the observation period (i.e., one of the reference periods described above) may be(s)i-1,ei) Wherein the first upper limit time is si-1; if the number of observation days moved forward is 0 and the number of observation days moved backward is 1, the observation period (i.e., another reference period described above) may be(s)i,ei+1), wherein the first lower limit time is ei+ 1; if the number of observation days moved forward is 1 and the number of observation days moved backward is 1, the observation period (i.e., the above-mentioned further reference period) may be(s)i-1,ei+1). The observation time periods corresponding to the rest observation day values moving forwards and the observation day values moving backwards are the same; wherein M is a positive integer.
In addition, the time zone fluctuation width chgi-M,i+MThe reference data is used for representing the corresponding reference data in the reference time interval, and when the reference data is applied to the field of stock investment, the reference data can be understood as the rise and fall amplitude of stocks; wherein i is a positive integer. The time interval fluctuation range is usually calculated based on the closing price, that is, by observing the closing price of the ending day of the time interval divided by the closing price of the starting day and then subtracting 1, the mathematical expression can be: chgi+M,i+M=ei+ M closing price/si-closing price of M-1.
Therefore, by implementing the alternative implementation mode, the fluctuation range of the specific time period in the time change range can be determined through calculation of the reference data corresponding to the reference time period, and the fluctuation range is used as the basis for making the investment strategy, so that the maximization of the event profit can be facilitated.
In step S320, obtaining a historical data sequence corresponding to the event to be predicted in a previous preset period, and calculating reference data corresponding to the event to be predicted in a plurality of reference time periods respectively according to the historical data sequence; wherein the historical data sequence is used for representing the development trend of the event to be predicted on a time scale.
In the field of stock investment, an event to be predicted may be a prediction of the magnitude of a stock's rise and fall over a period of time.
In this example embodiment, optionally, the obtaining of the historical data sequence corresponding to the event to be predicted in the previous preset period includes:
determining unit data corresponding to each unit time of the event to be predicted in a previous preset period, and combining the unit data corresponding to each unit time to obtain a historical data sequence corresponding to the event to be predicted in the previous preset period.
In the field of stock investment, unit data corresponding to a unit time can be understood as the fluctuation range of the stock in the unit time. And sequencing the fluctuation amplitudes according to the occurrence sequence of unit time to obtain a historical data sequence. The output form of the historical data sequence may be a multi-dimensional vector.
Therefore, by implementing the alternative embodiment, the unit data of each unit time can be determined, so that the historical data sequence is obtained, and the target reference data corresponding to the optimal target time period can be determined according to the historical data sequence.
In this exemplary embodiment, another optional step of calculating, according to the historical data sequence, reference data corresponding to the event to be predicted in the plurality of reference time periods respectively includes:
determining upper limit time and lower limit time corresponding to each reference time interval;
determining first unit data (e.g., 10%) corresponding to an upper limit time and second unit data (e.g., 20%) corresponding to a lower limit time from the unit data corresponding to each unit time;
calculating a ratio (e.g., 0.5) of the first unit data to the corresponding second unit data to obtain ratios corresponding to the plurality of reference time periods, and subtracting the ratio from a preset constant (e.g., 1) to obtain differences (e.g., -0.5) corresponding to the plurality of reference time periods;
and determining the plurality of difference values as reference data corresponding to the event to be predicted in a plurality of reference time periods respectively.
The first unit data may be a closing price corresponding to the upper limit time, and the second unit data may be a closing price corresponding to the lower limit time. The reference data may represent the magnitude of the rise or fall of the stock over a reference period.
Therefore, by implementing the optional implementation mode, the reference data corresponding to each reference time interval can be determined, and the optimal reference time interval, such as the reference time interval with the highest rise amplitude, can be more easily determined according to the reference data.
In step S330, target reference data satisfying a preset condition is selected from the reference data, and a target reference period corresponding to the target reference data is determined from the plurality of reference periods.
The preset condition is used for screening out needed target reference data from a plurality of reference data.
In this exemplary embodiment, optionally, the selecting target reference data that satisfies the preset condition from the reference data includes:
sorting the reference data from high to low, and determining the reference data meeting a preset condition that the reference data is higher than a preset threshold (such as 20%) as target reference data; alternatively, the first and second electrodes may be,
the reference data are sorted from low to high, and the reference data satisfying a preset condition of being lower than a preset threshold (e.g., 30%) are determined as target reference data.
In the field of stock investment, if the preset condition is higher than a preset threshold value, one or more target reference data with higher amplitude are determined from the reference data, so that related personnel can conveniently make an investment strategy according to a reference time interval corresponding to the target reference data; if the preset condition is lower than the preset, one or more target reference data with lower fluctuation are determined from the reference data, and the method is favorable for relevant personnel to screen out stocks with lower return on investment.
In this exemplary embodiment, referring to fig. 5 as another alternative, fig. 5 schematically illustrates a flowchart of selecting target reference data satisfying preset conditions from reference data according to an embodiment of the present disclosure, where the flowchart includes step S510 and step S520, where:
step S510: clustering the reference data according to the types of the multiple reference time periods to obtain multiple clustering results;
step S520: calculating the average value of each clustering result, and determining the maximum value in the average values as target reference data; the preset condition is the maximum value in the selected average values.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S510, clustering the reference data according to the types of the multiple reference time periods to obtain multiple clustering results;
the reference data are clustered according to the types of the multiple reference time periods, and the multiple clustering results are obtained in the following modes: and clustering the reference data corresponding to the reference time periods which belong to each preset period and have the same type, so as to obtain a plurality of clustering results. The clustering result includes a plurality of reference data.
In addition, after step S510, optionally, the following steps may be further included: calculating the number of reference data which is greater than 0 in each clustering result, calculating the ratio of the number to the total number in the corresponding clustering result, determining the reference data corresponding to the clustering result according to the product of the ratio and the percentage, determining a target clustering result from the plurality of clustering results according to the reference data corresponding to each clustering result, and determining the reference data corresponding to the target clustering result as target reference data. The target reference data is larger than the reference data corresponding to other clustering results. In this alternative embodiment, the output form of the target reference data is a percentage form. It should be noted that the above steps and step S520 are in parallel, that is, after step S510, the above steps may be executed, or step S520 may be executed.
In step S520, calculating an average value of each clustering result, and determining a maximum value of the average values as target reference data; the preset condition is the maximum value in the selected average values.
The output form of the target reference data can be percentage form, and is used for representing the fluctuation range in the stock investment field.
For example, since there is the same specific time period in each preset cycle, for N preset cycles of the history, see the following table:
Figure BDA0002279239970000161
wherein the effect time(s)i,ei) Can be understood as a specific time period within the ith preset period; i is an element of [1, N ∈]That is, the maximum value of i is N, N is a positive integer, and the fluctuation width chg of the time interval corresponding to each preset periodi-M,i+MIs a plurality of. In addition, the reference data corresponding to the specific time period can be obtained by averaging the fluctuation ranges of a plurality of time period intervals with the same M value, for example, the reference data corresponding to the first quarter can be obtained by averaging the fluctuation range of the first quarter in the 1 st year, the fluctuation range of the first quarter in the 2 nd year, … …, and the fluctuation range of the first quarter in the N-th year. The expression as a mathematical expression may be:
Figure BDA0002279239970000162
for the above expression, if the fluctuation width is greater than 0, chgi-M,i+MIf it is greater than 0, it represents that the stock is in the rising and falling state in the reference time interval, if the rising and falling amplitude is less than 0, it is chgi-M,i+MLess than 0 indicates that the stock is falling in the reference period. If the number of times that the fluctuation amplitude is greater than 0 in a plurality of preset periods is t, the win rate can be win _ rateM,M,M∈[0,20]The expression as a mathematical expression may be: win _ rate M,M100% in (t/N). Reference time periods corresponding to the highest odds can be determined through ranking the odds, and then an investment strategy is formulated according to the reference time periods, so that event benefits (such as investment earnings) can be maximized.
Therefore, by implementing the optional implementation mode, the reference data of the specific time period in each preset period can be determined in an averaging mode, and an optimal investment strategy can be formulated according to the maximum value in the reference data, namely the target reference data, so that the event income is maximized.
In this example implementation, referring to fig. 6 as yet another alternative, fig. 6 schematically illustrates a flowchart of determining a target reference time interval corresponding to target reference data from a plurality of reference time intervals according to an embodiment of the present disclosure, where the flowchart includes step S610 and step S620, where:
step S610: determining a plurality of target reference time periods corresponding to each target reference data from the reference time periods;
step S620: and if the upper limit time of one target reference time interval in the plurality of target reference time intervals is the lower limit time of another target reference time interval, combining the one target reference time interval and the another target reference time interval to obtain a combined target reference time interval corresponding to the target reference data.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S610, a plurality of target reference time periods corresponding to each target reference data are determined from the reference time periods;
the target reference time period corresponding to the target reference data may be a continuous time period or a discontinuous time period, and the embodiment of the present disclosure is not limited.
In step S620, if there is an upper limit time of one target reference time interval in the plurality of target reference time intervals as a lower limit time of another target reference time interval, the one target reference time interval and the another target reference time interval are merged to obtain a merged target reference time interval corresponding to the target reference data.
For example, if one target reference period is (1 month 1 day, 2 month 1 day) and the other target reference period is (2 month 1 day, 3 month 1 day), then the target reference periods (1 month 1 day, 3 month 1 day) corresponding to the target reference data can be obtained by combining the one target reference period and the other target reference period.
Therefore, by implementing the optional implementation mode, the calculation amount of the data prediction stage can be reduced and the prediction efficiency can be improved by combining the adjacent target reference time periods.
In step S340, reference data corresponding to a target reference time period of the event to be predicted in the current preset cycle is predicted according to the target reference data.
In this exemplary embodiment, optionally, predicting, according to the target reference data, reference data corresponding to a target reference time period of the event to be predicted in the current preset cycle includes:
and inputting the target reference data into a data prediction network, and predicting reference data corresponding to a target reference time interval of the event to be predicted in the current preset period according to prediction parameters in the data prediction network.
The data prediction is performed by the data presetting network according to a preset algorithm, for example, the preset algorithm may be expressed as an N-ary N-th order equation, and a coefficient term and an intercept term in the equation may be prediction parameters.
Therefore, by implementing the optional implementation mode, the reference data corresponding to the target reference time interval of the event in the current preset period can be predicted through the data prediction network, and the corresponding investment strategy can be formulated according to the reference data.
In this exemplary embodiment, optionally, after predicting reference data corresponding to a target reference time period of an event to be predicted in a current preset cycle according to the target reference data, please refer to fig. 7, where fig. 7 schematically illustrates a flowchart of a prediction parameter adjustment manner according to an embodiment of the present disclosure, which includes step S710 and step S720, where:
step S710: calculating a loss function between reference data corresponding to a target reference time period of an event to be predicted in a current preset period and real data corresponding to the target reference time period of the event to be predicted in the current preset period;
step S720: the prediction parameters are updated according to the loss function.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S710, calculating a loss function between reference data corresponding to a target reference time period of the event to be predicted in the current preset period and real data corresponding to the target reference time period of the event to be predicted in the current preset period;
the loss function is used for representing the difference between reference data corresponding to a target reference time interval of an event to be predicted in a current preset period and real data corresponding to the target reference time interval of the event to be predicted in the current preset period.
In step S720, the prediction parameters are updated according to the loss function.
Wherein the step of updating the prediction parameters according to the loss function may be performed a plurality of times until the loss function is less than the preset loss function.
Therefore, by implementing the optional implementation mode, the prediction accuracy of the data prediction network on the reference data can be improved by continuously updating the data prediction network.
In this exemplary embodiment, optionally, after predicting, according to the target reference data, reference data corresponding to a target reference time period of the event to be predicted in the current preset cycle, the method may further include the following steps:
and determining at least one investment strategy to be recommended according to reference data corresponding to a target reference time interval of the event to be predicted in the current preset period and outputting the investment strategy.
For example, the strategy to be invested may be to invest in the stock A (1 st 1/2 st 1) and the stock B (3 st 1/4 st 1).
Therefore, by implementing the optional implementation mode, the investment strategy can be recommended according to the reference data corresponding to the target reference time interval in the current preset period, and the event profit is maximized.
It can be seen that, by implementing the data prediction method shown in fig. 3, the target reference time period and the target reference data which meet the preset conditions can be determined by correlating the historical data sequence and the time period, and data prediction for an event can be realized according to the target reference time period and the target reference data, so that relevant personnel can make corresponding measures according to the prediction result, and controllability for the event is improved and event benefits are maximized.
For example, an example of a specific time period being a spring festival in a preset period of 12 years from 2008 to 2019 may be as shown in the following table:
year of year Initial day si By day ei
2008 20080206 20080212
2009 20090125 20090131
2010 20100213 20100219
2011 20110202 20110208
2012 20120122 20120128
2013 20130209 20130215
2014 20140131 20140206
2015 20150218 20150224
2016 20160207 20160213
2017 20170127 20170202
2018 20180215 20180221
2019 20190204 20190210
For the above-mentioned specific period of 2019 years (S)i,ei) When the calculation of the reference time interval and the reference data is performed within the time variation range (0,20) (20190204, 20190210), the obtained results can be shown in the following table; wherein, the observation time period is calculated according to the working day:
Figure BDA0002279239970000201
when M is 5, i.e.(si-M,ei+M)=(si-5,ei+5), the record of the 12-segment spring festival for the specific period corresponding to the 12 years can be as shown in the following table:
Figure BDA0002279239970000202
Figure BDA0002279239970000211
based on the data shown in the above table, the average fluctuation amplitude avg _ chg corresponding to the spring festival in a specific period within 12 years can be calculated5,53.60% and win _ rateM,M=83.33%。
For each (M, M) combination moving forward and backward, the performance is calculated according to the performance recorded in 12 segments of history in 12 years: win rate win _ rateM,MAnd average fluctuation amplitude avg _ chgM,MAnd further, all the (M, M) combinations are sorted in descending order according to the winning rate and the average fluctuation width, it can be seen that the combination (5, 5) is ranked first, and thus, the optimal period of the spring festival effect (i.e., the target reference period) of a specific stock can be determined as the interval (5 th day before the spring festival, 5 th day after the spring festival).
By way of further example, based on the reference time period and reference data for a particular stock in the calendar effect, the following table may be obtained:
Figure BDA0002279239970000212
Figure BDA0002279239970000221
referring to the above table, it can be seen that the optimal period (i.e., the target reference period) of the stock in the calendar effect is (5 th day before spring festival, 5 th day after spring festival), the win ratio is 83.33%, and the average fluctuation range is 4.74%.
Referring to fig. 8, fig. 8 schematically illustrates a flow chart of a data prediction method according to another embodiment of the present disclosure. The data prediction method of another embodiment includes steps S800 to S828, in which:
step S800: and determining at least one specific meaning corresponding to each unit time in a preset period.
Step S802: and clustering the unit time with the specific meanings belonging to the same type to obtain a clustering result comprising a plurality of specific time periods.
Step S804: and respectively changing the upper limit time and the lower limit time of each specific time interval according to the values in the time interval change range until all the values in the time change range are traversed to obtain a plurality of reference time intervals respectively corresponding to each specific time interval.
Step S806: determining unit data corresponding to each unit time of the event to be predicted in a previous preset period, and combining the unit data corresponding to each unit time to obtain a historical data sequence corresponding to the event to be predicted in the previous preset period.
Step S808: and determining the upper limit time and the lower limit time corresponding to each reference time interval.
Step S810: first unit data corresponding to the upper limit time and second unit data corresponding to the lower limit time are determined from the unit data corresponding to each unit time.
Step S812: and calculating the ratio of the first unit data to the corresponding second unit data to obtain the ratios corresponding to the multiple reference time periods respectively, and subtracting the comparison value from the preset constant to obtain the difference values corresponding to the multiple reference time periods respectively.
Step S814: and determining the plurality of difference values as reference data corresponding to the event to be predicted in a plurality of reference time periods respectively.
Step S816: sorting the reference data from high to low, and determining the reference data meeting the preset condition that the reference data is higher than a preset threshold value as target reference data; or, sorting the reference data from low to high, and determining the reference data meeting the preset condition that the reference data is lower than the preset threshold value as the target reference data.
Step S818: and determining a plurality of target reference time periods corresponding to the target reference data from the reference time periods.
Step S820: and if the upper limit time of one target reference time interval in the plurality of target reference time intervals is the lower limit time of another target reference time interval, combining the one target reference time interval and the another target reference time interval to obtain a combined target reference time interval corresponding to the target reference data.
Step S822: and inputting the target reference data into a data prediction network, and predicting reference data corresponding to a target reference time interval of the event to be predicted in the current preset period according to prediction parameters in the data prediction network.
Step S824: and calculating a loss function between reference data corresponding to a target reference time interval of the event to be predicted in the current preset period and real data corresponding to the target reference time interval of the event to be predicted in the current preset period.
Step S826: the prediction parameters are updated according to the loss function.
Step S828: and determining at least one investment strategy to be recommended according to reference data corresponding to a target reference time interval of the event to be predicted in the current preset period and outputting the investment strategy.
The detailed implementation of the above steps is expanded and explained in detail in the embodiment corresponding to fig. 3, and is not described here again.
It can be seen that, by implementing the data prediction method according to another embodiment shown in fig. 8, the target reference time period and the target reference data which satisfy the preset condition can be determined by associating the historical data sequence with the time period, and data prediction for an event can be realized according to the target reference time period and the target reference data, which is beneficial for relevant personnel to make a countermeasure according to a prediction result, so as to improve controllability for the event and maximize event revenue.
Further, in the present exemplary embodiment, a data prediction apparatus is also provided. The data prediction device can be applied to a server or a terminal device. Referring to fig. 9, the data prediction apparatus 900 may include a reference period determination unit 901, a reference data calculation unit 902, a data extraction unit 903, and a data prediction unit 904, wherein:
a reference period determining unit 901 configured to determine a plurality of reference periods according to a specific period and a period variation range within a preset cycle; wherein the intersection of the reference time periods is a specific time period;
a reference data calculating unit 902, configured to obtain a historical data sequence corresponding to an event to be predicted in a previous preset period, and calculate, according to the historical data sequence, reference data corresponding to the event to be predicted in a plurality of reference time periods respectively; the historical data sequence is used for representing the development trend of the event to be predicted on a time scale;
a data selecting unit 903, configured to select target reference data meeting a preset condition from the reference data, and determine a target reference time period corresponding to the target reference data from a plurality of reference time periods;
and a data prediction unit 904, configured to predict, according to the target reference data, reference data corresponding to a target reference time period of the event to be predicted in the current preset cycle.
It can be seen that, by implementing the data prediction apparatus shown in fig. 9, the target reference time period and the target reference data which satisfy the preset conditions can be determined by correlating the historical data sequence and the time period, and data prediction for an event can be realized according to the target reference time period and the target reference data, which is beneficial for relevant personnel to make corresponding measures according to prediction results, so as to improve controllability for the event and maximize event benefits.
In an exemplary embodiment of the present disclosure, the manner in which the reference period determination unit 901 determines the plurality of reference periods according to the specific period and the period variation range within the preset cycle may specifically be:
the reference time interval determination unit 901 determines at least one specific meaning corresponding to each unit time in a preset period;
the reference period determination unit 901 divides each unit time into a plurality of specific periods according to specific meanings;
the reference time interval determining unit 901 changes the upper limit time and the lower limit time of each specific time interval according to the values in the time interval change range, respectively, until all the values in the time change range are traversed to obtain a plurality of reference time intervals corresponding to each specific time interval, respectively.
In an exemplary embodiment of the present disclosure, the manner in which the reference period determination unit 901 divides each unit time into a plurality of specific periods according to a specific meaning may specifically be:
the reference period determination unit 901 clusters unit times for which the specific meanings belong to the same type, and obtains a clustering result including a plurality of specific periods.
Therefore, by implementing the exemplary embodiment, the required clustering result can be obtained by clustering the unit time of the same type, the application range of the present disclosure is expanded, so that the user can select the type to be clustered according to different requirements, and further determine the required reference time period.
In an exemplary embodiment of the present disclosure, the manner in which the reference period determination unit 901 changes the upper limit time and the lower limit time of each specific period according to the values in the period variation range may specifically be:
the reference time interval determining unit 901 adds the upper limit time of each specific time interval and the value in the time interval variation range to obtain the first upper limit time corresponding to each specific time interval, and obtains a reference time interval corresponding to each specific time interval according to the combination of the first upper limit time and the lower limit time; and the number of the first and second groups,
the reference time interval determining unit 901 adds the lower limit time of each specific time interval to the value in the time interval variation range to obtain a first lower limit time corresponding to each specific time interval, and obtains another reference time interval corresponding to each specific time interval according to the combination of the upper limit time and the first lower limit time; and the number of the first and second groups,
the reference period determining unit 901 obtains another reference period corresponding to each specific period according to the combination of the first upper limit time and the first lower limit time.
Therefore, by implementing the alternative embodiment, the fluctuation range of the specific time period in the time change range can be determined through calculation of the reference data corresponding to the reference time period, and the fluctuation range is used as the basis for making the investment strategy, so that the maximization of the event profit can be facilitated.
In an exemplary embodiment of the disclosure, a manner for the reference data calculating unit 902 to obtain the historical data sequence corresponding to the event to be predicted in the previous preset period may specifically be:
the reference data calculating unit 902 determines unit data corresponding to each unit time of the event to be predicted in the previous preset period, and combines the unit data corresponding to each unit time to obtain a historical data sequence corresponding to the event to be predicted in the previous preset period.
Therefore, by implementing the alternative embodiment, the unit data of each unit time can be determined, so that the historical data sequence is obtained, and the target reference data corresponding to the optimal target time period can be determined according to the historical data sequence.
In an exemplary embodiment of the disclosure, the way that the reference data calculating unit 902 calculates the reference data corresponding to the event to be predicted in the multiple reference time periods according to the historical data sequence may specifically be:
the reference data calculation unit 902 determines an upper limit time and a lower limit time corresponding to each reference time period;
the reference data calculation unit 902 determines first unit data corresponding to an upper limit time and second unit data corresponding to a lower limit time from the unit data corresponding to each unit time;
the reference data calculating unit 902 calculates a ratio of the first unit data to the corresponding second unit data to obtain ratios corresponding to the plurality of reference time periods, and obtains difference values corresponding to the plurality of reference time periods by subtracting the ratio from a preset constant;
the reference data calculation unit 902 determines a plurality of difference values as reference data corresponding to the event to be predicted in a plurality of reference periods, respectively.
Therefore, by implementing the optional embodiment, the reference data corresponding to each reference time interval can be determined, and the optimal reference time interval, such as the reference time interval with the highest rise amplitude, can be more easily determined according to the reference data.
In an exemplary embodiment of the disclosure, a way for the data selecting unit 903 to select the target reference data meeting the preset condition from the reference data may specifically be:
the data selection unit 903 sequences the reference data from high to low, and determines the reference data meeting a preset condition that the reference data is higher than a preset threshold as target reference data; alternatively, the first and second electrodes may be,
the data selection unit 903 sorts the reference data from low to high, and determines the reference data satisfying a preset condition that the reference data is lower than a preset threshold as target reference data.
In an exemplary embodiment of the disclosure, if there are a plurality of target reference data, the way for the data selecting unit 903 to determine the target reference time period corresponding to the target reference data from the plurality of reference time periods may specifically be:
the data selection unit 903 determines a plurality of target reference time periods corresponding to each target reference data from the reference time periods;
if the upper limit time of one target reference time interval in the plurality of target reference time intervals is the lower limit time of another target reference time interval, the data selection unit 903 merges the one target reference time interval and the another target reference time interval to obtain a merged target reference time interval corresponding to the target reference data.
Therefore, by implementing the optional embodiment, the calculation amount of the data prediction stage can be reduced and the prediction efficiency can be improved by merging the adjacent target reference time periods.
In an exemplary embodiment of the disclosure, the manner of predicting, by the data prediction unit 904, the reference data corresponding to the target reference time interval of the event to be predicted in the current preset cycle according to the target reference data may specifically be:
the data prediction unit 904 inputs the target reference data into the data prediction network, and predicts the reference data corresponding to the target reference time interval of the event to be predicted in the current preset cycle according to the prediction parameters in the data prediction network.
Therefore, by implementing the optional embodiment, the reference data corresponding to the target reference time interval of the event in the current preset period can be predicted through the data prediction network, and the corresponding investment strategy can be formulated according to the reference data.
In an exemplary embodiment of the present disclosure, the data prediction apparatus 900 may further include a loss function calculation unit (not shown) and a parameter update unit (not shown), wherein:
the loss function calculation unit is used for calculating a loss function between reference data corresponding to a target reference time interval of the event to be predicted in the current preset period and real data corresponding to the target reference time interval of the event to be predicted in the current preset period after the data prediction unit predicts the reference data corresponding to the target reference time interval of the event to be predicted in the current preset period according to the target reference data;
and the parameter updating unit is used for updating the prediction parameters according to the loss function.
Therefore, by implementing the optional embodiment, the prediction accuracy of the data prediction network for the reference data can be improved by continuously updating the data prediction network.
In an exemplary embodiment of the present disclosure, the data prediction apparatus 900 may further include an investment strategy determination unit (not shown), wherein:
and the investment strategy determining unit is used for determining and outputting at least one investment strategy to be recommended according to the reference data corresponding to the target reference time interval of the event to be predicted in the current preset period after the data predicting unit predicts the reference data corresponding to the target reference time interval of the event to be predicted in the current preset period according to the target reference data.
Therefore, by implementing the optional embodiment, the investment strategy can be recommended according to the reference data corresponding to the target reference time interval in the current preset period, and the event profit is maximized.
For details which are not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the data prediction method of the present disclosure for the details which are not disclosed in the embodiments of the apparatus of the present disclosure.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer 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 of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure 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 present disclosure is limited only by the appended claims.

Claims (15)

1. A method of data prediction, comprising:
determining a plurality of reference time periods according to the specific time period and the time period variation range in the preset cycle; wherein an intersection between the plurality of reference time periods is the particular time period;
acquiring a historical data sequence corresponding to an event to be predicted in a previous preset period, and calculating reference data corresponding to the event to be predicted in the multiple reference time periods respectively according to the historical data sequence; wherein the historical data sequence is used for representing the development trend of the event to be predicted on a time scale;
selecting target reference data meeting preset conditions from the reference data, and determining a target reference time interval corresponding to the target reference data from the multiple reference time intervals;
and predicting reference data corresponding to the target reference time interval of the event to be predicted in the current preset period according to the target reference data.
2. The method of claim 1, wherein determining the plurality of reference time periods according to the specific time period and the time period variation range within the preset period comprises:
determining at least one specific meaning corresponding to each unit time in the preset period;
dividing each unit time into a plurality of the specific time periods according to the specific meaning;
and respectively changing the upper limit time and the lower limit time of each specific time period according to the values in the time period change range until all the values in the time change range are traversed to obtain the plurality of reference time periods respectively corresponding to each specific time period.
3. The method according to claim 2, wherein dividing the respective unit times into the plurality of the specific time periods according to the specific meaning includes:
and clustering the unit time of which the specific meanings belong to the same type to obtain a clustering result comprising a plurality of specific time periods.
4. The method of claim 2, wherein individually altering the upper time limit and the lower time limit of each of the particular time periods as a function of the values in the time period variation range comprises:
adding the upper limit time of each specific time period with the numerical value in the time period variation range to obtain first upper limit time corresponding to each specific time period, and obtaining a reference time period corresponding to each specific time period according to the combination of the first upper limit time and the lower limit time; and the number of the first and second groups,
adding the lower limit time of each specific time period with the numerical value in the time period change range to obtain first lower limit time corresponding to each specific time period, and obtaining another reference time period corresponding to each specific time period according to the combination of the upper limit time and the first lower limit time; and the number of the first and second groups,
and obtaining another reference time interval corresponding to each specific time interval according to the combination of the first upper limit time and the first lower limit time.
5. The method according to claim 1, wherein obtaining a historical data sequence corresponding to an event to be predicted in a previous preset period comprises:
determining unit data corresponding to each unit time of the event to be predicted in the previous preset period, and combining the unit data corresponding to each unit time to obtain the historical data sequence corresponding to the event to be predicted in the previous preset period.
6. The method according to claim 5, wherein calculating the reference data corresponding to the event to be predicted in the plurality of reference time periods respectively according to the historical data sequence comprises:
determining the upper limit time and the lower limit time corresponding to each reference time interval;
determining first unit data corresponding to the upper limit time and second unit data corresponding to the lower limit time from the unit data corresponding to each unit time;
calculating the ratio of the first unit data to the corresponding second unit data to obtain the ratios corresponding to the multiple reference time periods respectively, and subtracting the ratios from a preset constant to obtain the difference values corresponding to the multiple reference time periods respectively;
and determining a plurality of difference values as reference data corresponding to the event to be predicted in the plurality of reference time periods respectively.
7. The method according to claim 1, wherein selecting target reference data satisfying a preset condition from the reference data comprises:
sorting the reference data from high to low, and determining the reference data meeting the preset condition that the reference data is higher than a preset threshold value as the target reference data; alternatively, the first and second electrodes may be,
and sorting the reference data from low to high, and determining the reference data meeting the preset condition that the reference data is lower than the preset threshold value as the target reference data.
8. The method according to claim 1, wherein selecting target reference data satisfying a preset condition from the reference data comprises:
clustering the reference data according to the types of the reference time periods to obtain a plurality of clustering results;
calculating the average value of each clustering result, and determining the maximum value in the average values as the target reference data; the preset condition is that the maximum value in the average value is selected.
9. The method of claim 1, wherein determining a target reference time period corresponding to the target reference data from the plurality of reference time periods if the target reference data is a plurality of reference time periods comprises:
determining a plurality of target reference time periods corresponding to the target reference data from the reference time periods;
and if the upper limit time of one target reference time interval in the plurality of target reference time intervals is the lower limit time of another target reference time interval, combining the one target reference time interval and the another target reference time interval to obtain a combined target reference time interval corresponding to the target reference data.
10. The method according to claim 1, wherein predicting, according to the target reference data, reference data corresponding to the target reference time period of the event to be predicted in a current preset cycle comprises:
inputting the target reference data into a data prediction network, and predicting reference data corresponding to the target reference time interval of the event to be predicted in the current preset period according to prediction parameters in the data prediction network.
11. The method according to claim 10, wherein after predicting the reference data corresponding to the target reference time period of the event to be predicted in the current preset cycle according to the target reference data, the method further comprises:
calculating a loss function between reference data corresponding to the target reference time interval of the event to be predicted in the current preset period and real data corresponding to the target reference time interval of the event to be predicted in the current preset period;
updating the prediction parameters according to the loss function.
12. The method according to claim 1, wherein after predicting the reference data corresponding to the target reference time period of the event to be predicted in the current preset cycle according to the target reference data, the method further comprises:
and determining at least one investment strategy to be recommended according to the reference data corresponding to the target reference time interval of the event to be predicted in the current preset period and outputting the investment strategy.
13. A data prediction apparatus, comprising:
a reference period determining unit for determining a plurality of reference periods according to a specific period and a period variation range within a preset cycle; wherein an intersection between the plurality of reference time periods is the particular time period;
the reference data calculation unit is used for acquiring a historical data sequence corresponding to the event to be predicted in the previous preset period and calculating reference data corresponding to the event to be predicted in the multiple reference time periods respectively according to the historical data sequence; wherein the historical data sequence is used for representing the development trend of the event to be predicted on a time scale;
the data selection unit is used for selecting target reference data meeting preset conditions from the reference data and determining a target reference time interval corresponding to the target reference data from the reference time intervals;
and the data prediction unit is used for predicting reference data corresponding to the target reference time interval of the event to be predicted in the current preset cycle according to the target reference data.
14. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-12 via execution of the executable instructions.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1-12.
CN201911134599.7A 2019-11-19 2019-11-19 Data prediction method, data prediction device, computer readable storage medium and electronic equipment Active CN112905909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911134599.7A CN112905909B (en) 2019-11-19 2019-11-19 Data prediction method, data prediction device, computer readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911134599.7A CN112905909B (en) 2019-11-19 2019-11-19 Data prediction method, data prediction device, computer readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112905909A true CN112905909A (en) 2021-06-04
CN112905909B CN112905909B (en) 2023-10-24

Family

ID=76103390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911134599.7A Active CN112905909B (en) 2019-11-19 2019-11-19 Data prediction method, data prediction device, computer readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112905909B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114329335A (en) * 2021-11-24 2022-04-12 华能核能技术研究院有限公司 High-temperature gas cooled reactor primary loop humidity early warning method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070050273A1 (en) * 2005-08-23 2007-03-01 Logical Information Machines, Inc. System and method for presenting price movements before or following recurring historical events
CN109658124A (en) * 2018-10-24 2019-04-19 中国平安人寿保险股份有限公司 Effect prediction method, apparatus, medium and electronic equipment based on big data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070050273A1 (en) * 2005-08-23 2007-03-01 Logical Information Machines, Inc. System and method for presenting price movements before or following recurring historical events
CN109658124A (en) * 2018-10-24 2019-04-19 中国平安人寿保险股份有限公司 Effect prediction method, apparatus, medium and electronic equipment based on big data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
N.A. KHARCHENKO 等: "《Development of compression algorithm for video flow based on processing of predicted frames》", 《2013 23RD INTERNATIONAL CRIMEAN CONFERENCE "MICROWAVE & TELECOMMUNICATION TECHNOLOGY"》 *
邱世崇 等: "《基于时空特性分析和数据融合的交通流预测》", 《武汉理工大学学报( 信息与管理工程版)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114329335A (en) * 2021-11-24 2022-04-12 华能核能技术研究院有限公司 High-temperature gas cooled reactor primary loop humidity early warning method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112905909B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
Geva et al. Empirical evaluation of an automated intraday stock recommendation system incorporating both market data and textual news
Belo-Filho et al. An adaptive large neighbourhood search for the operational integrated production and distribution problem of perishable products
Yuan et al. A survey on real time bidding advertising
US8374912B2 (en) System and method for managing and optimizing advertising campaigns managed on the internet
Badakhshan et al. Using simulation-based system dynamics and genetic algorithms to reduce the cash flow bullwhip in the supply chain
CN111798280B (en) Multimedia information recommendation method, device and equipment and storage medium
Jain et al. Dual sourcing under suppliers' capacity investments
Bhamidipati et al. A large scale prediction engine for app install clicks and conversions
Gagliardi et al. Upstreamness, wages and gender: Equal benefits for all?
US20160140577A1 (en) Unified marketing model based on conduit variables
Pozo et al. Long-term Nash equilibria in electricity markets
CN114943565A (en) Electric power spot price prediction method and device based on intelligent algorithm
US20120130828A1 (en) Source of decision considerations for managing advertising pricing
KR20240025574A (en) System and method for managing bid based on intelligent demand response
CN111563628A (en) Real estate customer transaction time prediction method, device and storage medium
Khodadadi et al. Stochastic adaptive robust approach for day-ahead energy market bidding strategies in hydro dominated sequential electricity markets
CN112905909B (en) Data prediction method, data prediction device, computer readable storage medium and electronic equipment
Ciarreta et al. Forecasting electricity prices using bid data
Bringedal et al. Backtesting coordinated hydropower bidding using neural network forecasting
Wan et al. An empirical study of the self-fulfilling prophecy effect in Chinese stock market
CN112101981A (en) Opportunity cost-based power frequency modulation market quotation calculation method and system
Yang Markov-Perfect Industry Dynamics: Theory, Computation, and Applications
Ikonomovska et al. Real-time bid prediction using thompson sampling-based expert selection
CN115936764A (en) Product promotion method and device
Harada Focusing device as innovation mechanism and cluster growth

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40050586

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant