Specific embodiment
Below in conjunction with the attached drawing in this specification embodiment, the technical solution in this specification embodiment is carried out clear
Chu is fully described by, it is clear that described embodiment is only this specification a part of the embodiment, rather than whole implementation
Example.The embodiment of base in this manual, those of ordinary skill in the art are obtained without creative efforts
Every other embodiment, all should belong to this specification protection range.
Please refer to Fig. 1, Fig. 2 and Fig. 3.This specification embodiment provides a kind of model training method.The model training side
Method may comprise steps of using server as executing subject.
Step S10: sample data is obtained.
In the present embodiment, the sample data may include at least one data group under specific dimension.Every number
A business object can be corresponded to according to group, can specifically include the time series data of at least one type.The specific dimension
It may include trade company's dimension, geographic area dimension, transaction channel dimension etc., the transaction channel may include wireless payment, PC
Payment, agreement payment etc..The business object correspondence may include trade company, geographic area, transaction channel etc..For example, described
When specific dimension is trade company's dimension, the corresponding business object of each data group can be trade company.It is geography in the specific dimension
When region dimension, the corresponding business object of each data group can be geographic area.It is transaction channel dimension in the specific dimension
When spending, the corresponding business object of each data group can be transaction channel.The time series data can be by same type
Data element data element sequence of formation by the chronological order arrangement that it occurs.The time series data can wrap
Include the data element of the types such as trading volume or advertising campaign dynamics.For example, the sample data may include under trade company's dimension
3 data groups GA, GB, GC.Data group GA can correspond to trade company A, can specifically include time series data sequence GA1, GA2.When
Data element in sequence data sequence GA1 can be trading volume, and the data element in time series data sequence GA2 can live for promotion
Power degree.Data group GB can correspond to trade company B, can specifically include time series data sequence GB1, GB2.Time series data sequence GB1
In data element can be trading volume, the data element in time series data sequence GB2 can be advertising campaign dynamics.Data group
GC can correspond to trade company C, can specifically include time series data sequence GC1, GC2.Data element in time series data sequence GC1 can
Think trading volume, the data element in time series data sequence GC2 can be advertising campaign dynamics.
In the present embodiment, the available historical data in specific time region of the server, when described specific
Between the length in section can flexibly set according to actual needs, such as 1 month, 2 months, 6 months etc..The historical data can be with
Including historical trading data.The historical trading data may include Transaction Information, merchant information and advertising campaign information etc..
The Transaction Information may include trading volume, transaction amount, transaction channel and trade date etc..The merchant information can wrap
Include the geographic area etc. of name of firm and trade company.The advertising campaign information may include advertising campaign dynamics etc..The service
The historical data can be divided at least one data group according to the specific dimension by device;It, can be with for each data group
Generate the corresponding time series data of data element of each type in the data group;And then the available sample data.
In the present embodiment, the server can obtain the historical data using any way.For example, developer
The historical data can be inputted in the server.The server can receive the history number of developer's input
According to.As a further example, terminal device or other servers can send the historical data to the server.The server
It can receive the historical data that the terminal device or other servers are sent.
Step S12: at least one corresponding time-series image of at least one described time series data is generated.
In the present embodiment, for each time series data, corresponding time series chart is can be generated in the server
Picture.The storage format of the time-series image may include bitmap format (BMP), joint photo Experts Group formats (JPEG),
Label image file format (TIFF) etc..Time series data can be in the time-series image with visual means
It is existing.That is, may include the corresponding figure of time series data in the time-series image.Different time sequence data when
Between the type of corresponding figure can be identical or different in sequence image.The figure may include line chart, column diagram, cake
Figure, bar chart, scatter plot etc..Certainly, the figure can also be other forms, will not enumerate herein.It is described in this way
The Feature Conversion of time series data can be patterned space characteristics by server, convenient for the study of data prediction model.
It should be noted that the size of different time sequence image can be identical or different.In addition, in the time-series image also
It may include other contents, such as legend, graphical banner, reference axis, Axis Titles etc..
Step S14: based at least one described time-series image, the data prediction model that training constructs in advance.
In the present embodiment, the data prediction model can be a kind of mathematical model.The data prediction model is specific
It may include regression model (such as linear regression model (LRM), nonlinear regression model (NLRM) etc.), neural network model, support vector machines mould
Type, Bayesian model etc..The server can be based at least one described time-series image, the data that training constructs in advance
Prediction model;To use the data such as trading volume, the transaction amount of data prediction model prediction business object after training.
In the present embodiment, the server can train the data constructed in advance to predict mould as unit of data group
Type.Each data group may include the time series data of at least one type.In this way, the server can be based at least one
The data element of a type data prediction model that usually training constructs in advance.It further, include multiple classes in each data group
When the time series data of type, the server can the data element based on multiple types usually the data that construct in advance of training are pre-
Model is surveyed, so that data prediction model can learn the feature to multiple types.The service implement body can using with
Machine gradient declines (Stochastic Gradient Descent) scheduling algorithm to train the data prediction model constructed in advance.When
So here stochastic gradient descent algorithm is merely illustrative, so that machine learning model is obtained trained algorithm equal
It can be applied in the technical solution of the present embodiment.
In an embodiment of the present embodiment, the server can also be to the time series in the sample data
Data carry out data enhancing processing, to increase the quantity of data element in time series data;It can be based at least one data
Enhancing treated time series data, generates at least one time-series image;It can be based at least one described time sequence
Column image, the data prediction model that training constructs in advance, so that the generalization ability of the data prediction model after training is stronger.Example
Such as, sometime sequence data may include 150 days trading volumes.So, the server can be based on friendship in the 1-15 days
Yi Liang;A trading volume is generated as the 151st day trading volume;A transaction can be generated based on the 2-16 days trading volumes
Measure the trading volume as the 152nd day;And so on, a trading volume conduct can be generated based on the 136-150 days trading volumes
286th day trading volume.Specifically, for example, the server can calculate the 1-15 days trading volumes average value or middle position
Number, as the 151st day trading volume.
In an embodiment of the present embodiment, the server can also be to the time series in the sample data
Data are normalized, and the data element in time series data is normalized to default value section;It can be based on
Time series data after at least one normalized generates at least one time-series image;It can be based on described at least
One time-series image, the data prediction model that training constructs in advance.The default value section can be according to actual needs
Flexibly setting, such as may include [0,1], [0,100] etc..
In an embodiment of the present embodiment, the server can also count the time-series image of generation
It is handled according to enhancing, to increase the quantity of time-series image, so that the generalization ability of the data prediction model after training is stronger.It is right
Time-series image carries out data enhancing processing, may include being translated, being rotated to time-series image, is mirror image, fuzzy etc.
Processing.
In the present embodiment, the available sample data of the server, the sample data include at least one time
Sequence data;At least one corresponding time-series image of at least one described time series data can be generated, when described
Between in sequence image time series data presented with visual means;It can be based at least one described time-series image, instruction
Practice the data prediction model constructed in advance.The Feature Conversion of time series data can be patterned by the server described in this way
Space characteristics, convenient for the study of data prediction model.
Please refer to Fig. 2, Fig. 3 and Fig. 4.This specification embodiment provides a kind of data predication method.The data prediction side
Method may comprise steps of using server as executing subject.
Step S20: at least one time series data of business object is obtained.
In the present embodiment, the business object may include trade company, geographic area, transaction channel etc..The time sequence
Column data is the data element sequence for arranging the data element of same type by the chronological order that it occurs and being formed.It is described
Time series data may include the data element of the types such as trading volume or advertising campaign dynamics.
In the present embodiment, the server can obtain at least one time of the business object using any way
Sequence data.For example, developer can input at least one time series data of the business object in the server.
The server can receive at least one time series data of the business object of developer's input.As a further example,
Terminal device or other servers can send at least one time series data of the business object to the server.Institute
It states server also and can receive at least one the time sequence for the business object that the terminal device or other servers are sent
Column data.
Step S22: at least one corresponding time-series image of at least one described time series data is generated.
In the present embodiment, the server generates the process of time-series image, may refer to previous embodiment.
Step S24: being handled at least one described time-series image using data prediction model trained in advance,
Obtain the prediction result of the business object.
In the present embodiment, the training process of the data prediction model may refer to previous embodiment.The server
At least one described time-series image can be input to data prediction model trained in advance, obtain the business object
Prediction result.The prediction result may include the data such as trading volume, transaction amount.The business object may include at least one
The time series data of a type.In this way, the server can be realized based on the data element of at least one type to described
The prediction of business object improves the accuracy of prediction result.
In an embodiment of the present embodiment, the server can also to the business object at least one when
Between sequence data be normalized;It can be generated at least based on the time series data after at least one normalized
One time-series image;Data prediction model can be used to handle at least one described time-series image, obtain
The prediction result of the business object.The process of normalized may refer to previous embodiment.
In a Sample Scenario of the present embodiment, the server can be the clothes of a certain cross-border Third-party payment mechanism
Business device.In order to provide the consumption abroad service on line and under line, the Third-party payment mechanism is needed according to each quotient
Historical trading data on the day before family predicts the trading volume on the day of each trade company;In order to according to the transaction on the day of each trade company
It measures to determine the same day foreign exchange amount of money that needs to buy.The historical trading data may include Transaction Information, merchant information and promote
Sell action message etc..Wherein, the Transaction Information may include trading volume, transaction amount, transaction channel and trade date etc..
The merchant information may include the geographic area etc. of name of firm and trade company.The advertising campaign information may include promotion
Activity dynamics etc..
For the historical trading data on the day before each trade company, multiple time series datas are can be generated in the server;
Data prediction model can be used to handle multiple time series datas of the trade company, obtain the transaction on the day of the trade company
Amount.The server can carry out summation operation to the trading volume on the day of each trade company, obtain the trading volume on the day of each trade company
The sum of;The foreign exchange amount of money that the same day needs to buy can be determined according to the sum of trading volume on the day of each trade company.
In the present embodiment, at least one time series data of the available business object of the server;It can give birth to
At at least one corresponding time-series image of at least one described time series data;Data prediction model can be used to institute
It states at least one time-series image to be handled, obtains the prediction result of business object.The server described in this way can be by institute
The Feature Conversion for stating the time series data of business object is patterned space characteristics;It is realized based on patterned space characteristics
Prediction to the business object improves the accuracy of prediction result.
Please refer to Fig. 5.This specification embodiment provides a kind of model training apparatus.The model training apparatus may include
With lower unit.
Acquiring unit 30, for obtaining sample data;The sample data includes at least one time series data;
Generation unit 32, for generating at least one corresponding time series chart of at least one described time series data
Picture;Time series data is presented in the time-series image with visual means;
Training unit 34, for the data prediction mould that based at least one described time-series image, training constructs in advance
Type.
Please refer to Fig. 6.This specification embodiment provides a kind of server.The server may include memory and processing
Device.
In the present embodiment, the memory can be implemented in any suitable manner.For example, the memory can be
Read-only memory, mechanical hard disk, solid state hard disk or USB flash disk etc..The memory can be used for storing computer instruction.
In the present embodiment, the processor can be implemented in any suitable manner.For example, processor can take example
Such as microprocessor or processor and storage can by (micro-) processor execute computer readable program code (such as software or
Firmware) computer-readable medium, logic gate, switch, specific integrated circuit (Application Specific
Integrated Circuit, ASIC), programmable logic controller (PLC) and the form etc. for being embedded in microcontroller.The processor
The computer instruction can be executed and perform the steps of acquisition sample data;The sample data includes at least one time
Sequence data;Generate at least one corresponding time-series image of at least one described time series data;In the time sequence
Time series data is presented in column image with visual means;Based at least one described time-series image, the preparatory structure of training
The data prediction model built.
Please refer to Fig. 7.This specification embodiment provides a kind of data prediction meanss.The data prediction meanss may include
With lower unit.
Acquiring unit 40, for obtaining at least one time series data of business object;
Generation unit 42, for generating at least one corresponding time series chart of at least one described time series data
Picture;Time series data is presented in the time-series image with visual means;
Predicting unit 44, for use in advance trained data prediction model at least one described time-series image into
Row processing, obtains the prediction result of the business object.
Please refer to Fig. 6.This specification embodiment provides a kind of server.The server may include memory and processing
Device.
In the present embodiment, the memory can be implemented in any suitable manner.For example, the memory can be
Read-only memory, mechanical hard disk, solid state hard disk or USB flash disk etc..The memory can be used for storing computer instruction.
In the present embodiment, the processor can be implemented in any suitable manner.For example, processor can take example
Such as microprocessor or processor and storage can by (micro-) processor execute computer readable program code (such as software or
Firmware) computer-readable medium, logic gate, switch, specific integrated circuit (Application Specific
Integrated Circuit, ASIC), programmable logic controller (PLC) and the form etc. for being embedded in microcontroller.The processor
The computer instruction can be executed and perform the steps of at least one time series data for obtaining business object;Generate institute
State at least one corresponding time-series image of at least one time series data;The time series in the time-series image
Data are presented with visual means;At least one described time-series image is carried out using data prediction model trained in advance
Processing, obtains the prediction result of the business object.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip 2.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly
" logic compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development
Seemingly, and the source code before compiling also handy specific programming language is write, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present
Integrated Circuit Hardware Description Language) and Verilog2.Those skilled in the art
It will be apparent to the skilled artisan that only needing method flow slightly programming in logic and being programmed into integrated circuit with above-mentioned several hardware description languages
In, so that it may it is readily available the hardware circuit for realizing the logical method process.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
It can realize by means of software and necessary general hardware platform.Based on this understanding, the technical solution of this specification
Substantially the part that contributes to existing technology can be embodied in the form of software products in other words, the computer software
Product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes each embodiment of this specification or embodiment
Certain parts described in method.
This specification can be used in numerous general or special purpose computing system environments or configuration.Such as: personal computer,
Server computer, handheld device or portable device, laptop device, multicomputer system, microprocessor-based system,
Set top box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer including any of the above system are set
Standby distributed computing environment etc..
This specification can describe in the general context of computer-executable instructions executed by a computer, such as journey
Sequence module.Generally, program module include routines performing specific tasks or implementing specific abstract data types, programs, objects,
Component, data structure etc..This specification can also be practiced in a distributed computing environment, in these distributed computing environment
In, by executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module
It can be located in the local and remote computer storage media including storage equipment.
Although depicting this specification by embodiment, it will be appreciated by the skilled addressee that there are many become for this specification
Shape and the spirit changed without departing from this specification, it is desirable to which the attached claims include these deformations and change without departing from this
The spirit of specification.