Summary of the invention
For this reason, need the technical scheme providing a kind of data backup, in order to solve existing telecommunication product when carrying out data backup, backup inefficiency, reliability such as cannot to ensure at the problem.
For achieving the above object, inventor provide a kind of data backup device, described device comprises working cell, backup units and storage unit, described working cell is connected with storage unit, and described backup units is connected with storage unit, and described working cell is connected with backup units;
Described storage unit is used for storage backup information, and described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups;
Described working cell is for generating Backup Data, and the identification information corresponding according to Backup Data searches Backup Data from storage unit, Status of Backups corresponding for Backup Data is set to state to be backed up, and sending backup request to backup units, described backup request comprises identification information corresponding to Backup Data;
Described backup units is for receiving backup request, the identification information corresponding according to Backup Data searches Backup Data, and judge whether the Status of Backups that Backup Data is corresponding is state to be backed up, if then back up Backup Data, and Status of Backups corresponding for Backup Data is set to Status of Backups; Otherwise Backup Data is not backed up.
Further, described working cell is not also for when the identification information corresponding according to Backup Data finds Backup Data from storage unit, the Status of Backups of Backup Data in this backup information to storage unit, and is set to state to be backed up by newly-built backup information.
Further, described storage unit is one or more in database, excel table, MAC table, word chart.
Further, described working cell is worker thread.
Further, described backup units is backup thread.
And inventor additionally provides a kind of data back up method, described method is applied to data backup device; Described device comprises working cell, backup units and storage unit, and described working cell is connected with storage unit, and described backup units is connected with storage unit, and described working cell is connected with backup units; Storage unit is used for storage backup information, and described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups; Then said method comprising the steps of:
Working cell generates Backup Data, and the identification information corresponding according to Backup Data searches Backup Data from storage unit, Status of Backups corresponding for Backup Data is set to state to be backed up, and sending backup request to backup units, described backup request comprises identification information corresponding to Backup Data;
Backup units receives backup request, the identification information corresponding according to Backup Data searches Backup Data, and judge whether the Status of Backups that Backup Data is corresponding is state to be backed up, if then back up Backup Data, and Status of Backups corresponding for Backup Data is set to Status of Backups; Otherwise Backup Data is not backed up.
Further, described method is further comprising the steps of:
Working cell is not when the identification information corresponding according to Backup Data finds Backup Data from storage unit, and the Status of Backups of Backup Data in this backup information to storage unit, and is set to state to be backed up by newly-built backup information.
Further, described storage unit is one or more in database, excel table, MAC table, word chart.
Further, described working cell is worker thread.
Further, described backup units is backup thread.
Be different from prior art, the data back up method described in technique scheme and device, described device comprises working cell, backup units and storage unit, described working cell is connected with storage unit, and described backup units is connected with storage unit, and described working cell is connected with backup units; Storage unit is used for storage backup information, and described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups; Then said method comprising the steps of: first working cell produces Backup Data, and the identification information corresponding according to Backup Data searches Backup Data from storage unit, Status of Backups corresponding for Backup Data is set to state to be backed up, and sending backup request to backup units, described backup request comprises identification information corresponding to Backup Data; Then backup units receives backup request, the identification information corresponding according to Backup Data searches Backup Data, and judge whether the Status of Backups that Backup Data is corresponding is state to be backed up, if then back up Backup Data, and Status of Backups corresponding for Backup Data is set to Status of Backups; Otherwise Backup Data is not backed up.Because backup units just backs up the Backup Data in storage unit after receiving backup request, and the Status of Backups of Backup Data can be judged before backup, and only the Backup Data that Status of Backups is state to be backed up is backed up, can ensure that the data that backup units backs up are always up-to-date Backup Data on the one hand, described up-to-date Backup Data is the last this Backup Data upgraded in storage unit in working cell, on the other hand when backup units seriously lags behind the speed of working cell renewal Backup Data to the speed that data back up, backup units is by identifying the Status of Backups that Backup Data is corresponding, avoid the possibility a certain data being repeated to backup, substantially increase the reliability of backup efficiency and data backup device, thus in data processing field, there are wide market outlook.
Embodiment
By describe in detail technical scheme technology contents, structural attitude, realized object and effect, coordinate accompanying drawing to be explained in detail below in conjunction with specific embodiment.
Referring to Fig. 1, is the schematic diagram of the data backup device described in one embodiment of the invention.Described device comprises working cell 101, backup units 103 and storage unit 102, and described working cell 101 is connected with storage unit 102, and described backup units 103 is connected with storage unit 102, and described working cell 101 is connected with backup units 103;
Described storage unit 102 is for storage backup information, and described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups;
Described working cell 101 is for the production of Backup Data, the identification information corresponding according to Backup Data searches Backup Data from storage unit, Status of Backups corresponding for Backup Data is set to state to be backed up, and sending backup request to backup units, described backup request comprises identification information corresponding to Backup Data;
Described backup units 103 is for receiving backup request, the identification information corresponding according to Backup Data searches Backup Data, and judge whether the Status of Backups that Backup Data is corresponding is state to be backed up, if then back up Backup Data, and Status of Backups corresponding for Backup Data is set to Status of Backups; Otherwise Backup Data is not backed up.
When usage data back-up device, first working cell generates Backup Data.Described Backup Data is need to carry out the data that back up, can for character string, picture, video etc. can the data that identify by data processing equipment.In the present embodiment, working cell is worker thread.
The identification information that then working cell is corresponding according to Backup Data searches Backup Data from storage unit, if inquire in storage unit and there is Backup Data, then direct Backup Data to be upgraded, and the Status of Backups of Backup Data is set to state to be backed up; If do not inquire Backup Data, then the Status of Backups of Backup Data to storage unit, and is set to state to be backed up by the backup information that this Backup Data newly-built is corresponding.Described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups.For the ease of storing backup information, in the present embodiment, storage unit is one or more in database, excel table, MAC table, word chart.With the form of form or database, backup information is stored, succinctly bright and clear, be simultaneously also convenient to working cell or backup units inquires about Backup Data according to identification information from storage unit.Described identification information is the information with identification function, and the corresponding identification information of each Backup Data, in order to distinguish each different Backup Data, identification information can be numeral, letter, Chinese character etc.
Then working cell sends backup request to backup units, and described backup request comprises identification information corresponding to Backup Data.After backup units receives backup request, just can search Backup Data according to the identification information corresponding according to Backup Data, and judge whether the Status of Backups that Backup Data is corresponding is state to be backed up, if then back up Backup Data, and Status of Backups corresponding for Backup Data is set to Status of Backups; Otherwise Backup Data is not backed up.In the present embodiment, backup units is backup thread.
Below for the backup information that storage unit in Fig. 1 stores, data backup device is illustrated.As shown in Figure 1, the multiple backup information of cell stores, illustrates for front 5 backup informations that it stores.The identification information of Backup Data 1 correspondence is " A ", and the identification information of Backup Data 2 correspondence is " B ", and by that analogy, the identification information of Backup Data 5 correspondence is " E ".In Fig. 1, Status of Backups represents state to be backed up for " 1 ", and Status of Backups represents Status of Backups for " 0 ", and the Status of Backups of such as Backup Data 1 is state to be backed up, and the state of Backup Data 2 is Status of Backups.To back up Backup Data 1, working cell first generates Backup Data 1, and search in the memory unit with the identification information " A " of Backup Data 1 correspondence, because Backup Data 1 exists in the memory unit, thus replacement renewal directly can be carried out to Backup Data 1 in working cell, if do not also exist, then can the backup information of newly-built Backup Data 1 correspondence to storage unit, newly-built content comprises identification information and the Status of Backups of Backup Data 1 and its correspondence.After renewal is replaced to Backup Data 1 in working cell, then the Status of Backups of Backup Data 1 correspondence is set to " 1 ", represents that Backup Data 1 is the data needing to carry out backing up, and send corresponding backup request to backup units.After backup units receives this backup request, owing to including the identification information " A " of Backup Data 1 correspondence in request, thus first backup units searches Backup Data 1 according to " A ", and the Status of Backups of Backup Data 1 correspondence is judged, because now the Status of Backups of Backup Data 1 is " 1 ", i.e. state to be backed up, thus backup units can back up Backup Data 1, and after having backed up, the Status of Backups of Backup Data 1 is set to " 0 ", represent and Backup Data 1 is backed up.
Further, when working cell generate the speed of Backup Data be much higher than backup units carry out the speed backed up time, often a Backup Data is generated if adopted, just to the mode that this Backup Data backs up, the data not only making backup units back up cannot be the data of the up-to-date generation in working cell, repeat to back up the waste not only causing resource simultaneously, also greatly reduce backup efficiency.And the present invention can address this problem well.Same to back up Backup Data in Fig. 11, working cell generates twice Backup Data 1, has namely carried out twice renewal to Backup Data 1.After first time upgrades, send backup request 1 to backup units, second time sends backup request 2 to backup units after upgrading.Speed due to working cell generation Backup Data is much higher than the speed that backup units carries out backing up, and thus backup units is when receiving backup request 1, and often twice renewal has been carried out to Backup Data 1 in working cell.Now backup units can judge the Status of Backups of Backup Data 1 correspondence, because the Status of Backups of Backup Data 1 correspondence is set to " 1 " by working cell, thus backup units can back up Backup Data 1, and because twice renewal was carried out to Backup Data 1 in working cell, the data that backup units backs up are the data that second time (namely once up-to-date) working cell carries out upgrading.After backup, the Status of Backups of Backup Data 1 correspondence is set to " 0 " by backup units, when backup units receives backup request 2, because the Status of Backups of Backup Data 1 correspondence is set to " 0 ", i.e. Status of Backups, thus when receiving backup request 2, can not back up Backup Data 1, thus avoid the possibility repeating to back up, improve backup efficiency, ensure that the reliability of data backup device.
And inventor additionally provides a kind of data back up method.Referring to Fig. 2, is the process flow diagram of the data back up method described in one embodiment of the invention.Described method is applied to data backup device; Described device comprises working cell, backup units and storage unit, and described working cell is connected with storage unit, and described backup units is connected with storage unit, and described working cell is connected with backup units; Described storage unit is used for storage backup information, and described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups; Then said method comprising the steps of:
First enter step S201 working cell and generate Backup Data.Described Backup Data is need to carry out the data that back up, can for character string, picture, video etc. can the data that identify by data processing equipment.In the present embodiment, working cell is worker thread.
Then enter step S202 working cell and whether there is this Backup Data according in identification information judgment storage unit corresponding to Backup Data.Existing for then enter step S203 Status of Backups corresponding for Backup Data be set to state to be backed up.If do not exist, enter the newly-built backup information of step S204 to storage unit, and the Status of Backups of Backup Data in this backup information is set to state to be backed up.Described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups.For the ease of storing backup information, in the present embodiment, storage unit is one or more in database, excel table, MAC table, word chart.With the form of form or database, backup information is stored, succinctly bright and clear, be simultaneously also convenient to working cell or backup units inquires about Backup Data according to identification information from storage unit.Described identification information is the information with identification function, and the corresponding identification information of each Backup Data, in order to distinguish each different Backup Data, identification information can be numeral, letter, Chinese character etc.
Then enter step S205 working cell and send backup request to backup units.Described backup request comprises identification information corresponding to Backup Data.Then enter step S206 backup units and receive backup request, the identification information corresponding according to Backup Data searches Backup Data.Then enter whether the Status of Backups that step S207 backup units judges that Backup Data is corresponding is state to be backed up, if then enter step S208, Backup Data is backed up, and Status of Backups corresponding for Backup Data is set to Status of Backups; Otherwise enter step S209 not back up Backup Data.In the present embodiment, backup units is backup thread.
Data back up method described in technique scheme and device, described device comprises working cell, backup units and storage unit, and described working cell is connected with storage unit, and described backup units is connected with storage unit, and described working cell is connected with backup units; Storage unit is used for storage backup information, and described backup information comprises Backup Data and identification information corresponding to Backup Data and Status of Backups, and described Status of Backups comprises state to be backed up and Status of Backups; Then said method comprising the steps of: first working cell produces Backup Data, and the identification information corresponding according to Backup Data searches Backup Data from storage unit, Status of Backups corresponding for Backup Data is set to state to be backed up, and sending backup request to backup units, described backup request comprises identification information corresponding to Backup Data; Then backup units receives backup request, the identification information corresponding according to Backup Data searches Backup Data, and judge whether the Status of Backups that Backup Data is corresponding is state to be backed up, if then back up Backup Data, and Status of Backups corresponding for Backup Data is set to Status of Backups; Otherwise Backup Data is not backed up.Because backup units just backs up the Backup Data in storage unit after receiving backup request, and the Status of Backups of Backup Data can be judged before backup, and only the Backup Data that Status of Backups is state to be backed up is backed up, can ensure that the data that backup units backs up are always up-to-date Backup Data on the one hand, described up-to-date Backup Data is the last this Backup Data upgraded in storage unit in working cell, on the other hand when backup units seriously lags behind the speed of working cell renewal Backup Data to the speed that data back up, backup units is by identifying the Status of Backups that Backup Data is corresponding, avoid the possibility a certain data being repeated to backup, substantially increase the reliability of backup efficiency and data backup device, thus in data processing field, there are wide market outlook.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or terminal device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or terminal device.When not more restrictions, the key element limited by statement " comprising ... " or " comprising ... ", and be not precluded within process, method, article or the terminal device comprising described key element and also there is other key element.In addition, in this article, " be greater than ", " being less than ", " exceeding " etc. be interpreted as and do not comprise this number; " more than ", " below ", " within " etc. be interpreted as and comprise this number.
Those skilled in the art should understand, the various embodiments described above can be provided as method, device or computer program.These embodiments can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.The hardware that all or part of step in the method that the various embodiments described above relate to can carry out instruction relevant by program has come, described program can be stored in the storage medium that computer equipment can read, for performing all or part of step described in the various embodiments described above method.Described computer equipment, includes but not limited to: personal computer, server, multi-purpose computer, special purpose computer, the network equipment, embedded device, programmable device, intelligent mobile terminal, intelligent home device, wearable intelligent equipment, vehicle intelligent equipment etc.; Described storage medium, includes but not limited to: the storage of RAM, ROM, magnetic disc, tape, CD, flash memory, USB flash disk, portable hard drive, storage card, memory stick, the webserver, network cloud storage etc.
The various embodiments described above describe with reference to the process flow diagram of method, equipment (system) and computer program according to embodiment and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of computer equipment to produce a machine, making the instruction performed by the processor of computer equipment produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer equipment readable memory that works in a specific way of vectoring computer equipment, the instruction making to be stored in this computer equipment readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded on computer equipment, make to perform sequence of operations step on a computing device to produce computer implemented process, thus the instruction performed on a computing device is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although be described the various embodiments described above; but those skilled in the art are once obtain the basic creative concept of cicada; then can make other change and amendment to these embodiments; so the foregoing is only embodiments of the invention; not thereby scope of patent protection of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included within scope of patent protection of the present invention.