CN110196832A - For obtaining the method and device of SNAPSHOT INFO - Google Patents
For obtaining the method and device of SNAPSHOT INFO Download PDFInfo
- Publication number
- CN110196832A CN110196832A CN201910482789.1A CN201910482789A CN110196832A CN 110196832 A CN110196832 A CN 110196832A CN 201910482789 A CN201910482789 A CN 201910482789A CN 110196832 A CN110196832 A CN 110196832A
- Authority
- CN
- China
- Prior art keywords
- operation log
- host node
- information
- processed
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/128—Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/178—Techniques for file synchronisation in file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1824—Distributed file systems implemented using Network-attached Storage [NAS] architecture
Abstract
Embodiment of the disclosure discloses the method and device for obtaining SNAPSHOT INFO.One specific embodiment of this method includes: the operation log for obtaining host node in distributed network, wherein operation log is used to record the data handling procedure of above-mentioned host node;Aforesaid operations log is imported into state machine, obtain the information to be processed of corresponding aforesaid operations log, wherein, above-mentioned state machine is used to generate the information to be processed of corresponding aforesaid operations log, information to be processed be used to characterize above-mentioned host node in memory, the data of corresponding aforesaid operations log;Pass through the SNAPSHOT INFO of above-mentioned acquisition of information host node to be processed.The embodiment eliminates the time that host node obtains SNAPSHOT INFO, reduces the data processing amount of host node, ensure that the data-handling efficiency of host node.
Description
Technical field
Embodiment of the disclosure is related to field of computer technology, and in particular to for obtaining the method and dress of SNAPSHOT INFO
It sets.
Background technique
High availability is one of the important indicator an of Distributed Services.Most stateful Distributed Services are all
Solution by way of building multinode redundancy services as the high availability of service, and distributed consensus duplication association
View is the general scheme for reaching state consistency between realizing multinode.Most distribution service all starts based on Raft association
View is designed or is transformed.Each operation of the coherence request of Raft agreement is had to first before being identified in persistence
Operation log is recorded on medium, can only be replied by persistence and by the operation after nodes more than half confirmation to client
End is responded.Record operation log, be one update class request-reply before have to complete operation.
Summary of the invention
Embodiment of the disclosure proposes the method and device for obtaining SNAPSHOT INFO.
In a first aspect, embodiment of the disclosure provides a kind of method for obtaining SNAPSHOT INFO, this method comprises: obtaining
Take the operation log of host node in distributed network, wherein operation log is used to record the data handling procedure of above-mentioned host node;
Aforesaid operations log is imported into state machine, obtains the information to be processed of corresponding aforesaid operations log, wherein above-mentioned state machine is used for
Generate the information to be processed of corresponding aforesaid operations log, information to be processed be used to characterize above-mentioned host node in memory, it is corresponding
The data of aforesaid operations log;Pass through the SNAPSHOT INFO of above-mentioned acquisition of information host node to be processed.
In some embodiments, above-mentioned distributed network includes at least one standby node, and, above-mentioned acquisition is distributed
The operation log of host node in network, comprising: obtain aforesaid operations log from above-mentioned host node, or at least one is spare from above-mentioned
Standby node in node obtains aforesaid operations log.
In some embodiments, in above-mentioned acquisition distributed network host node operation log, comprising: Xiang Shangshu host node
Send operation log inquiry request;The feedback information for the correspondence aforesaid operations log query request that above-mentioned host node is sent is received,
And from above-mentioned feedback information indicate standby node obtain operation log, above-mentioned feedback information be used to indicate from it is above-mentioned at least one
Specified standby node in standby node obtains operation log.
In some embodiments, above by the SNAPSHOT INFO of above-mentioned acquisition of information host node to be processed, comprising: will be above-mentioned
Information preservation to be processed is to local;Target information is chosen from above-mentioned information to be processed according to setting condition to obtain host node
SNAPSHOT INFO, wherein above-mentioned setting condition includes at least one of the following: set time period, the data volume that operation log includes,
Data processed result.
In some embodiments, the above method further include: above-mentioned SNAPSHOT INFO is synchronized to above-mentioned host node and at least one
A standby node.
Second aspect, embodiment of the disclosure provide it is a kind of for obtaining the device of SNAPSHOT INFO, the device include: behaviour
Make log acquisition unit, be configured to obtain the operation log of host node in distributed network, wherein operation log is for recording
The data handling procedure of above-mentioned host node;Information acquisition unit to be processed is configured to aforesaid operations log importing state machine,
Obtain the information to be processed of corresponding aforesaid operations log, wherein above-mentioned state machine be used to generate corresponding aforesaid operations log to
Handle information, information to be processed be used to characterize above-mentioned host node in memory, the data of corresponding aforesaid operations log;Snapshot letter
Acquiring unit is ceased, the SNAPSHOT INFO by above-mentioned acquisition of information host node to be processed is configured to.
In some embodiments, above-mentioned distributed network includes at least one standby node, and, aforesaid operations log obtains
Taking unit includes: that the first operation log obtains word cell, is configured to obtain aforesaid operations log from above-mentioned host node, or from upper
The standby node stated at least one standby node obtains aforesaid operations log.
In some embodiments, aforesaid operations log acquisition unit includes: request transmission sub-unit, is configured to above-mentioned
Host node sends operation log inquiry request;Second operation log obtains subelement, is configured to receive above-mentioned host node and sends
Correspondence aforesaid operations log query request feedback information, and from above-mentioned feedback information indicate standby node obtain operation day
Will, above-mentioned feedback information are used to indicate the specified standby node from least one above-mentioned standby node and obtain operation log.
In some embodiments, above-mentioned SNAPSHOT INFO acquiring unit includes: information storing sub-units, and being configured to will be above-mentioned
Information preservation to be processed is to local;SNAPSHOT INFO obtains subelement, is configured to according to imposing a condition from above-mentioned information to be processed
It is middle to choose target information to obtain the SNAPSHOT INFO of host node, wherein when above-mentioned setting condition includes at least one of the following: setting
Between the period, the data volume that operation log includes, data processed result.
In some embodiments, above-mentioned apparatus further include: information synchronizing unit is configured to above-mentioned SNAPSHOT INFO is synchronous
To above-mentioned host node and at least one standby node.
The third aspect, embodiment of the disclosure provide a kind of electronic equipment, comprising: one or more processors;Storage
Device is stored thereon with one or more programs, when said one or multiple programs are executed by said one or multiple processors,
So that said one or multiple processors execute the method for obtaining SNAPSHOT INFO of above-mentioned first aspect.
Fourth aspect, embodiment of the disclosure provide a kind of computer-readable medium, are stored thereon with computer program,
It is characterized in that, the program realizes the method for obtaining SNAPSHOT INFO of above-mentioned first aspect when being executed by processor.
The method and device for being used to obtain SNAPSHOT INFO that embodiment of the disclosure provides, first in acquisition distributed network
The operation log of host node;Then, aforesaid operations log is imported into state machine, obtains the information to be processed of respective operations log;
Finally, obtaining the SNAPSHOT INFO of information to be processed.Technical scheme realizes the data to operation log by state machine
Reduction, and SNAPSHOT INFO is obtained by information to be processed, the time that host node obtains SNAPSHOT INFO is eliminated, host node is reduced
Data processing amount, ensure that the data-handling efficiency of host node.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the disclosure is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the disclosure can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for obtaining SNAPSHOT INFO of the disclosure;
Fig. 3 is the schematic diagram according to an application scenarios of the method for obtaining SNAPSHOT INFO of the disclosure;
Fig. 4 is the flow chart according to another embodiment of the method for obtaining SNAPSHOT INFO of the disclosure;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for obtaining SNAPSHOT INFO of the disclosure;
Fig. 6 is adapted for the electronic devices structure schematic diagram for realizing embodiment of the disclosure.
Specific embodiment
The disclosure 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 related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase
Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using embodiment of the disclosure for obtaining the method for SNAPSHOT INFO or for obtaining snapshot
The exemplary system architecture 100 of the device of information.
As shown in Figure 1, system architecture 100 may include host node 101, standby node 102, network 103 and study node
104.Host node 101, standby node 102 and study node 104 setting with distributed network in.Network 103 is in host node
101, the medium of communication link is provided between standby node 102 and study node 104.Network 103 may include various connection classes
Type, such as wired, wireless communication link or fiber optic cables etc..
Study node 104 is interacted by network 103 with host node 101 and standby node 102, to receive or send message
Deng.Various data handling utilities identical with host node 101 and standby node 102 can be installed on study node 104, such as
Web browser applications, shopping class application, searching class application, instant messaging tools, mailbox client, social platform software etc..
Study node 104 can be hardware, be also possible to software.When learning node 104 is hardware, can be with aobvious
Display screen and the various electronic equipments for supporting the SNAPSHOT INFO by state machine acquisition respective operations log, including but not limited to intelligence
Energy mobile phone, tablet computer, pocket computer on knee and desktop computer etc..When learning node 104 is software, Ke Yian
In above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as providing distribution in it
Service), single software or software module also may be implemented into, be not specifically limited herein.
Host node 101 can be the node that a certain moment handles data in distributed network, such as to user's end
It holds the request of data sent to carry out data processing, and operation log is generated according to data processing.
Standby node 102 can be the node synchronized in distributed network to the data of host node 101.
It should be noted that the method provided by embodiment of the disclosure for obtaining SNAPSHOT INFO is generally saved by study
Point 104 executes, and correspondingly, the device for obtaining SNAPSHOT INFO is generally positioned in study node 104.
It should be noted that host node 101, standby node 102 can be hardware, it is also possible to software.Work as host node
101, when standby node 102 is hardware, the distributed apparatus cluster of multiple server compositions may be implemented into, also may be implemented into
Individual equipment.When above-mentioned host node 101, standby node 102 are software, multiple softwares or software module (example may be implemented into
Such as it is used to provide Distributed Services), single software or software module also may be implemented into, be not specifically limited herein.
It should be understood that the number of host node, standby node, network and study node in Fig. 1 is only schematical.Root
It factually now needs, can have any number of host node, standby node, network and study node.
With continued reference to Fig. 2, the stream of one embodiment of the method for obtaining SNAPSHOT INFO according to the disclosure is shown
Journey 200.This be used for obtain SNAPSHOT INFO method the following steps are included:
Step 201, the operation log of host node in distributed network is obtained.
In the present embodiment, for obtaining executing subject (such as the study node shown in FIG. 1 of the method for SNAPSHOT INFO
104) can by wired connection mode or radio connection from distributed network host node obtain operation log.Its
In, when host node carries out data processing in distributed network, the implementation procedure of data processing can be recorded, and then generate
Operation log.Operation log may include the instruction of host node execution, the information such as implementing result of instruction.It should be pointed out that
Above-mentioned radio connection can include but is not limited to 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee
Connection, UWB (Ultra Wideband) connection and other currently known or exploitation in the future radio connections.
In practice, host node 101 cannot allow operation log to increase without limitation, needs when otherwise distributed network is restarted
Playback is taken a long time, service impacting availability is carried out.The Raft agreement run on distributed network is used to entire
Distributed network carries out the mode of snapshot to solve the problems, such as log compression.When carrying out snapshot, it is necessary to which guarantee is carrying out fast
According to the internal storage state of host node be that there can be no variations, otherwise not can guarantee the correctness of SNAPSHOT INFO.One is not propped up
For the distributed network for holding MVCC (Multi-Version Concurrency Control, Multi version concurrency control), keep
Internal storage state does not change can not respond while meaning to do snapshot to class request is updated, this is high to availability requirement
Service on be can not be received.
For this purpose, the executing subject of the application can obtain the operation log of host node 101 first.For example, executing subject can
To obtain the operation log of host node 101 in real time, the operation log that setting time obtains host node can also be spaced.Wherein, it grasps
Make log for recording the data handling procedure of above-mentioned host node 101.
In some optional implementations of the present embodiment, above-mentioned distributed network includes at least one standby node,
And in above-mentioned acquisition distributed network host node operation log, comprising: from above-mentioned host node obtain aforesaid operations log,
Or aforesaid operations log is obtained from the standby node at least one above-mentioned standby node.
At a time, distributed network has a host node 101, other nodes in distributed network are standby node
102.Executing subject directly can obtain operation log from host node 101.After host node 101 generates operation log, it can will grasp
Other standby nodes 102 are sent to as log.In order to reduce the data processing amount of host node 101, executing subject can also be from standby
Operation log is obtained with node 102.
In some optional implementations of the present embodiment, the operation day of host node in above-mentioned acquisition distributed network
Will may comprise steps of:
The first step, Xiang Shangshu host node send operation log inquiry request.
Other than the method for above-mentioned acquisition operation log, executing subject can also send operation log to above-mentioned host node and look into
Ask request.Wherein, operation log inquiry request be used to indicate host node 101 specify standby node 102 as operation log come
Source.
Second step, receives the feedback information for the correspondence aforesaid operations log query request that above-mentioned host node sends, and from upper
The standby node for stating feedback information instruction obtains operation log.
Later, executing subject can receive the feedback information that host node 101 is sent.Wherein, above-mentioned feedback information can be used
Operation log is obtained in specified standby node of the instruction from least one above-mentioned standby node.Feedback information can also include standby
With information such as address of the node in distributed network and titles.
Step 202, aforesaid operations log is imported into state machine, obtains the information to be processed of corresponding aforesaid operations log.
After obtaining operation log, operation log can be imported state machine by executing subject, obtain corresponding aforesaid operations log
Information to be processed.Wherein, above-mentioned state machine is used to generate the information to be processed of corresponding aforesaid operations log.In order to accurately obtain
Information to be processed, state machine can be the types of applications with respective operations log on host node 101.For example, host node 101
When operation is using A and application B, host node 101 has carried out corresponding data processing in memory, and generates respective operations day
Will.Also application A identical with host node 101 can be set in executing subject and applied B, then according to operation log to application
A and application B carry out corresponding operation, obtain information to be processed.Then information to be processed, which may be used for characterizing above-mentioned host node, exists
The data of in memory, corresponding aforesaid operations log.That is, the behaviour of the information realization to be processed of the application according to host node 101
Make log, the reduction to the internal storage data of host node 101.
Step 203, pass through the SNAPSHOT INFO of above-mentioned acquisition of information host node to be processed.
After obtaining information to be processed, executing subject can obtain the SNAPSHOT INFO of host node from information to be processed.Wherein,
The information type of SNAPSHOT INFO may is that image, compressed file etc..
In some optional implementations of the present embodiment, above by the fast of above-mentioned acquisition of information host node to be processed
According to information, may comprise steps of:
The first step, by above-mentioned information preservation to be processed to local.
In order to avoid host node 101 can not static the deficiencies of obtaining SNAPSHOT INFO, executing subject can first will be to be processed
Information preservation is to local.At this point, local information to be processed is not to be in dynamic as the data in the memory of host node 101
In variation, but in static state.Also, the data in the memory of host node 101 be more than certain amount after can be dropped, therefore
It is likely to occur the incomplete situation of data, and the information to be processed of the application contains the total data of respective operations information, because
This data is more complete.
Second step is chosen target information from above-mentioned information to be processed according to setting condition and is believed to obtain the snapshot of host node
Breath.
Executing subject can choose target information by a variety of setting conditions to obtain main section from above-mentioned information to be processed
The SNAPSHOT INFO of point.Wherein, above-mentioned setting condition may include at least one of following: set time period, operation log include
Data volume, data processed result.
In this way, therefore the work that executing subject substitution host node 101 executes acquisition SNAPSHOT INFO is conducive to improve main section
The working efficiency of point 101.
It is one of the application scenarios of the method according to the present embodiment for obtaining SNAPSHOT INFO with continued reference to Fig. 3, Fig. 3
Schematic diagram.In the application scenarios of Fig. 3, study node 104 obtains the operation log of host node 101 first, as arrow is 1. in Fig. 3
It is shown;Then, study node 104 obtains the information to be processed of respective operations log by state machine, and obtains from information to be processed
Take the SNAPSHOT INFO of host node;Finally, study node 104 by SNAPSHOT INFO be synchronized to host node 101 in distributed network and
Each standby node 102, as in Fig. 3 arrow 2. shown in.
The method provided by the above embodiment of the disclosure obtains the operation log of host node in distributed network first;So
Afterwards, aforesaid operations log is imported into state machine, obtains the information to be processed of respective operations log;Finally, obtaining information to be processed
SNAPSHOT INFO.Technical scheme realizes the data convert to operation log by state machine, and passes through letter to be processed
Breath obtains SNAPSHOT INFO, eliminates the time that host node obtains SNAPSHOT INFO, reduces the data processing amount of host node, ensure that
The data-handling efficiency of host node.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for obtaining SNAPSHOT INFO.
This is used to obtain the process 400 of the method for SNAPSHOT INFO, comprising the following steps:
Step 401, the operation log of host node in distributed network is obtained.
The content of step 401 and the content of step 201 are identical, no longer repeat one by one herein.
Step 402, aforesaid operations log is imported into state machine, obtains the information to be processed of corresponding aforesaid operations log.
The content of step 402 and the content of step 202 are identical, no longer repeat one by one herein.
Step 403, pass through the SNAPSHOT INFO of above-mentioned acquisition of information host node to be processed.
The content of step 403 and the content of step 203 are identical, no longer repeat one by one herein.
Step 404, above-mentioned SNAPSHOT INFO is synchronized to above-mentioned host node and at least one standby node.
After getting SNAPSHOT INFO, SNAPSHOT INFO can be synchronized to above-mentioned host node by executing subject and at least one is spare
Node, to realize each node SNAPSHOT INFO having the same in distributed network.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, it is fast for obtaining that present disclose provides one kind
According to one embodiment of the device of information, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically may be used
To be applied in various electronic equipments.
As shown in figure 5, the device 500 for obtaining SNAPSHOT INFO of the present embodiment may include: that operation log obtains list
Member 501, information acquisition unit to be processed 502 and SNAPSHOT INFO acquiring unit 503.Wherein, operation log acquiring unit 501 is matched
It is set to the operation log for obtaining host node in distributed network, wherein operation log is used to record at the data of above-mentioned host node
Reason process;Information acquisition unit 502 to be processed is configured to aforesaid operations log importing state machine, obtains corresponding aforesaid operations
The information to be processed of log, wherein above-mentioned state machine is used to generate the information to be processed of corresponding aforesaid operations log, letter to be processed
Cease for characterize above-mentioned host node in memory, the data of corresponding aforesaid operations log;SNAPSHOT INFO acquiring unit 503 is matched
It is set to the SNAPSHOT INFO by above-mentioned acquisition of information host node to be processed.
In some optional implementations of the present embodiment, above-mentioned distributed network includes at least one standby node,
And aforesaid operations log acquisition unit 501 may include: that the first operation log obtains word cell (not shown), be matched
It is set to from above-mentioned host node and obtains aforesaid operations log, or is above-mentioned from the standby node acquisition at least one above-mentioned standby node
Operation log.
In some optional implementations of the present embodiment, aforesaid operations log acquisition unit 501 may include: request
Transmission sub-unit (not shown) and the second operation log obtain subelement (not shown).Wherein, it is single to send son for request
Member is configured to send operation log inquiry request to above-mentioned host node;Second operation log obtains subelement and is configured to receive
The feedback information of correspondence aforesaid operations log query that above-mentioned host node is sent request, and indicate from above-mentioned feedback information spare
Node obtains operation log, and the specified standby node that above-mentioned feedback information is used to indicate from least one above-mentioned standby node obtains
Extract operation log.
In some optional implementations of the present embodiment, above-mentioned SNAPSHOT INFO acquiring unit 503 may include: information
Storing sub-units (not shown) and SNAPSHOT INFO obtain subelement (not shown).Wherein, information storing sub-units quilt
It is configured to above-mentioned information preservation to be processed to local;SNAPSHOT INFO obtains subelement and is configured to according to imposing a condition from above-mentioned
Target information is chosen in information to be processed to obtain the SNAPSHOT INFO of host node, wherein above-mentioned setting condition include it is following at least
One: set time period, the data volume that operation log includes, data processed result.
In some optional implementations of the present embodiment, the device 500 for obtaining SNAPSHOT INFO can also include:
Information synchronizing unit (not shown), is configured to for above-mentioned SNAPSHOT INFO being synchronized to above-mentioned host node and at least one is spare
Node.
The present embodiment additionally provides a kind of electronic equipment, comprising: one or more processors;Memory is stored thereon with
One or more programs, when said one or multiple programs are executed by said one or multiple processors, so that said one
Or multiple processors execute the above-mentioned method for obtaining SNAPSHOT INFO.
The present embodiment additionally provides a kind of computer-readable medium, is stored thereon with computer program, and the program is processed
Device realizes the above-mentioned method for obtaining SNAPSHOT INFO when executing
Below with reference to Fig. 6, it illustrates the electronic equipments for being suitable for being used to realize embodiment of the disclosure (for example, in Fig. 1
Learn node 104) computer system 600 structural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, is not answered
Any restrictions are brought to the function and use scope of embodiment of the disclosure.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.)
601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608
Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment
Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM603 are connected with each other by bus 604.
Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 607 of dynamic device etc.;Storage device 608 including such as tape, hard disk etc.;And communication device 609.Communication device
609, which can permit electronic equipment 600, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 6 shows tool
There is the electronic equipment 600 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with
Alternatively implement or have more or fewer devices.Each box shown in Fig. 6 can represent a device, can also root
According to needing to represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 609, or from storage device 608
It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the implementation of the disclosure is executed
The above-mentioned function of being limited in the method for example.
It is situated between it should be noted that the above-mentioned computer-readable medium of embodiment of the disclosure can be computer-readable signal
Matter or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with
System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than
Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires
Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable
Read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic are deposited
Memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer readable storage medium, which can be, appoints
What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its
It is used in combination.And in embodiment of the disclosure, computer-readable signal media may include in a base band or as carrier wave
The data-signal that a part is propagated, wherein carrying computer-readable program code.The data-signal of this propagation can be adopted
With diversified forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal is situated between
Matter can also be any computer-readable medium other than computer readable storage medium, which can be with
It sends, propagate or transmits for by the use of instruction execution system, device or device or program in connection.Meter
The program code for including on calculation machine readable medium can transmit with any suitable medium, including but not limited to: electric wire, optical cable,
RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more
When a program is executed by the electronic equipment, so that the electronic equipment: the operation log of host node in distributed network is obtained,
In, operation log is used to record the data handling procedure of above-mentioned host node;Aforesaid operations log is imported into state machine, is corresponded to
The information to be processed of aforesaid operations log, wherein above-mentioned state machine is used to generate the information to be processed of corresponding aforesaid operations log,
Information to be processed be used to characterize above-mentioned host node in memory, the data of corresponding aforesaid operations log;By above-mentioned to be processed
The SNAPSHOT INFO of acquisition of information host node.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof
The computer program code of work, above procedure design language include object oriented program language-such as Java,
Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language
Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence
Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or
It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet
It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit
It is connected with ISP by internet).
Flow chart and block diagram in attached drawing illustrate system, method and the computer of the various embodiments according to the disclosure
The architecture, function and operation in the cards of program product.In this regard, each box in flowchart or block diagram can be with
A part of a module, program segment or code is represented, a part of the module, program segment or code includes one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong
The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit involved in embodiment of the disclosure can be realized by way of software, can also be passed through
The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor
Including operation log acquiring unit, information acquisition unit to be processed and SNAPSHOT INFO acquiring unit.Wherein, the title of these units
The restriction to the unit itself is not constituted under certain conditions, for example, SNAPSHOT INFO acquiring unit is also described as " using
In the unit for generating SNAPSHOT INFO ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (12)
1. a kind of method for obtaining SNAPSHOT INFO, comprising:
Obtain the operation log of host node in distributed network, wherein operation log is used to record at the data of the host node
Reason process;
The operation log is imported into state machine, obtains the information to be processed for corresponding to the operation log, wherein the state machine
For generating the information to be processed of the corresponding operation log, information to be processed be used to characterize the host node in memory,
The data of the corresponding operation log;
Pass through the SNAPSHOT INFO of the acquisition of information host node to be processed.
2. according to the method described in claim 1, wherein, the distributed network includes at least one standby node, and
The operation log of host node in the acquisition distributed network, comprising:
The operation log is obtained from the host node, or from described in the standby node acquisition at least one described standby node
Operation log.
3. according to the method described in claim 2, wherein, the operation log for obtaining host node in distributed network, comprising:
Operation log inquiry request is sent to the host node;
The feedback information for the correspondence operation log inquiry request that the host node is sent is received, and is referred to from the feedback information
The standby node that shows obtains operation log, the feedback information be used to indicate from least one described standby node specify it is standby
Operation log is obtained with node.
4. according to the method described in claim 2, wherein, the snapshot by the acquisition of information host node to be processed is believed
Breath, comprising:
By the information preservation to be processed to local;
Target information is chosen from the information to be processed according to setting condition to obtain the SNAPSHOT INFO of host node, wherein institute
It states setting condition and includes at least one of the following: set time period, the data volume that operation log includes, data processed result.
5. according to the method described in claim 4, wherein, the method also includes:
The SNAPSHOT INFO is synchronized to the host node and at least one standby node.
6. a kind of for obtaining the device of SNAPSHOT INFO, comprising:
Operation log acquiring unit is configured to obtain the operation log of host node in distributed network, wherein operation log is used
In the data handling procedure for recording the host node;
Information acquisition unit to be processed is configured to the operation log importing state machine, obtains corresponding to the operation log
Information to be processed, wherein the state machine is used to generate the information to be processed of the corresponding operation log, and information to be processed is used
In characterize the host node in memory, the data of the corresponding operation log;
SNAPSHOT INFO acquiring unit is configured to the SNAPSHOT INFO by the acquisition of information host node to be processed.
7. device according to claim 6, wherein the distributed network includes at least one standby node, and
The operation log acquiring unit includes:
First operation log obtains word cell, is configured to obtain the operation log from the host node, or from it is described at least
Standby node in one standby node obtains the operation log.
8. device according to claim 7, wherein the operation log acquiring unit includes:
Transmission sub-unit is requested, is configured to send operation log inquiry request to the host node;
Second operation log obtains subelement, is configured to receive the correspondence operation log inquiry that the host node is sent and asks
The feedback information asked, and the standby node indicated from the feedback information obtains operation log, the feedback information is used to indicate
Operation log is obtained from the specified standby node at least one described standby node.
9. device according to claim 7, wherein the SNAPSHOT INFO acquiring unit includes:
Information storing sub-units are configured to the information preservation to be processed to local;
SNAPSHOT INFO obtains subelement, is configured to choose target information from the information to be processed according to setting condition to obtain
Take the SNAPSHOT INFO of host node, wherein the setting condition includes at least one of the following: set time period, operation log packet
The data volume contained, data processed result.
10. device according to claim 9, wherein described device further include:
Information synchronizing unit is configured to the SNAPSHOT INFO being synchronized to the host node and at least one standby node.
11. a kind of electronic equipment, comprising:
One or more processors;
Memory is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors
Perform claim requires any method in 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the program is executed by processor
Method of the Shi Shixian as described in any in claim 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910482789.1A CN110196832A (en) | 2019-06-04 | 2019-06-04 | For obtaining the method and device of SNAPSHOT INFO |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910482789.1A CN110196832A (en) | 2019-06-04 | 2019-06-04 | For obtaining the method and device of SNAPSHOT INFO |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110196832A true CN110196832A (en) | 2019-09-03 |
Family
ID=67754004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910482789.1A Pending CN110196832A (en) | 2019-06-04 | 2019-06-04 | For obtaining the method and device of SNAPSHOT INFO |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110196832A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113946287A (en) * | 2021-09-08 | 2022-01-18 | 广州虎牙科技有限公司 | Distributed storage system and data processing method and related device thereof |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102236851A (en) * | 2010-04-21 | 2011-11-09 | 百度在线网络技术(北京)有限公司 | Real-time computation method and system of multi-dimensional credit system based on user empowerment |
US20160246803A1 (en) * | 2014-03-03 | 2016-08-25 | Netapp, Inc. | Distributed file system snapshot |
CN105912628A (en) * | 2016-04-07 | 2016-08-31 | 北京奇虎科技有限公司 | Synchronization method and device for master database and slave database |
CN106227727A (en) * | 2016-06-30 | 2016-12-14 | 乐视控股(北京)有限公司 | Daily record update method, device and the system of a kind of distributed system |
CN106254100A (en) * | 2016-07-27 | 2016-12-21 | 腾讯科技(深圳)有限公司 | A kind of data disaster tolerance methods, devices and systems |
CN106339274A (en) * | 2015-07-14 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Method and system for obtaining data snapshot |
CN106452836A (en) * | 2016-08-31 | 2017-02-22 | 北京小米移动软件有限公司 | Method and apparatus for setting host node |
CN106484709A (en) * | 2015-08-26 | 2017-03-08 | 北京神州泰岳软件股份有限公司 | A kind of auditing method of daily record data and audit device |
CN106648994A (en) * | 2017-01-04 | 2017-05-10 | 华为技术有限公司 | Method, equipment and system for backup operation on log |
CN108121782A (en) * | 2017-12-18 | 2018-06-05 | 新华三云计算技术有限公司 | Distribution method, database middleware system and the electronic equipment of inquiry request |
CN108280080A (en) * | 2017-01-06 | 2018-07-13 | 阿里巴巴集团控股有限公司 | A kind of method of data synchronization, device and electronic equipment |
-
2019
- 2019-06-04 CN CN201910482789.1A patent/CN110196832A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102236851A (en) * | 2010-04-21 | 2011-11-09 | 百度在线网络技术(北京)有限公司 | Real-time computation method and system of multi-dimensional credit system based on user empowerment |
US20160246803A1 (en) * | 2014-03-03 | 2016-08-25 | Netapp, Inc. | Distributed file system snapshot |
CN106339274A (en) * | 2015-07-14 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Method and system for obtaining data snapshot |
CN106484709A (en) * | 2015-08-26 | 2017-03-08 | 北京神州泰岳软件股份有限公司 | A kind of auditing method of daily record data and audit device |
CN105912628A (en) * | 2016-04-07 | 2016-08-31 | 北京奇虎科技有限公司 | Synchronization method and device for master database and slave database |
CN106227727A (en) * | 2016-06-30 | 2016-12-14 | 乐视控股(北京)有限公司 | Daily record update method, device and the system of a kind of distributed system |
CN106254100A (en) * | 2016-07-27 | 2016-12-21 | 腾讯科技(深圳)有限公司 | A kind of data disaster tolerance methods, devices and systems |
CN106452836A (en) * | 2016-08-31 | 2017-02-22 | 北京小米移动软件有限公司 | Method and apparatus for setting host node |
CN106648994A (en) * | 2017-01-04 | 2017-05-10 | 华为技术有限公司 | Method, equipment and system for backup operation on log |
CN108280080A (en) * | 2017-01-06 | 2018-07-13 | 阿里巴巴集团控股有限公司 | A kind of method of data synchronization, device and electronic equipment |
CN108121782A (en) * | 2017-12-18 | 2018-06-05 | 新华三云计算技术有限公司 | Distribution method, database middleware system and the electronic equipment of inquiry request |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113946287A (en) * | 2021-09-08 | 2022-01-18 | 广州虎牙科技有限公司 | Distributed storage system and data processing method and related device thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10462003B2 (en) | Intelligent agent features for wearable personal communication nodes | |
US10291704B2 (en) | Networked solutions integration using a cloud business object broker | |
CN104038528A (en) | Relay apparatus, system, and method | |
CN109144785A (en) | Method and apparatus for Backup Data | |
CN110391938A (en) | Method and apparatus for deployment services | |
CN110263565A (en) | Method and apparatus for calling service | |
CN109743209A (en) | Method for transmitting information and device | |
CN110308972A (en) | Method and apparatus for managing container mirror image | |
CN109684172A (en) | Log method for pushing, system, equipment and storage medium based on access frequency | |
CN111178849A (en) | Linear process engine implementation method, device, equipment and storage medium | |
CN109729189A (en) | Method and apparatus for configuring domain name | |
CN113282611A (en) | Method and device for synchronizing stream data, computer equipment and storage medium | |
CN109492200A (en) | Cooperated documents restoring method, device, storage medium and electronic equipment | |
CN110119386A (en) | Data processing method, data processing equipment, medium and calculating equipment | |
CN111278085B (en) | Method and device for acquiring target network | |
CN110196832A (en) | For obtaining the method and device of SNAPSHOT INFO | |
CN111813685A (en) | Automatic testing method and device | |
CN108683531B (en) | Method and apparatus for handling log information | |
CN115022328B (en) | Server cluster, testing method and device of server cluster and electronic equipment | |
CN111324470A (en) | Method and device for generating information | |
CN112507676B (en) | Method and device for generating energy report, electronic equipment and computer readable medium | |
WO2021042715A1 (en) | System, method, and device for developing smart contract | |
CN104156358B (en) | A kind of batch read method of table for database, device and system | |
CN115081412A (en) | Table content processing method, device, equipment and storage medium | |
CN110113416A (en) | Method and apparatus for showing information |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190903 |
|
RJ01 | Rejection of invention patent application after publication |