CN107800780A - data service method, device, storage medium and computer equipment - Google Patents
data service method, device, storage medium and computer equipment Download PDFInfo
- Publication number
- CN107800780A CN107800780A CN201710940315.8A CN201710940315A CN107800780A CN 107800780 A CN107800780 A CN 107800780A CN 201710940315 A CN201710940315 A CN 201710940315A CN 107800780 A CN107800780 A CN 107800780A
- Authority
- CN
- China
- Prior art keywords
- data
- data source
- online service
- source
- upstate
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
- H04L67/5682—Policies or rules for updating, deleting or replacing the stored data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses a kind of data service method, device, storage medium and computer equipment uploaded based on off-line data.This method includes:When getting offline load request, according to the online service state of at least two data sources, the data source for selecting idle condition is target data source;Off-line data to be uploaded is loaded into the target data source;After off-line data loaded, the online service state for changing the target data source is available;When getting data service request, according to the online service state of at least two data sources, the data source of upstate is selected to call data for online service example.When the embodiment of the present invention can realize data source switching while upper-layer user's unaware, economize on resources.
Description
Technical field
The present embodiments relate to technical field of data processing, more particularly to a kind of data clothes uploaded based on off-line data
Business method, apparatus, storage medium and computer equipment.
Background technology
Currently more and more in the intelligentized service scenarios of internet arena, the general flow of intelligent Service is before this to big
The historical data of amount is trained study and obtains model, recycles model to be predicted the user behavior in future.Due to some
The algorithm flow of intelligent use is more complicated and to handle the user characteristic data of magnanimity, so needing powerful computing resource simultaneously
It is and time-consuming larger.
The strategy that industry is commonly used for problem above is, using the offline batch processing training of large-scale distributed cluster and
Prediction process, the data that offline service device is calculated upload to database on line again, for aol server from line database
Middle inquiry result of calculation, externally to provide intelligentized service.Detailed process is typically good by off-line calculation with certain frequency
Data upload to database on line, when outside need inquires about corresponding result, aol server is by database on line
The record for meeting querying condition in the data of biography returns to external callers.The good data of processed offline are uploaded into data on line
Typically take two schemes in storehouse:1. in user's visit capacity less time section (for example after morning), directly it upload the data on line
In a certain data source of database, the covering renewal of data is carried out in the data source of database on line, while when needed,
The data source of database is also used for being serviced example calling on line, to perform external service function;2. database provides on line
Two data sources, and when each data source corresponds to an online service example, one of Service Instance and number corresponding to it
It is used for externally providing service according to source, another Service Instance is in down status and its corresponding data source is used for carrying out in data
Pass, after data have uploaded, then this Service Instance is reached the standard grade, the Service Instance for providing service before is offline and corresponding
Data source turns into the target uploaded next time, circulates external offer service in turn like this.
Above two off-line data upload scheme all exists clearly disadvantageous.The first project plan comparison is simple, saves service
The resource of database on example and line, but data upload and Service Instance is all to face same data source, are uploaded in data
There are a large amount of read-writes and couple in period, so Service Instance can not provide service well, influence Consumer's Experience;Second scheme can
To accomplish that data are not disrupted during uploading with service during data source switching, upper-layer user's unaware, but Service Instance
Circulation is reached the standard grade and offline complex operation, generally requires manual intervention, and because Service Instance and the equal timesharing of data source provide service,
The resource free time of same time half is caused, resource largely wastes.
The content of the invention
The embodiment of the present invention provides a kind of data service method, device, storage medium and meter uploaded based on off-line data
Calculate machine equipment, it is possible to achieve when data source switches while upper-layer user's unaware, economize on resources.
In a first aspect, the embodiments of the invention provide a kind of data service method uploaded based on off-line data, it is applied to
Aol server, including:
When getting offline load request, according to the online service state of at least two data sources, idle condition is selected
Data source be target data source;
Off-line data to be uploaded is loaded into the target data source;
After off-line data loaded, the online service state for changing the target data source is available;
When getting data service request, according to the online service state of at least two data sources, upstate is selected
Data source for online service example call data.
Second aspect, the embodiments of the invention provide a kind of data service device uploaded based on off-line data, it is applied to
Aol server, including:
Target data source determining module, for when getting offline load request, according to the line of at least two data sources
Upper service state, the data source for selecting idle condition are target data source;
Load-on module, for off-line data to be uploaded to be loaded into the target data source;
Online service status modifier module, for after off-line data loaded, changing the line of the target data source
Upper service state is available;
Data source calling module, for when getting data service request, being taken according on the line of at least two data sources
Business state, the data source of upstate is selected to call data for online service example, including:
The third aspect, the embodiments of the invention provide a kind of computer-readable recording medium, is stored thereon with computer journey
Sequence, the data, services side uploaded based on off-line data as described in the present embodiment of the invention is realized when the program is executed by processor
Method.
Fourth aspect, the embodiments of the invention provide a kind of computer equipment, the computer equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processing
Device realizes the data service method uploaded based on off-line data as described in the present embodiment of the invention.
The embodiment of the present invention by monitor in real time and switch data source state, enable at least one data source to be in
Upstate, so as to provide online service, and at least one data source is at idle condition, so as to allow into line number
According to offline upload, aol server can according to the state of data source carry out data source switching use, so as to realize number
Upper-layer user's unaware when switching according to source, the round-the-clock offer service of online service example energy, does not influence Consumer's Experience;Moreover,
Do not need manual intervention to automatically complete in data source handoff procedure, and save aol server resource.
Brief description of the drawings
Fig. 1 is a kind of flow chart for data service method uploaded based on off-line data that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart for data service method uploaded based on off-line data that the embodiment of the present invention two provides;
Fig. 3 is a kind of structural representation for data service device uploaded based on off-line data that the embodiment of the present invention three provides
Figure;
Fig. 4 is a kind of structural representation for computer equipment that the embodiment of the present invention four provides.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that in order to just
Part related to the present invention rather than entire infrastructure are illustrate only in description, accompanying drawing.
The flow chart for the data service method uploaded based on off-line data that Fig. 1 provides for the embodiment of the present invention one, this reality
The situation that example is applicable to perform off-line data upload and data, services simultaneously is applied, this method is applied in aol server, can
To be performed by hardware or/and the data service device of software realization, specifically include:
S110, when getting offline load request, according to the online service state of at least two data sources, selection is idle
The data source of state is target data source.
Data source is the container for data storage, and the data in data source can be called by online service example, also may be used
So that the off-line data calculated is uploaded in data source.Include DSN and table in one data source, pass through data
Source name can select table corresponding to data source, and the data of data source can be called by the table.Service Instance is answered to be a certain
With or a certain user the example of the service of offer is provided, multiple Service Instances can be included in a server.In the present embodiment,
At least two data source is all located in same database, and online service example is corresponding with database, is external users
The service of data call is provided.
The online service state of data source has two kinds, and one kind is upstate, i.e., the data of the data source can be by line
Service Instance calls, and one kind is idle condition, and the data of the data source can not be provided to online service.Getting offline loading
During request, then the data source of idle condition is labeled as target data source.Target data source can be one or more
It is individual.
S120, off-line data to be uploaded is loaded into the target data source.
After determining target data source, offline service device or offline database can perform the offline number to target data source
According to upload operation.Specifically, off-line data to be uploaded is loaded into the target data source, it may include:
Read the data organizational form of target data source requirement;
Off-line data to be uploaded is read, the form of the off-line data to be uploaded is converted to the number of target data source requirement
According to organizational form;
Off-line data to be uploaded loading after form is changed is uploaded in target data source.
The data organizational form of target data source requirement is the data format that target data source can store.It is to be uploaded offline
Data, the off-line data to be uploaded calculate via offline service device, by the form of the off-line data to be uploaded calculated
Be converted to the data organizational form of target data source requirement;Off-line data to be uploaded loading after form is changed uploads to target
In data source, the table of target data source is updated.
When target data source is multiple, off-line data to be uploaded can be uploaded in some target data source,
It can upload to simultaneously in multiple target data sources.If off-line data to be uploaded for it is multiple, can by it is multiple it is to be uploaded from
Line number can also all be uploaded in multiple target data sources, can also divided according to only uploading in some target data source simultaneously
Do not upload in different target data sources.
S130, after off-line data loaded, the online service state for changing the target data source is available.
After off-line data loaded, then the data in the data source of idle condition include newest data, if this
When also only the data in the available data source of current state are called if, then newest data can not be called, at this
In the case of kind, the online service state of data source can be switched over, change the online service state of target data source, make it
As the data source of upstate, it is called for online service example.
S140, when getting data service request, according to the online service state of at least two data sources, selection is available
The data source of state calls data for online service example.
Data, services are mainly that external users is called by online service example to the data of data source, such as preceding institute
State, the data source of upstate is available for online service example to call data.During beginning, the data of each data source be it is synchronous, because
This, can first specify the data source of some or some data sources as upstate, be called for online service example, and with from
The loading of line number evidence uploads, the data of target data source be only it is newest, therefore, by changing data source online service state,
The data of the data for the data source then called by the online service example i.e. data source of upstate are always maintained at most comprehensive.
, therefore, every time will be to be uploaded offline in execution because the data of the data source of upstate are always most comprehensive
Before data are loaded into the target data source, the data in target data source are also first updated last state, specifically
Operation is:The data of upstate data source are read, are synchronized in the target data source.
In view of the data of the data source of upstate are always maintained at most comprehensively, if multiple target data sources are carried out offline
Data manipulation, under above-mentioned different off-line data loading upload mode, it is revised as the mode of upstate and also differed, tool
Body is as follows:
If one or more off-line datas to be uploaded are uploaded in some target data source, then most mesh at last
It is available to mark the online service status modifier of data source.
If one or more off-line datas to be uploaded are uploaded in multiple target data sources simultaneously, then the plurality of mesh
The data of mark data source be it is synchronous, can optionally one or more target data sources, the modification of progress online service state.
If multiple off-line datas to be uploaded are uploaded in different target data sources respectively, then finally no matter use
Which kind of mode, still the plurality of off-line data loading to be uploaded is uploaded in wherein one or more target data sources, i.e.,
Make at least to ensure that a target data source receives all off-line datas to be uploaded during load request, then will be needed
The online service status modifier of any one or more target data source of the off-line data of upload is available.
The off-line data being uploaded calculates through offline service device, and its result of calculation can be directly real by online service
Example inquiry.When online service example carries out data call operation to the data source of upstate, in addition to the operation that data are transferred,
It can also be a kind of operation of inquiry.
The operation principle of the data service method uploaded based on off-line data:
External users can call the data of the data source of upstate, off-line data loading by online service example
Upload in the target data source of idle condition, be then available by the online service status modifier of target data source, on line
Service Instance calls, and at the same time, the online service status modifier that the data source of upstate is called by online service example is
Idle condition, so circulation, realize and operated while data, services and off-line data upload.
The technical scheme of the present embodiment, by when getting offline load request, according to the line of at least two data sources
Upper service state, the data source for selecting idle condition are target data source;Off-line data to be uploaded is loaded into the number of targets
According in source;After off-line data loaded, the online service state for changing the target data source is available;Getting number
During according to service request, according to the online service state of at least two data sources, the data source of upstate is selected to supply online service
Example calls data, solves the problems, such as the wasting of resources in data upload and data, services and influences Consumer's Experience, realizes data
Upper-layer user's unaware when source switches, online service example can be round-the-clock while provide data, services, online service example and
Offline upload faces different data sources, in offline upload procedure, does not influence Consumer's Experience.
Embodiment two
Fig. 2 is the flow chart for the data service method uploaded based on off-line data that the embodiment of the present invention two provides.This reality
It is the improvement carried out on the basis of above-described embodiment institute offer scheme to apply example, in the present embodiment, can be supervised by monitor
The online service state of survey, inquiry and modification data source, specifically may include:
S210, when getting offline load request, from monitor read data source mark, determine upstate
Data source;Wherein, the monitor is used for the data source mark for recording the current upstate that service is provided for online service example
Know;The mark of idle condition data source is determined according to the mark of the upstate data source, by the idle condition data source
As target data source.
Monitor can use software or/and hardware to realize, in other embodiments, can also use other modes logarithm
Inquired about and changed according to the online service state in source.Data source identification can use DSN, and each data source has
Corresponding unique data source identification, the mark by reading data source from monitor can determine the data of upstate
Source, in the case where the quantity and mark of data source determine, the data source identification of not monitored device record is idle condition
The mark of data source, target data source then can determine that according to the mark of the data source of idle condition.
S220, the data for reading upstate data source, are synchronized in the target data source.
S230, off-line data to be uploaded is loaded into the target data source.
S240, after off-line data loaded, write the mark of the target data source to monitor to be identified
Replace.
The modification of online service state to data source is carried out by monitor, for example, can be by identifying the side replaced
Formula is carried out, original in monitor by being replaced in the mark write-in monitor of the target data source of loaded off-line data
Mark.
S250, when the mark for receiving the monitor and being reported by monitor event replaces notice, online service is real
The mark recorded in example is revised as the mark recorded in monitor, and the mark recorded in the online service example is used to determine line
Upper Service Instance reaches the path of upstate data source.
Monitor event can be registered in advance in monitor, when the online service state of monitor monitoring changes
When, online service example can be notified to modify the mark of its own in time so that the mark and line of record in monitor
The mark of upper Service Instance record is synchronous.
Online service example can be divided into selector according to the division of its function and query logic device forms, selector and inquiry
Logic device can be realized by software or/and hardware.Wherein, the mark recorded in Service Instance is located in selector, phase
Ying Di, the mark recorded in the online service example are used for the path for determining that online service example reaches upstate data source
Specific manifestation form is used for the path for determining that selector reaches upstate data source for the mark recorded in selection.
Query logic device can be handled external users in the data of calling, and processing mode can be by calling
Data organizational form that data are handled according to business scenario, need the data conversion of calling into external users etc..
S260, when getting data service request, using in online service example corresponding to record identification data source make
For the data source of upstate, data are called for online service example.
In the case that the mark recorded in monitor is synchronous with the mark that online service example records, data are being got
During service request, the data source of upstate directly can be determined from the mark of online service example record, can saved every time
The operation of query monitor device will be gone when getting data service request, has saved resource.
Further, when getting data service request, using data corresponding to record identification in online service example
Data source of the source as upstate, data are called for online service example, can be included:
When getting data service request, the mark recorded is inquired about in the online service example;
Data source corresponding to record identification in the online service example as the data source of upstate, is determined on line
Service Instance reaches the path of upstate data source;
The path acquisition of upstate data source is reached according to the data service request and online service example can use shape
Data corresponding to state data source, called for online service example.
Because record identification is particularly located in selector in online service example, therefore is getting data service request
When, using data source of the data source as upstate corresponding to record identification in online service example, for online service example
Data are called, are specifically included:
When getting data service request, the mark recorded is inquired about in selector;
Using data source corresponding to record identification in the selector as the data source of upstate, determine that selector reaches
The path of upstate data source;
The mark recorded according to selector determines that selector reaches the path of upstate data source;
Determine that external users needs the data called according to the data service request, such as including data content, number
According to organizational form etc.;
Data content related in upstate data source is inquired about by the table of the upstate data source, then called
The data content, and by query logic device by the data content be converted into external users need data tissue shape
Formula, it is sent to external users.
The technical scheme of the present embodiment, solve data and upload and the wasting of resources in data, services and influence Consumer's Experience
Problem, upper-layer user's unaware when realizing data source switching, online service example can be round-the-clock while provide data, services, line
Upper Service Instance and offline upload face different data sources, in offline upload procedure, do not influence Consumer's Experience.
Embodiment three
Fig. 3 is a kind of structural representation for data service device uploaded based on off-line data that the embodiment of the present invention three provides
Figure, as shown in figure 3, the data service device uploaded based on off-line data described in the present embodiment is included:Target data source determines
Module 310, load-on module 320, online service status modifier module 330 and data source calling module 340.
Wherein, target data source determining module 310 is used for when getting offline load request, according at least two data
The online service state in source, the data source for selecting idle condition are target data source.
Load-on module 320 is used to off-line data to be uploaded being loaded into the target data source.
Online service status modifier module 330 is used for after off-line data loaded, changes the target data source
Online service state is available.
Data source calling module 340 is used for when getting data service request, according on the line of at least two data sources
Service state, the data source of upstate is selected to call data for online service example.
Further, the target data source determining module 310 includes:
Data source identification reading unit, for when getting offline load request, data source to be read from monitor
Mark, determine the data source of upstate;Wherein, the monitor is used to record currently provides service for online service example
The data source identification of upstate;
Idle condition data source determining unit, for determining idle condition number according to the mark of the upstate data source
According to the mark in source, using the idle condition data source as target data source.
Further, online service status modifier module 330 includes:
Replacement unit is identified, for after off-line data loaded, the mark of the target data source to be write to monitor
Know and replaced with being identified.
Further, data source calling module 340 includes:
Upstate data source determining unit, for when getting data service request, will be recorded in the monitor
Data source of the data source corresponding to mark as upstate, data are called for online service example.
Further, in addition to:
Online service instance identification changes unit, in the mark for receiving the monitor and being reported by monitor event
When replacing notice, the mark recorded in online service example is revised as the mark recorded in monitor, the online service is real
The mark recorded in example is used for the path for determining that online service example reaches upstate data source;
Accordingly, upstate data source determining unit includes:
Upstate data source obtains subelement, for when getting data service request, using online service example
Data source of the data source as upstate corresponding to middle record identification, data are called for online service example.
Further, upstate data source obtains subelement and included:
When getting data service request, the mark recorded is inquired about in the online service example;
Data source corresponding to record identification in the online service example as the data source of upstate, is determined on line
Service Instance reaches the path of upstate data source;
The path acquisition of upstate data source is reached according to the data service request and online service example can use shape
Data corresponding to state data source, called for online service example.
The executable present invention of the data service device uploaded based on off-line data that the embodiment of the present invention is provided is any real
The data service method uploaded based on off-line data that example is provided is applied, possesses the corresponding functional module of execution method and beneficial to effect
Fruit.
Example IV
Fig. 4 is a kind of structural representation for computer equipment that the embodiment of the present invention four provides, as shown in figure 4, the calculating
Machine equipment includes processor 410, memory 420, input unit 430 and output device 440;Processor 410 in computer equipment
Quantity can be one or more, in Fig. 4 by taking a processor 410 as an example;Processor 410, storage in computer equipment
Device 420, input unit 430 can be connected with output device 440 by bus or other modes, to be connected by bus in Fig. 4
Exemplified by.
Memory 420 is used as a kind of computer-readable recording medium, and journey is can perform available for storage software program, computer
Sequence and module, programmed instruction/mould as corresponding to the data service method uploaded based on off-line data in the embodiment of the present invention
Block (for example, based on off-line data upload data service device in target data source determining module 310, load-on module 320,
Online service status modifier module 330 and data source calling module 340).Processor 410 is stored in memory 420 by operation
In software program, instruction and module, so as to perform the various function application of computer equipment and data processing, that is, realize
The above-mentioned data service method uploaded based on off-line data.
Memory 420 can mainly include storing program area and storage data field, wherein, storing program area can store operation system
Application program needed for system, at least one function;Storage data field can store uses created data etc. according to terminal.This
Outside, memory 420 can include high-speed random access memory, can also include nonvolatile memory, for example, at least one
Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 420 can enter one
Step includes that relative to the remotely located memory of processor 410, these remote memories network connection to computer can be passed through
Equipment.The example of above-mentioned network includes but is not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Input unit 430 can be used for the numeral or character information for receiving input.Output device 440 may include that display screen etc. is aobvious
Show equipment.
Embodiment five
The embodiment of the present invention five also provides a kind of storage medium for including computer executable instructions, and the computer can be held
Row instruction by computer processor when being performed for performing a kind of data service method uploaded based on off-line data, this method
Including:
When getting offline load request, according to the online service state of at least two data sources, idle condition is selected
Data source be target data source;
Off-line data to be uploaded is loaded into the target data source;
After off-line data loaded, the online service state for changing the target data source is available;
When getting data service request, according to the online service state of at least two data sources, upstate is selected
Data source for online service example call data.
Certainly, a kind of storage medium for including computer executable instructions that the embodiment of the present invention is provided, its computer
The operation of method that executable instruction is not limited to the described above, can also carry out that any embodiment of the present invention provided based on offline
Associative operation in the data service method that data upload.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention
It can be realized by software and required common hardware, naturally it is also possible to realized by hardware, but the former is more in many cases
Good embodiment.Based on such understanding, what technical scheme substantially contributed to prior art in other words
Part can be embodied in the form of software product, and the computer software product can be stored in computer-readable recording medium
In, floppy disk, read-only storage (Read-Only Memory, ROM), random access memory (Random such as computer
Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are causing a computer to set
Standby (can be personal computer, server, or network equipment etc.) performs the method described in each embodiment of the present invention.
It is worth noting that, in the embodiment of the above-mentioned data service device uploaded based on off-line data, included is each
Individual unit and module are simply divided according to function logic, but are not limited to above-mentioned division, as long as phase can be realized
The function of answering;In addition, the specific name of each functional unit is also only to facilitate mutually differentiation, is not limited to this hair
Bright protection domain.
Pay attention to, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes,
Readjust and substitute without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
Other more equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.
Claims (12)
- A kind of 1. data service method uploaded based on off-line data, applied to aol server, it is characterised in that including:When getting offline load request, according to the online service state of at least two data sources, the number of idle condition is selected It is target data source according to source;Off-line data to be uploaded is loaded into the target data source;After off-line data loaded, the online service state for changing the target data source is available;When getting data service request, according to the online service state of at least two data sources, the number of upstate is selected According to source data are called for online service example.
- 2. according to the method for claim 1, it is characterised in that when getting offline load request, according at least two The online service state of data source, select the data source of idle condition includes for target data source:When getting offline load request, the mark of data source is read from monitor, determines the data source of upstate;Its In, the monitor is used for the data source identification for recording the current upstate that service is provided for online service example;The mark of idle condition data source is determined according to the mark of the upstate data source, by the idle condition data source As target data source.
- 3. according to the method for claim 2, it is characterised in that:After off-line data loaded, change the online service state of the target data source includes to be available:Counting offline After loaded, the mark that the target data source is write to monitor is replaced with being identified.
- 4. according to the method for claim 3, it is characterised in that when getting data service request, according at least two The online service state of data source, the data source of upstate is selected to call data to include for online service example:When getting data service request, using data source corresponding to record identification in the monitor as the number of upstate According to source, data are called for online service example.
- 5. according to the method for claim 4, it is characterised in that also include:When receiving the mark replacement notice that the monitor is reported by monitor event, by what is recorded in online service example Mark is revised as the mark recorded in monitor, and the mark recorded in the online service example is used to determine online service example Reach the path of upstate data source;Accordingly, when getting data service request, using data source corresponding to record identification in the monitor as available The data source of state, data are called to include for online service example:When getting data service request, using data source corresponding to record identification in online service example as upstate Data source, for online service example call data.
- 6. according to the method for claim 5, it is characterised in that when getting data service request, using online service Data source of the data source corresponding to record identification as upstate in example, data are called for online service example, including:When getting data service request, the mark recorded is inquired about in the online service example;Data source corresponding to record identification in the online service example as the data source of upstate, is determined into online service Example reaches the path of upstate data source;The path that upstate data source is reached according to the data service request and online service example obtains upstate number According to data corresponding to source, called for online service example.
- 7. according to the method for claim 1, it is characterised in that at least two data source is located in same database.
- 8. according to the method for claim 1, it is characterised in that the off-line data to be uploaded is being loaded into the target Before in data source, in addition to:The data of upstate data source are read, are synchronized in the target data source.
- 9. according to the method for claim 1, it is characterised in that described that off-line data to be uploaded is loaded into the number of targets According in source, including:Obtain the data organizational form of target data source requirement;Off-line data to be uploaded is read, the form of the off-line data to be uploaded is converted to the data group of target data source requirement Knit form;Off-line data to be uploaded loading after form is changed is uploaded in target data source.
- A kind of 10. data service device uploaded based on off-line data, applied to aol server, it is characterised in that including:Target data source determining module, for when getting offline load request, being taken according on the line of at least two data sources Business state, the data source for selecting idle condition are target data source;Load-on module, for off-line data to be uploaded to be loaded into the target data source;Online service status modifier module, for after off-line data loaded, changing and being taken on the line of the target data source Business state is available;Data source calling module, for when getting data service request, according to the online service shape of at least two data sources State, the data source of upstate is selected to call data for online service example.
- 11. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The data service method uploaded based on off-line data as described in any in claim 1-9 is realized during execution.
- 12. a kind of computer equipment, it is characterised in that the computer equipment includes:One or more processors;Storage device, for storing one or more programs,When one or more of programs are by one or more of computing devices so that one or more of processors are real The now data service method uploaded based on off-line data as described in any in claim 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710940315.8A CN107800780B (en) | 2017-10-10 | 2017-10-10 | Data service method, device, storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710940315.8A CN107800780B (en) | 2017-10-10 | 2017-10-10 | Data service method, device, storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107800780A true CN107800780A (en) | 2018-03-13 |
CN107800780B CN107800780B (en) | 2020-09-08 |
Family
ID=61533861
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710940315.8A Active CN107800780B (en) | 2017-10-10 | 2017-10-10 | Data service method, device, storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107800780B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112230978A (en) * | 2020-09-25 | 2021-01-15 | 山东浪潮通软信息科技有限公司 | Multi-data-source dynamic switching method, electronic equipment and storage medium |
CN117255136A (en) * | 2023-11-15 | 2023-12-19 | 博泰车联网(南京)有限公司 | Routing method, micro-service system, device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102480384A (en) * | 2010-11-24 | 2012-05-30 | 英业达股份有限公司 | Method for updating firmware |
CN105978949A (en) * | 2016-04-27 | 2016-09-28 | 乐视控股(北京)有限公司 | Off-line data uploading method and apparatus thereof |
CN106095571A (en) * | 2016-06-07 | 2016-11-09 | 中国建设银行股份有限公司 | Many RAC group system, data access method and device |
CN106484792A (en) * | 2016-09-22 | 2017-03-08 | 深圳市分期乐网络科技有限公司 | A kind of data power supply management method for Persistence Layer Framework and device |
-
2017
- 2017-10-10 CN CN201710940315.8A patent/CN107800780B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102480384A (en) * | 2010-11-24 | 2012-05-30 | 英业达股份有限公司 | Method for updating firmware |
CN105978949A (en) * | 2016-04-27 | 2016-09-28 | 乐视控股(北京)有限公司 | Off-line data uploading method and apparatus thereof |
CN106095571A (en) * | 2016-06-07 | 2016-11-09 | 中国建设银行股份有限公司 | Many RAC group system, data access method and device |
CN106484792A (en) * | 2016-09-22 | 2017-03-08 | 深圳市分期乐网络科技有限公司 | A kind of data power supply management method for Persistence Layer Framework and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112230978A (en) * | 2020-09-25 | 2021-01-15 | 山东浪潮通软信息科技有限公司 | Multi-data-source dynamic switching method, electronic equipment and storage medium |
CN117255136A (en) * | 2023-11-15 | 2023-12-19 | 博泰车联网(南京)有限公司 | Routing method, micro-service system, device and storage medium |
CN117255136B (en) * | 2023-11-15 | 2024-02-27 | 博泰车联网(南京)有限公司 | Routing method, micro-service system, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107800780B (en) | 2020-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111143039B (en) | Scheduling method and device of virtual machine and computer storage medium | |
CN105808323A (en) | Virtual machine creation method and system | |
CN110166524A (en) | Switching method, device, equipment and the storage medium of data center | |
CN107800780A (en) | data service method, device, storage medium and computer equipment | |
CN111369011A (en) | Method and device for applying machine learning model, computer equipment and storage medium | |
CN110149377A (en) | A kind of video service node resource allocation methods, system, device and storage medium | |
CN112799596A (en) | Capacity expansion control method and device for storage resources and electronic equipment | |
CN115130679A (en) | Data management and control method, related device and medium program product | |
CN112685462B (en) | Feeder line data analysis method, feeder line data analysis device, computer equipment and storage medium | |
CN112948099B (en) | Task issuing flow method and device, computer equipment and storage medium | |
CN116048817B (en) | Data processing control method, device, computer equipment and storage medium | |
JP2022026878A (en) | Demand prediction program, demand predicting device, demand prediction method, demand prediction notification program, demand prediction notification device, and demand prediction notification method | |
CN116896591A (en) | Scheduling method and device for network data analysis model and computer equipment | |
Tiemessen et al. | Dynamic control in multi-item production/inventory systems | |
CN113742059B (en) | Task allocation method, device, computer equipment and storage medium | |
CN115660591A (en) | Process configuration method, system, electronic device and medium for business approval | |
CN112734005B (en) | Method and device for determining prediction model, electronic equipment and storage medium | |
CN114727313A (en) | Information processing method, device, equipment and storage medium | |
CN106815295B (en) | Substation data statistical method and device | |
CN109600245B (en) | Automatic configuration method and device for server | |
CN109886570A (en) | Facility information processing method, device and the computer equipment of statistical regions | |
CN112651538A (en) | Method and device for configuring rack | |
CN116842087A (en) | Data loading method and device, processor and electronic equipment | |
CN111400318B (en) | Method and device for generating scheduling policy of data storage | |
CN114153525B (en) | AI model servitization sharing method and system for power grid regulation and control service |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |