CN104408058A - Data access method and device - Google Patents

Data access method and device Download PDF

Info

Publication number
CN104408058A
CN104408058A CN201410594200.4A CN201410594200A CN104408058A CN 104408058 A CN104408058 A CN 104408058A CN 201410594200 A CN201410594200 A CN 201410594200A CN 104408058 A CN104408058 A CN 104408058A
Authority
CN
China
Prior art keywords
data
data base
force
value
local data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410594200.4A
Other languages
Chinese (zh)
Other versions
CN104408058B (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN201410594200.4A priority Critical patent/CN104408058B/en
Publication of CN104408058A publication Critical patent/CN104408058A/en
Application granted granted Critical
Publication of CN104408058B publication Critical patent/CN104408058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data access method and device, wherein the method comprises the following steps that a data access request is received; an effective sign of duplicate data in a local database is read, wherein the effective sign comprises a first sign value or a second sign value; whether the effective sign is the first sign value or not is judged; if so, a local database is accessed according to the data access request; if not, a remote end database is accessed according to the data access request. When the method and the device provided by the embodiment of the invention are implemented, the efficiency for calling the access data can be improved, and in addition, the automatic conversion among multiple data sources can be realized.

Description

A kind of method of data access and device
Technical field
The present invention relates to Computer Applied Technology field, be specifically related to a kind of method and device of data access.
Background technology
In the enterprise-level application environment of complexity, a large amount of called side often needs the remote data storehouse to depositing common data to carry out high Concurrency Access.For reducing the pressure in remote data storehouse, usually the main notebook data in remote data storehouse is needed to copy in the local data base at multiple called side place, called side just can obtain copy data by access local database, and the common way of enterprise buys special data Replica product to realize copying of data.
In numerous in called side, main notebook data and the simultaneous enterprise-level environment of copy data, when the local data base at data synchronization updating failure or stored copies data place break down repair time, in order to ensure that the data of accessing are correct data, often need manual intervention to select to access remote data storehouse.Visible, when there is the problem that failure of data synchronization or local data base break down, called side needs manual intervention and cannot automatically switch to access remote data library inquiry correct data, reduces the efficiency of called side visit data.
Summary of the invention
The embodiment of the present invention provides a kind of method and device of data access, can improve the efficiency of called side visit data, and the robotization realized between many parts of data sources switches.
Embodiment of the present invention first aspect discloses a kind of method of data access, comprising:
Receive data access request;
Read the mark that comes into force of the copy data in local data base, the described mark that comes into force comprises the first value of statistical indicant or the second value of statistical indicant, wherein, described first value of statistical indicant is effective for the copy data identified in local data base, and described second value of statistical indicant is invalid for the copy data identified in local data base;
Whether the mark that comes into force described in judgement is described first value of statistical indicant;
If so, then described local data base is accessed according to described data access request;
If not, then according to described data access request access remote data storehouse.
Embodiment of the present invention second aspect discloses a kind of device of data access, comprising:
Receiving element, for receiving data access request;
Reading unit, for reading the mark that comes into force of the copy data in local data base, the described mark that comes into force comprises the first value of statistical indicant or the second value of statistical indicant, wherein, described first value of statistical indicant is effective for the copy data identified in local data base, and described second value of statistical indicant is invalid for the copy data identified in local data base;
Whether the first judging unit is described first value of statistical indicant for the mark that comes into force described in judging;
First addressed location, for described first judging unit judge described in come into force be masked as described first value of statistical indicant time, access described local data base according to described data access request;
Second addressed location, when being masked as described second value of statistical indicant for coming into force described in judging at described first judging unit, according to described data access request access remote data storehouse.
Implement the embodiment of the present invention, there is following beneficial effect:
In the embodiment of the present invention, after receiving data access request, read the mark that comes into force of the copy data in local data base, if coming into force of the copy data in local data base is masked as the first value of statistical indicant, then access local database, if coming into force of the copy data in local data base is masked as the second value of statistical indicant, then accesses remote data storehouse, thus can improve the efficiency of called side visit data, and the robotization realized between many parts of data sources switches.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of the method for a kind of data access that the embodiment of the present invention provides;
Fig. 2 is the schematic flow sheet of the method for the another kind of data access that the embodiment of the present invention provides;
Fig. 3 is the schematic flow sheet of the method for the another kind of data access that the embodiment of the present invention provides;
Fig. 4 is the structural drawing of a kind of DAA that the embodiment of the present invention provides;
Fig. 5 is the structural drawing of the another kind of DAA that the embodiment of the present invention provides;
Fig. 6 is the structural drawing of the another kind of DAA that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the invention discloses a kind of method and device of data access, the efficiency of called side visit data can be improved.
Refer to Fig. 1, the schematic flow sheet of a kind of data access method that Fig. 1 provides for the embodiment of the present invention, as shown in Figure 1, the method for this data access can comprise the following steps:
S101, reception data access request.
In the embodiment of the present invention, data access request can comprise copy data request of access and main notebook data request of access, and wherein, copy data is arranged in local data base, and main notebook data is arranged in remote data storehouse, and main notebook data is all effective data.
In the embodiment of the present invention, can receive by DAA the copy data request or main notebook data request that send from called side equipment, wherein, this DAA independence called side deployed with devices is in this locality.This DAA can include but not limited to component, and this component can comprise remote access interface package module, data simultaneous module and access routing module.Remote access interface package module, this module is used for when local replica data invalid, directly accesses remote data storehouse by remote access interface; Data simultaneous module, this module automatically and the communication of remote data storehouse, carries out data synchronization updating, and whether synchronized update completes to monitor local data base and remote data storehouse.Access routing module, this module is used for judging that the local data base result whether synchronized update completes selects access remote data storehouse or local data base according to data simultaneous module.
The mark that comes into force of the copy data in S102, reading local data base.
In the embodiment of the present invention, when receiving data access request, all pay the utmost attention to access local database.
In the embodiment of the present invention, the mark that comes into force can comprise the first value of statistical indicant or the second value of statistical indicant, and wherein, the first value of statistical indicant is effective for the copy data identified in local data base, and the second value of statistical indicant is invalid for the copy data identified in local data base.For example, it is effective that the first value of statistical indicant can identify copy data with " TRUE " or " 0 " etc., and it is invalid that the second value of statistical indicant can identify copy data with " FALSE " or " 1 " etc.
S103, judge whether the mark that comes into force is the first value of statistical indicant.
In the embodiment of the present invention, come into force when being masked as the first value of statistical indicant if judge, show that the copy data in current local data base is effective, then perform step S104, if when judgement comes into force and is masked as the second value of statistical indicant, show that the copy data in current local data base is invalid, then perform step S105.
S104, according to data access request access local database.
In the embodiment of the present invention, DAA first can obtain local data base mark ID, then current date (as on September 28th, 2014) and local data base mark ID (as 10234) is imported into, according to data access request, visit local data base by local IP access interface.
S105, according to data access request access remote data storehouse.
In the embodiment of the present invention, when the copy data in local data base is invalid, this DAA, according to data access request, can directly access remote data storehouse by remote access interface.
The method that the embodiment of the present invention provides can be applied to component, but it should be noted that, said method is not limited to be applied to component, and every device, equipment and system implementing the method that the embodiment of the present invention provides, all belongs to scope.
In the method described by Fig. 1, DAA is after receiving data access request, first read the mark that comes into force of the copy data in local data base, if coming into force of the copy data in local data base is masked as the first value of statistical indicant, then access local database, if coming into force of the copy data in local data base is masked as the second value of statistical indicant, then accesses remote data storehouse, thus the efficiency of called side visit data can be improved.
Refer to Fig. 2, the schematic flow sheet of the method for the another kind of data access that Fig. 2 provides for the embodiment of the present invention, as shown in Figure 2, the method for this data access comprises the following steps:
S201, reception data access request.
In the embodiment of the present invention, data access request can comprise copy data request of access and main notebook data request of access, and wherein, copy data is arranged in local data base, and main notebook data is arranged in remote data storehouse, and main notebook data is all effective data.
S202, judge that whether copy data to be visited is the data of real-time update.
In the embodiment of the present invention, if copy data to be visited is the data of real-time update, then perform step S203, if copy data to be visited is the data of non real-time renewal, then perform step S204.
In the embodiment of the present invention, copy data to be visited is divided into real-time update data and non real-time more new data according to whether there is real-time update in the daytime.For example, can there is real-time change in the authority of employee and task, employee's data can be used as the data of real-time update, and the branch of department of mechanism is generally changeless, and organization data just can be used as the data of non real-time renewal.
In the embodiment of the present invention, DAA pre-defines different service interface numberings, the type of this service interface numbering for identifying copy data to be visited, DAA just can obtain the real-time update information of copy data to be visited according to this interface index.Such as, when called side calls service interface numbering A0861E022, because A0861E022 interface is employee's data access interface, therefore this copy data to be called is the data of real-time update.
In the embodiment of the present invention, real-time update data are having the application that comes into force in real time in the daytime, but not real-time update data are in the daytime without the application that comes into force in real time.Suppose that local data base carries out synchronized update at night and remote data storehouse, if copy data to be visited is the non-data implementing to upgrade, so would not upgrade at this copy data to be visited in the daytime, when access local database in the daytime, the copy data in local data base is exactly effective data; If copy data to be visited is the data of real-time update, so can there is real-time update in this copy data to be visited in the daytime, because local data base only carries out synchronized update at night and remote data storehouse, if during real-time update data in access local database in the daytime, at night, the copy data of synchronized update is just invalid in the daytime, data now in order to ensure access are correct, just need access remote data storehouse.
S203, according to data access request access remote data storehouse.
In the embodiment of the present invention, when judging that copy data to be visited is the data of real-time update, showing that the copy data in now local data base lost efficacy, needing by the main notebook data in remote access interface access remote data storehouse.
The mark that comes into force of the copy data in S204, reading local data base.
In the embodiment of the present invention, when judging that copy data to be visited is not the data of real-time update, can access local database.
In the embodiment of the present invention, the mark that comes into force can comprise the first value of statistical indicant or the second value of statistical indicant, and wherein, the first value of statistical indicant is effective for the copy data identified in local data base, and the second value of statistical indicant is invalid for the copy data identified in local data base.For example, it is effective that the first value of statistical indicant can identify copy data with " TRUE " or " 0 " etc., and it is invalid that the second value of statistical indicant can identify copy data with " FALSE " or " 1 " etc.
S205, judge whether the mark that comes into force is the first value of statistical indicant.
In the embodiment of the present invention, come into force when being masked as the first value of statistical indicant if judge, then perform step S206, come into force if judge when being masked as the second value of statistical indicant, then return and perform step S203.
S206, according to data access request access local database.
In the embodiment of the present invention, after receiving data access request, first judge that whether copy data to be visited is the data of real-time update, if, then access remote data storehouse, if not, then the mark that comes into force of the copy data in local data base is read, when being masked as the first value of statistical indicant if come into force, then access local database, when being masked as the second value of statistical indicant if come into force, then accessing remote data storehouse, thus improve the efficiency of called side visit data.
Refer to Fig. 3, the method for the another kind of data access that Fig. 3 provides for the embodiment of the present invention, as shown in Figure 3, the method comprises the following steps:
S301, reception data access request.
S302, judge that whether copy data to be visited is the data of real-time update, if so, then perform step S303, if not, then perform step S304.
S303, according to data access request access remote data storehouse.
S304, initialization come into force mark.
In the embodiment of the present invention, the mark that comes into force can comprise the first value of statistical indicant or the second value of statistical indicant, and wherein, the first value of statistical indicant is effective for the copy data identified in local data base, and the second value of statistical indicant is invalid for the copy data identified in local data base.For example, it is effective that the first value of statistical indicant can identify copy data with " TRUE " or " 0 " etc., and it is invalid that the second value of statistical indicant can identify copy data with " FALSE " or " 1 " etc.
Particularly, the mark that comes into force of the copy data in initialization local data base, this initial value coming into force mark is the second value of statistical indicant.
S305, acquisition present system time.
In the embodiment of the present invention, present system time comprises current system date and current system time point.Such as: on September 28th, 2014,11: 10 morning.
S306, judge whether present system time arrives the initial time of the local data base synchronized update of current record.
In the embodiment of the present invention, the initial time of local data base synchronized update can for fixing time point, and such as 1:00 AM or 2:00 AM, the embodiment of the present invention does not limit.
In the embodiment of the present invention, every day is all being carried out synchronized update in local data base and remote data storehouse, thus, when different time visit data, the time of local data base synchronized update is different, needs to judge whether present system time arrives the initial time of the local data base synchronized update of current record.Such as, the initial time of local data base synchronized update is the 1:00 AM of every day, if present system time is 11: 10 No. 28 mornings, then the initial time of the local data base synchronized update of current record is No. 29 1:00 AMs, if present system time is points in No. 29 evenings 20, then the initial time of the local data base synchronized update of current record is No. 30 1:00 AMs.
In the embodiment of the present invention, if present system time arrives the initial time of the local data base synchronized update of current record, show that local data base and remote data storehouse synchronized update start, then perform step S305.
S307, monitoring local data base whether synchronized update completes.
In the embodiment of the present invention, if monitoring local data base synchronized update completes, then perform step S308, if monitoring local data base does not have synchronized update to complete, then perform step S309.
In the embodiment of the present invention, whether synchronized update completes to monitor local data base by the data simultaneous module in DAA.
S308, the mark that will come into force are set to the first value of statistical indicant.
S309, in described local data base synchronized update process, come into force described in maintenance and be masked as the second value of statistical indicant.
The mark that comes into force of the copy data in S310, reading local data base.
S311, judge whether the mark that comes into force is the first value of statistical indicant.
In the embodiment of the present invention, if judge the copy data in local data base come into force when being masked as the first value of statistical indicant, then perform step S312, if judge the copy data in local data base come into force when being masked as the second value of statistical indicant, then execution step S303.
S312, according to data access request access local database.
In the embodiment of the present invention, after reception data access request, the mark that comes into force of the copy data in local data base is initialized as the second value of statistical indicant.Obtain present system time, and judge whether present system time arrives the initial time of the local data base synchronized update of current record, if arrive, whether synchronized update completes then to monitor local data base, if synchronized update completes, the mark that then will come into force is set to the first value of statistical indicant, if synchronized update does not complete, then in local data base synchronized update process, keeping comes into force is masked as the second value of statistical indicant, then the mark that comes into force is read, judge whether the mark that comes into force is the first value of statistical indicant, access remote data storehouse or local data base is selected according to the mark that comes into force, thus improve the efficiency of data access.
Refer to Fig. 4, the structural drawing of a kind of DAA that Fig. 4 provides for the embodiment of the present invention, as shown in Figure 4, this device comprises:
Receiving element 401, for receiving data access request;
Reading unit 402, for reading the mark that comes into force of the copy data in local data base, this mark that comes into force comprises the first value of statistical indicant or the second value of statistical indicant, wherein, first value of statistical indicant is effective for the copy data identified in local data base, and the second value of statistical indicant is invalid for the copy data identified in local data base;
First judging unit 403, for judging whether the mark that comes into force of the copy data in local data base is the first value of statistical indicant;
First addressed location 404, for judge at the first judging unit 403 copy data come into force be masked as the first value of statistical indicant time, according to data access request access local database;
Second addressed location 405, for judge at the first judging unit 403 copy data come into force be masked as the second value of statistical indicant time, according to data access request access remote data storehouse.
In the DAA that Fig. 4 describes, receiving element 401 is after receiving data access request, the mark that comes into force of the copy data in local data base is first read by reading unit 402, whether the mark that comes into force of the copy data judged in local data base by the first judging unit 403 is again the first value of statistical indicant, if the first value of statistical indicant, then by the first addressed location 404 access local database, if the second value of statistical indicant, then access remote data storehouse by the second addressed location 405, thus the efficiency of called side visit data can be improved.
Refer to Fig. 5, the structural drawing of the another kind of DAA that Fig. 5 provides for the embodiment of the present invention, as shown in Figure 5, this device comprises:
Receiving element 501, for receiving data access request;
Second judging unit 502, for read copy data in local data base at reading unit 503 the mark that comes into force before, judge that whether copy data to be visited is the data of real-time update;
Reading unit 503, during for judging the data of copy data to be visited not as real-time update at the second judging unit 502, read the mark that comes into force of the copy data in local data base, this mark that comes into force comprises the first value of statistical indicant or the second value of statistical indicant, wherein, first value of statistical indicant is effective for the copy data identified in local data base, and the second value of statistical indicant is invalid for the copy data identified in local data base;
Second addressed location 504, for when the second judging unit 502 judges that copy data to be visited is the data of real-time update, according to data access request access remote data storehouse;
First judging unit 505, for judging whether the mark that comes into force of the copy data in local data base is the first value of statistical indicant;
First addressed location 506, for judge at the first judging unit 505 copy data come into force be masked as the first value of statistical indicant time, according to data access request access local database;
Described second addressed location 504, also for judge at the first judging unit 505 copy data come into force be masked as the second value of statistical indicant time, according to data access request access remote data storehouse.
In the DAA that Fig. 5 describes, receiving element 501 is after receiving data access request, first judge that whether copy data to be visited is the data of real-time update by the second judging unit, if, then access remote data storehouse by the second addressed location 504, if not, then read the mark that comes into force of the copy data in local data base by reading unit 503 after, whether the mark that comes into force of the copy data judged in local data base by the first judging unit 505 is again the first value of statistical indicant, if the first value of statistical indicant, then by the first addressed location, 506 access local database, if the second value of statistical indicant, then access remote data storehouse by the second addressed location 504, thus the efficiency of called side visit data can be improved.
Refer to Fig. 6, the structural drawing of the another kind of DAA that Fig. 6 provides for the embodiment of the present invention, as shown in Figure 6, this device comprises:
Receiving element 601, for receiving data access request;
Second judging unit 602, for judging that whether copy data to be visited is the data of real-time update;
Second addressed location 603, for when the second judging unit 602 judges that copy data to be visited is the data of real-time update, access remote data storehouse;
Initialization unit 604, during for judging the data of copy data to be visited not as real-time update at the second judging unit 602, the mark that comes into force of the copy data in initialization local data base; Wherein, this initial value coming into force mark is the second value of statistical indicant, this mark that comes into force comprises the first value of statistical indicant or the second value of statistical indicant, and the first value of statistical indicant is effective for the copy data identified in local data base, and the second value of statistical indicant is invalid for the copy data identified in local data base;
Acquiring unit 605, for obtaining present system time;
3rd judging unit 606, for judging whether present system time that acquiring unit 605 obtains arrives the initial time of the local data base synchronized update of current record;
Monitoring unit 607, during for judging that at the 3rd judging unit 606 present system time that acquiring unit 605 obtains arrives the initial time of the local data base synchronized update of current record, whether synchronized update completes monitoring local data base;
Indexing unit 608, for monitoring after local data base synchronized update completes at monitoring unit 607, the mark that will come into force is set to the first value of statistical indicant;
Described indexing unit 608, also in local data base synchronized update process, keeping comes into force is masked as the second value of statistical indicant;
Reading unit 608, for reading the mark that comes into force of the copy data in local data base;
First judging unit 610, for judging whether the mark that comes into force is the first value of statistical indicant;
First addressed location 611, when being masked as the first value of statistical indicant for judging to come into force at the first judging unit 610, according to data access request access local database;
Described second addressed location 603, when being also masked as the second value of statistical indicant for judging to come into force at the first judging unit 610, according to data access request access remote data storehouse.
In the DAA that Fig. 6 describes, after receiving element 601 receives data access request, first judge that whether copy data to be visited is the data of real-time update by the second judging unit 602, if, then access remote data storehouse by the second addressed location 603, if not, after then by initialization unit 604 mark that comes into force of copy data being set to the second value of statistical indicant, judge whether present system time that acquiring unit 605 obtains arrives the initial time of the local data base synchronized update of current record by the 3rd judging unit 605 again, if arrive, whether synchronized update completes then to monitor local data base by monitoring unit 607, if complete, then be set to the first value of statistical indicant by indexing unit 608 mark that will come into force, if not, then in local data base synchronized update process, keeping comes into force is masked as the second value of statistical indicant.After reading unit 609 reads the mark that comes into force, judge whether the mark that comes into force is the first value of statistical indicant by the first judging unit 610, if, then by the first addressed location 611 access local database, if not, then access remote data storehouse by the second addressed location 603, thus improve the efficiency of called side visit data.
It should be noted that, for each embodiment of the method aforesaid, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the application is not by the restriction of described sequence of movement, because according to the application, certain some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the application is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, storage medium comprises ROM (read-only memory) (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), programmable read only memory (ProgrammableRead-only Memory, PROM), Erasable Programmable Read Only Memory EPROM (Erasable ProgrammableRead Only Memory, EPROM), disposable programmable ROM (read-only memory) (One-time ProgrammableRead-Only Memory, OTPROM), the electronics formula of erasing can make carbon copies ROM (read-only memory) (Electrically-Erasable Programmable Read-Only Memory, EEPROM), read-only optical disc (Compact Disc Read-Only Memory, or other optical disc memorys CD-ROM), magnetic disk memory, tape memory, or can be used in any other medium computer-readable carrying or store data.
A kind of data access method provided the embodiment of the present invention above and device are described in detail, apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a method for data access, is characterized in that, comprising:
Receive data access request;
Read the mark that comes into force of the copy data in local data base, the described mark that comes into force comprises the first value of statistical indicant or the second value of statistical indicant, wherein, described first value of statistical indicant is effective for the copy data identified in local data base, and described second value of statistical indicant is invalid for the copy data identified in local data base;
Whether the mark that comes into force described in judgement is described first value of statistical indicant;
If so, then described local data base is accessed according to described data access request;
If not, then according to described data access request access remote data storehouse.
2. method according to claim 1, is characterized in that, before the mark that comes into force of the copy data in described reading local data base, described method also comprises:
Judge that whether copy data to be visited is the data of real-time update;
If so, then described remote data storehouse is accessed according to described data access request;
Otherwise, by the step of the mark that comes into force of the copy data performed in described reading local data base.
3. method according to claim 1 and 2, is characterized in that, before the mark that comes into force of the copy data in described reading local data base, described method also comprises:
The mark that comes into force of the copy data in local data base described in initialization; Wherein, the initial value indicated that comes into force described in is described second value of statistical indicant;
Whether synchronized update completes monitoring local data base, if so, then the described mark that comes into force is set to described first value of statistical indicant, if not, then, in described local data base synchronized update process, comes into force and be masked as the second value of statistical indicant described in maintenance.
4. method according to claim 3, is characterized in that, described monitoring local data base is before synchronized update completes, and described method also comprises:
Obtain present system time;
Judge whether described present system time arrives the initial time of the local data base synchronized update of current record;
If so, the described monitoring local data base step whether synchronized update completes then is performed.
5. the method according to any one of Claims 1 to 4, is characterized in that, the described local data base of described access, comprising:
Obtain local data base mark ID;
Described local data base is accessed according to described local data base mark ID.
6. a device for data access, is characterized in that, comprising:
Receiving element, for receiving data access request;
Reading unit, for reading the mark that comes into force of the copy data in local data base, the described mark that comes into force comprises the first value of statistical indicant or the second value of statistical indicant, wherein, described first value of statistical indicant is effective for the copy data identified in local data base, and described second value of statistical indicant is invalid for the copy data identified in local data base;
Whether the first judging unit is described first value of statistical indicant for the mark that comes into force described in judging;
First addressed location, for described first judging unit judge described in come into force be masked as described first value of statistical indicant time, access described local data base according to described data access request;
Second addressed location, when being masked as described second value of statistical indicant for coming into force described in judging at described first judging unit, according to described data access request access remote data storehouse.
7. device according to claim 6, its spy is, described device also comprises:
Second judging unit, for read the copy data in local data base at described reading unit the mark that comes into force before, judge that whether copy data to be visited is the data of real-time update;
Described second addressed location, also for when described second judging unit judges that copy data to be visited is the data of real-time update, according to described data access request access remote data storehouse;
Described reading unit, time also for judging the data of copy data to be visited not as real-time update at described second judging unit, reads the mark that comes into force of the copy data in local data base.
8. the device according to claim 6 or 7, its spy is, described device also comprises:
Initialization unit, for the mark that comes into force of the copy data in local data base described in initialization; Wherein, the initial value indicated that comes into force described in is described second value of statistical indicant;
Monitoring unit, for monitoring local data base, whether synchronized update completes;
Indexing unit, for after described monitoring unit monitoring local data base synchronized update completes, is set to described first value of statistical indicant by the described mark that comes into force;
Described indexing unit, also in described local data base synchronized update process, comes into force described in maintenance and is masked as the second value of statistical indicant.
9. device according to claim 8, is characterized in that, described device also comprises:
Acquiring unit, for obtaining present system time;
3rd judging unit, for judging whether described present system time that described acquiring unit obtains arrives the initial time of the local data base synchronized update of current record;
Described monitoring unit, when the present system time specifically for obtaining at acquiring unit described in described 3rd unit judges arrives the initial time of the local data base synchronized update of current record, whether synchronized update completes monitoring local data base.
10. the device according to any one of claim 6 ~ 9, is characterized in that,
Described acquiring unit, also for obtaining local data base mark ID;
Described first addressed location, accesses described local data base specifically for the described local data base mark ID obtained according to described acquiring unit.
CN201410594200.4A 2014-10-29 2014-10-29 A kind of method and device of data access Active CN104408058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410594200.4A CN104408058B (en) 2014-10-29 2014-10-29 A kind of method and device of data access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410594200.4A CN104408058B (en) 2014-10-29 2014-10-29 A kind of method and device of data access

Publications (2)

Publication Number Publication Date
CN104408058A true CN104408058A (en) 2015-03-11
CN104408058B CN104408058B (en) 2019-11-05

Family

ID=52645690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410594200.4A Active CN104408058B (en) 2014-10-29 2014-10-29 A kind of method and device of data access

Country Status (1)

Country Link
CN (1) CN104408058B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341163A (en) * 2016-05-03 2017-11-10 阿里巴巴集团控股有限公司 Method of data synchronization and device
CN108959940A (en) * 2018-06-19 2018-12-07 杭州朗和科技有限公司 Data access control method, medium, device and calculating equipment
CN109491830A (en) * 2017-09-12 2019-03-19 北京京东尚科信息技术有限公司 The method and system in switch data source

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120158699A1 (en) * 2010-12-17 2012-06-21 Creel Christopher T Repackageable virtualized transparent access to heterogeneous data sources
CN102779132A (en) * 2011-05-12 2012-11-14 阿里巴巴集团控股有限公司 Data updating method, system and database server
CN103106200A (en) * 2011-11-09 2013-05-15 上海盛霄云计算技术有限公司 Synchronization system of non-relational type database and double-writing synchronization method
CN103647829A (en) * 2013-12-11 2014-03-19 北京荣之联科技股份有限公司 Cloud disc file synchronization device and method
CN103714163A (en) * 2013-12-30 2014-04-09 中国科学院信息工程研究所 Pattern management method and system of NoSQL database

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120158699A1 (en) * 2010-12-17 2012-06-21 Creel Christopher T Repackageable virtualized transparent access to heterogeneous data sources
CN102779132A (en) * 2011-05-12 2012-11-14 阿里巴巴集团控股有限公司 Data updating method, system and database server
CN103106200A (en) * 2011-11-09 2013-05-15 上海盛霄云计算技术有限公司 Synchronization system of non-relational type database and double-writing synchronization method
CN103647829A (en) * 2013-12-11 2014-03-19 北京荣之联科技股份有限公司 Cloud disc file synchronization device and method
CN103714163A (en) * 2013-12-30 2014-04-09 中国科学院信息工程研究所 Pattern management method and system of NoSQL database

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341163A (en) * 2016-05-03 2017-11-10 阿里巴巴集团控股有限公司 Method of data synchronization and device
CN107341163B (en) * 2016-05-03 2020-08-14 阿里巴巴集团控股有限公司 Data synchronization method and device
CN109491830A (en) * 2017-09-12 2019-03-19 北京京东尚科信息技术有限公司 The method and system in switch data source
CN108959940A (en) * 2018-06-19 2018-12-07 杭州朗和科技有限公司 Data access control method, medium, device and calculating equipment
CN108959940B (en) * 2018-06-19 2024-01-19 杭州网易数之帆科技有限公司 Data access control method, medium, device and computing equipment

Also Published As

Publication number Publication date
CN104408058B (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN108228814B (en) Data synchronization method and device
CN109766362B (en) Data processing method and device
CN102123170A (en) Method and device for upgrading firmware version
CN107451172B (en) Data synchronization method and equipment for version management system
CN101819543A (en) Snapshot data processing method, system and storage device
CN111857777B (en) System updating method and device based on double-core intelligent ammeter and computer equipment
CN102043686A (en) Disaster tolerance method, backup server and system of memory database
US20130181816A1 (en) Mechanism and method for rfid cable path labeling, identification, and inventory
CN110956231A (en) Method, memory and system for automatically binding asset management electronic tag
CN104408058A (en) Data access method and device
CN103092645A (en) Geographic spatial information application system and implement method thereof based on microkernel technology
CN103164514A (en) Detection device and detection method for data reference relationship
CN109783258A (en) A kind of message treatment method, device and server
CN104903853A (en) Dynamic firmware updating
CN103593209A (en) Progress display method and device
CN111061802B (en) Power data management processing method, device and storage medium
CN105760251B (en) A kind of method and apparatus of Backup Data
JP4504969B2 (en) Data update processing device, data update processing method, and data update processing program
CN113569257B (en) User authority management method and device in gray level release
CN109343863B (en) Interface configuration method and system for HDFS (Hadoop distributed File System) permission
CN103257909A (en) Baseboard management controller (BMC)-based automated testing method and system for light emitting diode (LED)
CN105677430A (en) Mobile phone software updating method and system
CN111026613B (en) Log processing method and device
US11316710B2 (en) Control system and control method
CN102800208B (en) Updating method and device for real-time traffic information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant