CN102467421B - Tenant-data-based processing method and computer - Google Patents

Tenant-data-based processing method and computer Download PDF

Info

Publication number
CN102467421B
CN102467421B CN201010551965.1A CN201010551965A CN102467421B CN 102467421 B CN102467421 B CN 102467421B CN 201010551965 A CN201010551965 A CN 201010551965A CN 102467421 B CN102467421 B CN 102467421B
Authority
CN
China
Prior art keywords
data
backup
file
template file
request
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.)
Active
Application number
CN201010551965.1A
Other languages
Chinese (zh)
Other versions
CN102467421A (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.)
Shenzhen Kingdee fine fighting cloud Network Technology Co., Ltd.
Original Assignee
SHENZHEN JINDIE YOUSHANG E-BUSINESS SERVICE Co Ltd
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 SHENZHEN JINDIE YOUSHANG E-BUSINESS SERVICE Co Ltd filed Critical SHENZHEN JINDIE YOUSHANG E-BUSINESS SERVICE Co Ltd
Priority to CN201010551965.1A priority Critical patent/CN102467421B/en
Publication of CN102467421A publication Critical patent/CN102467421A/en
Application granted granted Critical
Publication of CN102467421B publication Critical patent/CN102467421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a software-as-a-service (SAAS)-tenant-data-based processing method and a computer. The method comprises the following steps of: storing templates in a file format to form template files; and receiving a backup request from a user, resolving the template files according to the backup request, storing backup data in the template files in data files, compressing and encrypting all the data files and storing the compressed and encrypted data files on a server. By the method and the computer, custom backup is performed, the template files are recovered and resolved to generate corresponding structured query language (SQL) (database) statements, and the generated SQL statements are executed to operate data in the database to finally achieve the effects of configurable backup and recovery of the backup data without the limitation of the database and operate a single piece or a plurality of pieces of tenant data, thereby realizing combination with an SAAS tenant way. The backup data is stored in a file which can be a text file, and a user can conveniently view the backup data.

Description

A kind of disposal route and computing machine based on tenant data
Technical field
The present invention relates to field of computer technology, specifically refer to a kind of disposal route and computing machine based on SAAS tenant data.
Background technology
The backup of data and recover extremely important in to data handling procedure at computing machine.Data backup that prior art provides, recover to adopt the method for DB Backup to be: first back up out a database backup file, in the time of reduction, the backup file when backing up reduces again.
But data backup, the recovery operation of the method that above-mentioned prior art provides are more fixing, do not support configurable, can not integration across database operation, and be not suitable for the data storage method of SAAS tenant's pattern.
User obtains backup file, can not from this backup file, check Backup Data very easily, corresponding database software must be housed, also need to utilize backup file operation by professional is capable after carrying out recovering after data are recovered from this database and see related data.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of based on SAAS (Software-as-a-service, software operation) disposal route and the computing machine of tenant data, can configurablely back up, recover data, not limited by database, and backup data are out preserved with the form of file, facilitate user to check Backup Data.
The technical solution adopted for the present invention to solve the technical problems is:
The invention provides a kind of disposal route based on SAAS tenant data, it comprises:
Form storage by template with file, forms template file;
Receive user's backup request, according to described backup request, resolve described template file, the Backup Data in described template file is saved in data file, all data files are compressed and encryption, and be stored on server.
Preferably, all data files are compressed and encryption, and are stored on server, afterwards, further comprise:
According to user's recovery request, resolve described template file, then according to described template file, from described data file, read and recover described Backup Data.
Preferably, described template file comprises list structure file, table major key file and table description document.
Preferably, according to described backup request, resolve described template file, specifically comprise:
Described backup request is added to task manager, wait until this backup request of calling of described task manager;
When calling this backup request, read described template file, resolve described template file, generate case statement;
Submit to database to carry out described backup request described case statement, according to all tables in the described template file of described standby request traversal, generate corresponding query statement, according to described query statement, from described database, inquire data, described data are saved in described data file take table as unit.
Preferably, describedly according to described template file, from described data file, read and recover described Backup Data, specifically comprising:
Associated with data file according to template file, the Backup Data in read data files, generates described Backup Data to insert statement and submit database to;
According to described insertion statement, from described database, described Backup Data is returned to the respective table of described template file;
Travel through all tables in described template file, recover all Backup Datas.
The present invention also provides a kind of computing machine, and it comprises:
Template file is set up unit, for the form storage with file by template, forms template file;
Data backup unit, for receiving user's backup request, according to described backup request, resolve described template file, the Backup Data in described template file is saved in data file, all data files are compressed and encryption, and be stored on server.
Preferably, described computing machine, also comprises:
Data recovery unit, for according to user's recovery request, resolves described template file, then according to described template file, from described data file, reads and recovers described Backup Data.
Preferably, described template file comprises list structure file, table major key file and table description document.
Preferably, described data backup unit, also comprises:
Request receiving subelement, for described backup request is added to task manager, waits until this backup request of calling of described task manager;
Statement generates subelement, for when calling this backup request, reads described template file, resolves described template file, generates case statement;
Data are carried out subelement, for submitting to database to carry out described backup request described case statement, according to all tables in the described template file of described standby request traversal, generate corresponding query statement, according to described query statement, from described database, inquire data, described data are saved in described data file take table as unit.
Preferably, described data recovery unit, also comprises:
Statement generates submits subelement to, and for associated with data file according to template file, the Backup Data in read data files, generates described Backup Data to insert statement and submit database to;
Data recovery process subelement, for returning to described Backup Data from described database the respective table of described template file according to described insertion statement;
Data traversal is recovered subelement, for traveling through all tables in described template file, recovers all Backup Datas.
Implement technical scheme of the present invention, there is following beneficial effect: method provided by the invention and computing machine, by custom backup, recovery template file, resolve this template file and generate corresponding SQL (database) statement, carry out the SQL statement generating with regard to the data in energy operating database, finally reach the effect of configurable backup, recovery Backup Data, not limited by database, and can operate single or multiple tenant datas, thereby follow the combination of SAAS tenant's mode.Backup data are out preserved with the form of file, and this file can be text, and user can easily check Backup Data.
Accompanying drawing explanation
The method flow diagram that Fig. 1 provides for the embodiment of the present invention;
Another process flow diagram of the method that Fig. 2 provides for the embodiment of the present invention;
Fig. 3 is the particular flow sheet of the step S120 of Fig. 1 and Fig. 2;
Fig. 4 is the particular flow sheet of the step S130 of Fig. 2;
The structural representation of the computing machine that Fig. 5 provides for the embodiment of the present invention;
Another structural representation of the computing machine that Fig. 6 provides for the embodiment of the present invention;
Fig. 7 is the structural representation of the data backup unit in Fig. 5 and Fig. 6;
Fig. 8 is the structural representation of the data recovery unit in Fig. 6.
Realization, functional characteristics and the advantage of the object of the invention, in connection with embodiment, are described further with reference to accompanying drawing.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The embodiment of the present invention provides a kind of disposal route based on SAAS tenant data, and as shown in Figure 1, the method comprising the steps of:
S110, the form storage by template with file, form template file.
In the present embodiment, described template file comprises list structure file, table major key file and table description document.Wherein: database table name and field that list structure document definition need to back up, be used for SELECT (selection) and INSERT (insertion) data statement of generation table, table major key document definition table name, the description of table, the major key of table, for tables of data operation provides unique key index, description and the field type of field description of table description document definition list, be used for the backup file of data of description, facilitate user to check Backup Data.These three template files associate by the description of table name, table.When database structure changes, only need to revise above-mentioned template file, do not need to revise stand-by program, just can back up in time up-to-date data.
S120, reception user's backup request, resolves described template file according to described backup request, and the Backup Data in described template file is saved in data file, all data files is compressed and encryption, and be stored on server.
In the present embodiment, more specifically, as shown in Figure 3, describedly according to described backup request, resolve described template file, specifically comprise:
S121, described backup request is added to task manager, wait until this backup request of calling of described task manager;
S122, when calling this backup request, read described template file, resolve described template file, generate case statement;
S123, submit to database to carry out described backup request described case statement, according to all tables in the described template file of described standby request traversal, generate corresponding query statement, according to described query statement, from described database, inquire data, described data are saved in described data file take table as unit.
In the present embodiment, when carrying out data backup, user submits backup request to, computing machine receives backup request by corresponding system (as: ERP, management system, or other management system), add task manager, wait for the task processing of this task manager.When task manager calls this backup request, first computing machine reads the template of configuration, resolve template file, according to this template file, generate SELECT data statement, submit to database to carry out query task this SELECT data statement, the data that inquire are saved in data file take table as unit.The all tables of traversal in template file, the most allly compress and encrypt for the data file backing up, and data by compression and encryption file is stored on server, for user's download and recovery.
In other embodiment, on the basis of above-described embodiment, as shown in Figure 2, at step S120, all data files are compressed and encryption, and be stored on server, afterwards, further comprise step:
S130, according to user's recovery request, resolve described template file, then according to described template file, from described data file, read and recover described Backup Data.
In the present embodiment, more specifically, as shown in Figure 4, describedly according to described template file, from described data file, read and recover described Backup Data, specifically comprising:
S131, associated with data file according to template file, the Backup Data in read data files, generates described Backup Data to insert statement and submit database to;
S132, according to described insertion statement, from described database, described Backup Data is returned to the respective table of described template file;
S133, travel through all tables in described template file, recover all Backup Datas.
In the present embodiment, when carrying out data restore operation, user submit data recovery request, computing machine receives this data recovery request, and this data recovery request is added to task manager, and wait task manager carries out task processing.When task manager calls this data recovery request, first read the template of configuration, resolve template file, generate DELETE (deletion) statement, submit to database to carry out this SELECT (selection) data statement, deletion will recover the data (data in the past) of the table in template file, associated according to the data file of template file and backup, Backup Data in read data files, and described Backup Data is generated to INSERT (look into into) data statement submit to database to carry out, Backup Data is returned in respective table, specifically comprise: 1, by " filename " value of the each table in table description template file, read the backup data files of this table, read Backup Data, 2, by title and the Chinese of the each table in table major key template file, describe associated data to tables of data, the data in backup file are returned to this tables of data.All tables in traversal template file, recover all Backup Datas.
The method that above-described embodiment provides, by custom backup, recovery template file, at this template file of parsing, generate corresponding SQL (database) statement, carry out the SQL statement generating with regard to the data in energy operating database, finally reach the effect of configurable backup, recovery Backup Data, not limited by database, and can operate single or multiple tenant datas, thereby with the combination of SAAS tenant's mode.Backup data are out preserved with the form of file, and this file can be text, and user can easily check Backup Data.
The embodiment of the present invention also provides a kind of computing machine, and as shown in Figure 5, this computing machine comprises:
Template file is set up unit 510, for the form storage with file by template, forms template file, and wherein, in the present embodiment, described template file comprises list structure file, table major key file and table description document.
Data backup unit 520, for receiving user's backup request, according to described backup request, resolve described template file, the Backup Data in described template file is saved in data file, all data files are compressed and encryption, and be stored on server.In specific embodiment, as shown in Figure 7, described data backup unit 520, also comprises:
Request receiving subelement 521, for described backup request is added to task manager, waits until this backup request of calling of described task manager;
Statement generates subelement 522, for when calling this backup request, reads described template file, resolves described template file, generates case statement;
Data are carried out subelement 523, for submitting to database to carry out described backup request described case statement, according to all tables in the described template file of described standby request traversal, generate corresponding query statement, according to described query statement, from described database, inquire data, described data are saved in described data file take table as unit.
In other embodiment, further, as shown in Figure 6, described computing machine also comprises:
Data recovery unit 530, for according to user's recovery request, resolves described template file, then according to described template file, from described data file, reads and recovers described Backup Data.
In specific embodiment, as shown in Figure 8, described data recovery unit 530, also comprises:
Statement generates submits subelement 531 to, and for associated with data file according to template file, the Backup Data in read data files, generates described Backup Data to insert statement and submit database to;
Data recovery process subelement 532, for returning to described Backup Data from described database the respective table of described template file according to described insertion statement;
Data traversal is recovered subelement 533, for traveling through all tables in described template file, recovers all Backup Datas.
The computing machine that above-described embodiment provides, by custom backup, recovery template file, by resolving this template file, generate corresponding SQL (database) statement again, carry out the SQL statement generating with regard to the data in energy operating database, finally reach the effect of configurable backup, recovery Backup Data, not limited by database, and can operate single or multiple tenant datas, thereby with the combination of SAAS tenant's mode.Backup data are out preserved with the form of file, and this file can be text, and user can easily check Backup Data.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (6)

1. the disposal route based on SAAS tenant data, is characterized in that, comprising:
Form storage by template with file, forms template file;
Receive user's backup request, according to described backup request, resolve described template file, the Backup Data in described template file is saved in data file, all data files are compressed and encryption, and be stored on server;
According to user's recovery request, resolve described template file, then according to described template file, from described data file, read and recover described Backup Data;
Wherein, describedly according to described template file, from described data file, read and recover described Backup Data, specifically comprising:
Associated with data file according to template file, the Backup Data in read data files, generates described Backup Data to insert statement and submit database to;
According to described insertion statement, from described database, described Backup Data is returned to the respective table of described template file;
Travel through all tables in described template file, recover all Backup Datas.
2. method as claimed in claim 1, is characterized in that, described template file comprises list structure file, table major key file and table description document.
3. method as claimed in claim 1, is characterized in that, according to described backup request, resolves described template file, specifically comprises:
Described backup request is added to task manager, wait until that described task manager calls this backup request;
When calling this backup request, read described template file, resolve described template file, generate case statement;
Submit to database to carry out described backup request described case statement, according to described backup request, travel through tables all in described template file, generate corresponding query statement, according to described query statement, from described database, inquire data, described data are saved in described data file take table as unit.
4. a computing machine, is characterized in that, comprising:
Template file is set up unit, for the form storage with file by template, forms template file;
Data backup unit, for receiving user's backup request, according to described backup request, resolve described template file, the Backup Data in described template file is saved in data file, all data files are compressed and encryption, and be stored on server;
Data recovery unit, for according to user's recovery request, resolves described template file, then according to described template file, from described data file, reads and recovers described Backup Data;
Wherein, described data recovery unit also comprises:
Statement generates submits subelement to, and for associated with data file according to template file, the Backup Data in read data files, generates described Backup Data to insert statement and submit database to;
Data recovery process subelement, for returning to described Backup Data from described database the respective table of described template file according to described insertion statement;
Data traversal is recovered subelement, for traveling through all tables in described template file, recovers all Backup Datas.
5. computing machine as claimed in claim 4, is characterized in that, described template file comprises list structure file, table major key file and table description document.
6. computing machine as claimed in claim 4, is characterized in that, described data backup unit, also comprises:
Request receiving subelement, for described backup request is added to task manager, waits until that described task manager calls this backup request;
Statement generates subelement, for when calling this backup request, reads described template file, resolves described template file, generates case statement;
Data are carried out subelement, for submitting to database to carry out described backup request described case statement, according to described backup request, travel through tables all in described template file, generate corresponding query statement, according to described query statement, from described database, inquire data, described data are saved in described data file take table as unit.
CN201010551965.1A 2010-11-19 2010-11-19 Tenant-data-based processing method and computer Active CN102467421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010551965.1A CN102467421B (en) 2010-11-19 2010-11-19 Tenant-data-based processing method and computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010551965.1A CN102467421B (en) 2010-11-19 2010-11-19 Tenant-data-based processing method and computer

Publications (2)

Publication Number Publication Date
CN102467421A CN102467421A (en) 2012-05-23
CN102467421B true CN102467421B (en) 2014-04-16

Family

ID=46071085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010551965.1A Active CN102467421B (en) 2010-11-19 2010-11-19 Tenant-data-based processing method and computer

Country Status (1)

Country Link
CN (1) CN102467421B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118011B (en) * 2013-01-12 2016-08-03 合肥华云通信技术有限公司 The method protecting customer data in multi-tenant environment
CN103617161A (en) * 2013-09-26 2014-03-05 金蝶软件(中国)有限公司 Data storing method and device for SAAS mode
CN107122364B (en) 2016-02-25 2021-05-18 华为技术有限公司 Data operation method and data management server
CN107291574B (en) * 2016-03-30 2020-08-25 中国石油化工股份有限公司 Backup data recovery primary key generation method based on interpretation system
CN110555030A (en) * 2018-03-28 2019-12-10 北京京东尚科信息技术有限公司 SQL statement processing method and device
CN109299099B (en) * 2018-10-11 2020-11-06 瀚高基础软件股份有限公司 Data flashback query and recovery method and device for PostgreSQL database
CN116382974A (en) * 2023-03-21 2023-07-04 安芯网盾(北京)科技有限公司 Customized data protection processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001080092A2 (en) * 2000-04-13 2001-10-25 Accenture Llp Method for a health care solution framework
CN1549128A (en) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 Databank back-up method
CN101158975A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and system for accessing distinct type data-base
CN101183356A (en) * 2007-12-14 2008-05-21 华为技术有限公司 Realization method of Excel report forms and Excel reporting system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001080092A2 (en) * 2000-04-13 2001-10-25 Accenture Llp Method for a health care solution framework
CN1549128A (en) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 Databank back-up method
CN101158975A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and system for accessing distinct type data-base
CN101183356A (en) * 2007-12-14 2008-05-21 华为技术有限公司 Realization method of Excel report forms and Excel reporting system

Also Published As

Publication number Publication date
CN102467421A (en) 2012-05-23

Similar Documents

Publication Publication Date Title
CN102467421B (en) Tenant-data-based processing method and computer
CN107220142B (en) Method and device for executing data recovery operation
CN110032604B (en) Data storage device, translation device and database access method
CN106776780B (en) Data exchange and sharing method and system in cloud environment
US7548542B2 (en) Methods and apparatus for transferring data
US10242051B2 (en) Efficient multi-tenant spatial and relational indexing
US20140379660A1 (en) Backup lifecycle management
US11340838B2 (en) Sub-cluster recovery using a partition group index
US10409800B2 (en) Priority queue for exclusive locks
CN101859303A (en) Metadata management method and management system
US11372569B2 (en) De-duplication in master data management
US20090234800A1 (en) Computer program product for database query optimization
CN101667178B (en) Transaction processing method used for C/S architecture file management system
CN103198100A (en) Renaming method and renaming system for file synchronization among multiple devices
Larson et al. Grid-based digital libraries: Cheshire3 and distributed retrieval
US10503735B2 (en) Methods and apparatuses for improved database design
US20100312753A1 (en) File management apparatus, method, and program
EP2889789A1 (en) Replication description model for data distribution
WO2024051090A1 (en) Data index management method, storage device, and medium
CN115630122A (en) Data synchronization method and device, storage medium and computer equipment
US10255237B2 (en) Isolation level support in distributed database system
US20130138683A1 (en) Systems and methods of automatic generation and execution of database queries
CN105740131A (en) Software user behavior backoff processing method and apparatus
CN111753045A (en) Hive secondary full-text index technical method and system based on elastic search
JP2007265164A (en) Highly-efficient cache system, highly-efficient cache storage method, and highly-efficient cache operation program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 518000, Shenzhen, Guangdong science and Technology Park, Nanshan District science and technology twelve South Road 2 Kingdee Software Park, A, 3 South Zone

Patentee after: Shenzhen Kingdee fine fighting cloud Network Technology Co., Ltd.

Address before: 518000, W1 building, building 4, South high tech Industrial Village, South District, Nanshan District hi tech Zone, Guangdong, Shenzhen,

Patentee before: Shenzhen Jindie Youshang E-Business Service Co., Ltd.