CN105141672A - Method, device and system for data storage - Google Patents

Method, device and system for data storage Download PDF

Info

Publication number
CN105141672A
CN105141672A CN201510482395.8A CN201510482395A CN105141672A CN 105141672 A CN105141672 A CN 105141672A CN 201510482395 A CN201510482395 A CN 201510482395A CN 105141672 A CN105141672 A CN 105141672A
Authority
CN
China
Prior art keywords
data
version number
stored
key assignments
project label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510482395.8A
Other languages
Chinese (zh)
Other versions
CN105141672B (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.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Shenma Mobile Information Technology 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 Guangzhou Shenma Mobile Information Technology Co Ltd filed Critical Guangzhou Shenma Mobile Information Technology Co Ltd
Priority to CN201510482395.8A priority Critical patent/CN105141672B/en
Publication of CN105141672A publication Critical patent/CN105141672A/en
Application granted granted Critical
Publication of CN105141672B publication Critical patent/CN105141672B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method, a device and a system for data storage. The method comprises the following steps that: an intermediate server receives a data storage request transmitted by a project server, the data storage request comprises to-be-stored data, a data identifier and a preset project identifier; the intermediate server generates key assignments of the to-be-stored data according to the data identifier and the project identifier; and the intermediate server transmits and stores the key assignments and the to-be-stored data into a cache system. Compared with the prior art, in the technical scheme of the embodiment of the invention, different project servers are corresponding to different project identifiers, consequently, data of different projects can be distinguished, and different data identifiers are set for the data in the same project by the project server, therefore, the key assignments generated according to the project identifier and the data identifier can be corresponding to one data uniquely, occurrence of incorrect operation can be avoided, thus, the cache system can manage the data normally, and normal use of data is guaranteed.

Description

A kind of date storage method, Apparatus and system
Technical field
The present invention relates to Internet technical field, more specifically, relate to a kind of date storage method, Apparatus and system.
Background technology
In the web search epoch, when user is by client query information, inquiry request is sent to each item server by client, such as, novel server, picture servers, video server etc., the information that each item server inputs according to user reads corresponding data in a database, and is sent to client as Query Result data and shows.As can be seen here, each Query Information of user, item server all wants accessing database, and the data volume that database stores is huge, thus reduces the speed of dynamic web application.In order to reduce the number of times of accessing database, introduce Memcached caching system, Memcached is a kind of distributed memory caching system, after item server reads Query Result data from database, Query Result data are sent and is stored in Memcached caching system, when item server receives inquiry request again, data can be read from Memcached caching system, thus avoid accessing database.
Usually, Memcached caching system stores data in the mode that key/value is right, item server before data to be stored are sent to Memcached caching system, self-defined generation key assignments, then, key assignments and data are together sent to Memcached caching system to preserve.Because the mode right by key/value stores data, during Memcached caching system data query, the key assignments corresponding according to data carries out, concrete, when item server reads, revises, upgrades or delete certain data, the key assignments of these data is sent to Memcached caching system, Memcached caching system is in stored data, search the key assignments identical with received key assignments, and then read the data that this key-value pair answers, and corresponding operation is performed to read data.
But, due to Memcached caching system corresponding stored multiple destination datas, each project all comprises multiple data, and the key assignments of data is by the self-defined generation of different item servers, therefore, often there is the situation of the corresponding identical key assignments of multiple different data, thus cause caching system to produce misoperation to data, make Memcached caching system managerial confusion, affect the normal use of data.
Summary of the invention
In view of this, the date storage method that the embodiment of the present invention provides, Apparatus and system, the key assignments that corresponding each data genaration is unique, thus can avoid the generation of misoperation, makes caching system can normal management data, ensures the normal use of data.
First aspect, embodiments provides a kind of date storage method, and comprise the data storage request that intermediate server receives item server transmission, described data storage request comprises data to be stored, Data Identification and default project label; The key assignments of described data to be stored is generated according to described Data Identification and described project label; Described key assignments and described data to be stored are sent and be stored into caching system.
In the first possible implementation of first aspect, the described key assignments according to described Data Identification and the described data to be stored of described project label generation comprises: for described project label arranges version number; With described version number, described Data Identification and described project label for parameter, generate the key assignments of described data to be stored according to preset algorithm.
In conjunction with above-mentioned first aspect, in the implementation that the second is possible, after for described project label, version number is set, also comprise: the key assignments described project label being defined as described version number; The key assignments of described version number and described version number being sent and is stored into described caching system, so that when reading described data to be stored, from caching system, obtaining the key assignments that described version number generates described data to be stored.
In conjunction with above-mentioned first aspect, in the implementation that the third is possible, also comprise: the data read request receiving described item server, described data read request comprises described Data Identification and described project label; Described project label is sent to described caching system, and receives the described version number that described caching system reads according to described project label; With described version number, described Data Identification and described project label for parameter, generate the key assignments of described data to be stored according to preset algorithm; Described key assignments is sent to described caching system, and receives the described data that described caching system reads according to described key assignments; Described data are sent to described item server.
In conjunction with above-mentioned first aspect, in the 4th kind of possible implementation, also comprise: the data receiving the transmission of described item server empty request, and described data empty request and comprise described project label; Generate the new version number of described project label; Described new version number is sent to described caching system, replaces to use described new version number the original version number stored.
In conjunction with above-mentioned first aspect, in the 5th kind of possible implementation, before the data storage request receiving item server transmission, also comprise: receive the project name that described item server sends; Described project label is generated according to described project name; Described project label is sent to described item server.
Second aspect, the embodiment of the present invention additionally provides a kind of data storage device, comprising: receiver module, and for receiving the data storage request that item server sends, described data storage request comprises data to be stored, Data Identification and default project label; Generation module, generates the key assignments of described data to be stored for the Data Identification that receives according to described receiver module and described project label; Sending module, sends for the key assignments that generated by described generation module and described data to be stored and is stored into caching system.
In the first possible implementation of second aspect, described generation module comprises version number's setting unit and generation unit, and wherein, described version number setting unit, for arranging version number for described project label; Described generation unit, for the version number arranged with described version number setting unit, described Data Identification and described project label for parameter, generates the key assignments of described data to be stored according to preset algorithm.
In conjunction with above-mentioned second aspect, in the implementation that the second is possible, described generation module also comprises determining unit, and wherein, described determining unit, for being defined as the key assignments of described version number by described project label; Described sending module, the key assignments also for the version number described version number and described determining unit determined sends and is stored into described caching system.
In conjunction with above-mentioned second aspect, in the implementation that the third is possible, described receiver module, also for receiving the data read request of described item server, described data read request comprises described Data Identification and described project label; Described sending module, also for described project label is sent to described caching system, described receiver module receives the described version number that described caching system reads according to described project label; Described generation module is also parameter for the version number received with described receiver module, described Data Identification and described project label, generates the key assignments of described data to be stored according to preset algorithm; Described sending module, also for described key assignments is sent to described caching system, described receiver module receives the described data that described caching system reads according to described key assignments; Described sending module, also for described data are sent to described item server.
In conjunction with above-mentioned second aspect, in the 4th kind of possible implementation, described receiver module, the data also sent for receiving described item server empty request, and described data empty request and comprise described project label; Described generation module, also for generating the new version number of described project label; Described sending module, also for described new version number is sent to described caching system, replaces to use described new version number the original version number stored.
In conjunction with above-mentioned second aspect, in the 5th kind of possible implementation, described receiver module, also for receiving the project name that described item server sends; Described generation module, the project name also for receiving according to described receiver module generates described project label; Described sending module, the project label also for being generated by described generation module is sent to described item server.
The third aspect, the embodiment of the present invention additionally provides a kind of data-storage system, comprising: intermediate server, item server and caching system, and wherein, described intermediate server is as described in second aspect; Described item server, for sending data storage request to described intermediate server; Also for sending data read request to described intermediate server, and receive described intermediate server and respond the data that described data read request sends; Also empty request for sending data to described intermediate server; Described caching system, for storing key assignments and the data of the transmission of described intermediate server; Also for reading corresponding data according to described data read request, and read data are sent to described intermediate server.
From above technical scheme, in order to solve the technical problem of existing storage means to data generation misoperation, embodiments provide a kind of date storage method, Apparatus and system, this programme arranges an intermediate server, this intermediate server receives the data storage request that item server sends, wherein, data storage request comprises data to be stored, Data Identification and default project label, described Data Identification is the identification information of data to be stored, the identification information of project label project belonging to data to be stored.Intermediate server generates the key assignments of data to be stored according to Data Identification and project label, then, key assignments and data to be stored is sent and is saved in caching system.Compared with prior art, the project label that different item servers is corresponding different, thus different item destination data can be distinguished, and the data in same project arrange different Data Identifications by item server, therefore, according to the key assignments that project label and Data Identification generate, can unique corresponding data, thus the generation of misoperation can be avoided, make caching system can normal management data, ensure the normal use of data.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.Shown in accompanying drawing, above-mentioned and other object of the present invention, Characteristics and advantages will be more clear.Reference numeral identical in whole accompanying drawing indicates identical part.Deliberately do not draw accompanying drawing by actual size equal proportion convergent-divergent, focus on purport of the present invention is shown.
The method flow diagram of the date storage method that Fig. 1 provides for the embodiment of the present invention;
The another kind of implementation method flow chart of the date storage method that Fig. 2 provides for the embodiment of the present invention;
The structural representation of the data storage device that Fig. 3 provides for the embodiment of the present invention;
The structural representation of the data-storage system that Fig. 4 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, carry out clear, complete description to the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Because different pieces of information in prior art uses identical key assignments, when some item servers operate its corresponding data, such as, when deleting data, other data identical with this data key values can be deleted in the lump, thus cause misoperation, produce managerial confusion, in order to solve this technical problem, embodiments provide following proposal.
Refer to Fig. 1, the method flow diagram of the date storage method that Fig. 1 provides for the embodiment of the present invention.Said method comprising the steps of:
Step S101: intermediate server receives the data storage request that item server sends.
Wherein, the embodiment of the present invention arranges an intermediate server between item server and caching system, this intermediate server is for generating the key assignments of data to be stored, and data interaction necessary between finished item server and caching system, and detailed process is described below.In the embodiment of the present invention, intermediate server can be set to one section of program, or carries the chip etc. of correlation function program, and the embodiment of the present invention repeats no more herein.
In this step, the data storage request that item server sends comprises data to be stored, Data Identification and default project label, wherein, Data Identification is that item server generates according to the attribute of data to be stored, for marking this data, and distinguish with other data, therefore, the Data Identification that the data in same project are corresponding unique.Same, in order to distinguish different projects, each item server correspondence arranges unique project label, and the content of project label can be, but not limited to the english abbreviation of project name or project name, manually can arrange and also can automatically generate, the embodiment of the present invention does not limit this.
Such as, project label corresponding to picture can be set to pho, can by adding manually, also can by item server corresponding to picture, project name " picture " is sent to intermediate server, intermediate server generates project label " pho " according to title " picture ", then " pho " is sent in the item server of picture.And picture items server can be its picture setting data to be stored mark, such as, wallpaper-001.
By setting up intermediate server between item server and caching system in this step, by the data interaction between intermediate server processing item server and caching system, compared with prior art, be convenient to the unified management to the data corresponding to disparity items server, for the enforcement of technical solution of the present invention provides condition.
Step S102: the key assignments generating described data to be stored according to described Data Identification and described project label.
Wherein, after intermediate server receives Data Identification and project label, with Data Identification and project label for parameter, key assignments is generated according to preset algorithm, therefore, this key assignments can indicate the attribute of data to be stored, and the item server belonging to data to be stored, thus makes each data to be stored can corresponding unique key assignments.
It should be noted that, in the present embodiment, preset algorithm can be hash algorithm, and certainly, can be also other computerized algorithms, the embodiment of the present invention limit this.
The present embodiment is by representing that the project label of project belonging to Data Identification and data to be stored generates key assignments, make key assignments can indicate the attribute of data to be stored, and the item server belonging to data to be stored, thus ensure the key assignments that each data to be stored are corresponding unique, thus avoid the generation of misoperation.
Step S103: described key assignments and described data to be stored are sent and be stored into caching system.
Wherein, intermediate server is after generation key assignments, and data to be stored and key assignments thereof are sent to caching system, and data to be stored and key assignments thereof store according to storage format by caching system.Due to method data stored with the form that key/value is right, the technology be well known to those skilled in the art, the embodiment of the present invention repeats no more herein.
Because caching system stores data by the form that key/value is right, therefore, carrying out any operation to data all needs to search corresponding data by the key assignments of data.Concrete, to read data instance, when item server reads certain data, read requests is sent to intermediate server, read requests comprises the project label of this item server and the Data Identification of data to be read, after intermediate server receives read requests, obtain project label and Data Identification, and generate key assignments according to above-mentioned preset algorithm, then this key assignments and reading order are sent to caching system, caching system searches this key assignments, find the data that this key-value pair of rear reading is answered, and be sent to intermediate server, data are sent to corresponding item server by intermediate server, complete digital independent.
The above-mentioned process for reading data, delete data and data are carried out to the process of other operations and the similar process reading data, after intermediate server calculates generation key assignments, corresponding operational order is sent to caching system according to content of operation, caching system also can operate accordingly data according to demand after finding data, and the embodiment of the present invention repeats no more herein.
Known based on foregoing description, the date storage method that the embodiment of the present invention provides, an intermediate server is set, this intermediate server receives the data storage request that item server sends, wherein, data storage request comprises data to be stored, Data Identification and default project label, and described Data Identification is the identification information of data to be stored, the identification information of project label project belonging to data to be stored.Intermediate server generates the key assignments of data to be stored according to Data Identification and project label, then, key assignments and data to be stored is sent and is saved in caching system.Compared with prior art, the project label that different item servers is corresponding different, thus different item destination data can be distinguished, and the data in same project arrange different Data Identifications by item server, therefore, according to the key assignments that project label and Data Identification generate, can unique corresponding data, thus the generation of misoperation can be avoided, make caching system can normal management data, ensure the normal use of data.
The function realized to enable the technical scheme of the embodiment of the present invention is more comprehensive, and on the basis of above-described embodiment, the present invention can also comprise other embodiments.Refer to Fig. 2, the another kind of implementation method flow chart of the date storage method that Fig. 2 provides for the embodiment of the present invention.Because the present embodiment is supplementing above-described embodiment, therefore, part same as the previously described embodiments in the present embodiment, can see the description of above-described embodiment, and the present embodiment repeats no more herein.The present embodiment comprises the steps:
Step S201: intermediate server receives the data storage request that item server sends.
The present embodiment, for picture, is described technical scheme of the present invention.This picture searched for stores by picture servers, and send storage resource request to intermediate server, storage resource request comprises project label pho corresponding to picture, and picture servers is the mark wallpaper-001 that picture to be stored is arranged.
Step S202: for described project label arranges version number.
Wherein, in the present embodiment, intermediate server is after reading project label pho, and for pho arranges version number, the content of version number can be the information such as numeral, or letter, and the effect of version number refers to the description of following embodiment.Suppose in the present embodiment, set version number is a1.
Step S203: with described version number, described Data Identification and described project label for parameter, generates the key assignments of described data to be stored according to preset algorithm.
Wherein, in the present embodiment, intermediate server is measured as parameter using pho, a1 and wallpaper-001 three, utilizes hash algorithm to calculate the key assignments generating picture to be stored.
Because the key assignments of picture to be stored is generated by pho, a1 and wallpaper-001 three parameter, wherein pho and wallpaper-001 are picture servers generation, for fix information, and a1 is intermediate server generation, therefore, in order to when picture servers is to picture executable operations, intermediate server can generate corresponding key assignments smoothly, after generation version number a1, a1 can be stored.Concrete, pho can be defined as the key assignments of a1, a1 and pho is sent to caching system and stores, or by pho and a1 corresponding stored at intermediate server, the embodiment of the present invention not limit this.In a preferred exemplary of the present invention, a1 and pho is stored in caching system, so that picture servers read, upgrade or delete picture time, version number a1 can be read according to project label pho from caching system, thus generate the key assignments of picture to be read.
Concrete, when picture servers reading, renewal or when deleting picture, after corresponding operating request is sent to intermediate server, first project label pho is sent to caching system by intermediate server, caching system searches version number a1 according to pho, and a1 is sent to intermediate server, and intermediate server generates key assignments according to parameter p ho, a1 and wallpaper-001, then key assignments and corresponding operational order are sent to caching system, caching system performs corresponding operating to picture.
This step, by arranging version number for project label, can not only be convenient to more for key assignments corresponding to data genaration, and is convenient to the total data corresponding to this item server and manages as a whole.
Step S204: described key assignments and described data to be stored are sent and be stored into caching system.
Wherein, according to the description of above-described embodiment, when the data stored all empty by an item server, need to send respectively to stored data to empty request, not only complex operation, and amount of calculation is large.Because memcached storage system is caching system, system can regularly empty stored data, when item server needs to empty data, can by the mode of amendment key parameters, by the key assignments void in whole of all data stored, not only operating process is simple, and can greatly reduce data processing amount.
Due to the corresponding project label of an item server, if the project label that amendment item server is corresponding, then can produce the situation of the corresponding multiple project label of an item server, thus cause data maintenance inconvenience, therefore, version number is introduced in the present embodiment.When item server needs to empty the data stored, the version number of project label can be revised, because the key assignments of each data is when generating, all use version number, therefore, can store the key assignments void in whole of data, thus empty storing data.
Concrete, for picture items server, when picture items server needs to empty the current all pictures stored, send data to intermediate server and empty request.Wherein, data empty the project label pho that request comprises picture items server, and intermediate server reception data generate the new version number a2 of project label pho after emptying request, and the new version number a2 of pho is sent to caching system, use new version number a2 to replace original version a1.Because the key assignments of the current whole pictures stored all generates according to original version a1, the original version a1 stored when caching system is replaced by new version number a2, picture servers, when obtaining picture, cannot read original version a1, therefore, current stored any picture cannot be got, and, due to by picture-storage to caching system, if deposit the data be not read within a certain period of time, will system-kill be buffered, thus the picture stored all can be emptied.
It should be noted that, use new version number a2 to replace the method for original version a1, specifically can comprise: first the original version a1 stored in caching system is deleted, then, by project label pho and new version number a2 write; Or, read original version a1, after original version a1 is revised as new version number a2, then write caching system; Or, find the position of original version a1 according to project label pho, write this position by new version number a2 and original version a1 is covered.Certainly, said method is only the preferred implementation of the embodiment of the present invention, is not construed as limiting the technical scheme of the embodiment of the present invention.
Comprehensively above-mentioned, in order to solve the technical problem of existing storage means to data generation misoperation, embodiments provide a kind of date storage method, this programme arranges an intermediate server, this intermediate server receives the data storage request that item server sends, and wherein, data storage request comprises data to be stored, Data Identification and default project label, described Data Identification is the identification information of data to be stored, the identification information of project label project belonging to data to be stored.Intermediate server generates the key assignments of data to be stored according to Data Identification and project label, then, key assignments and data to be stored is sent and is saved in caching system.Compared with prior art, the project label that different item servers is corresponding different, thus different item destination data can be distinguished, and the data in same project arrange different Data Identifications by item server, therefore, according to the key assignments that project label and Data Identification generate, can unique corresponding data, thus the generation of misoperation can be avoided, make caching system can normal management data, ensure the normal use of data.
Corresponding with above-mentioned implementation method, the embodiment of the present invention additionally provides a kind of data storage device, refer to Fig. 3, the structural representation of the data storage device that Fig. 3 provides for the embodiment of the present invention, described device comprises: receiver module 11, generation module 12 and sending module 13, wherein, and receiver module 11, for receiving the data storage request that item server sends, described data storage request comprises data to be stored, Data Identification and default project label; Generation module 12, generates the key assignments of described data to be stored for the Data Identification that receives according to described receiver module 11 and described project label; Sending module 13, sends for the key assignments that generated by described generation module 12 and described data to be stored and is stored into caching system.
In described device, the implementation procedure of the function and efficacy of modules refers to implementation procedure corresponding in said method, does not repeat them here.
Compared with prior art, device described in the present embodiment, for different item servers arranges different project labels, thus different item destination data can be distinguished, and the data in same project arrange different Data Identifications by item server, therefore, according to the key assignments that project label and Data Identification generate, can unique correspondence data, thus the generation of misoperation can be avoided, make caching system can normal management data, ensure the normal use of data.
Based on above-described embodiment, generation module 12 specifically comprises version number's setting unit and generation unit, and wherein, described version number setting unit, for arranging version number for described project label; Described generation unit, for the version number arranged with described version number setting unit, described Data Identification and described project label for parameter, generates the key assignments of described data to be stored according to preset algorithm.
On the basis of the present embodiment, in another embodiment, described generation module also comprises determining unit, and wherein, described determining unit, for being defined as the key assignments of described version number by described project label; In the present embodiment, described sending module, the key assignments also for the version number described version number and described determining unit determined sends and is stored into described caching system.
In addition, on the basis of above-described embodiment, in another embodiment, receiver module 11, also for receiving the data read request of described item server, described data read request comprises described Data Identification and described project label; Sending module 13, also for described project label is sent to described caching system, described receiver module 11 receives the described version number that described caching system reads according to described project label; Then, described generation module 12, also for the version number received with described receiver module 11, described Data Identification and described project label for parameter, generate the key assignments of described data to be stored according to preset algorithm; Described sending module 13, also for described key assignments is sent to described caching system, described receiver module 11 receives the described data that described caching system reads according to described key assignments; Described sending module 13, more described data are sent to described item server.
In another execution mode, described receiver module 11, the data also sent for receiving described item server empty request, and described data empty request and comprise described project label; In the present embodiment, described generation module 12, also for generating the new version number of described project label; Described sending module 13, also for described new version number is sent to described caching system, replaces to use described new version number the original version number stored.
In another embodiment, described receiver module 11, also for receiving the project name that described item server sends; Described generation module 12, the project name also for receiving according to described receiver module 11 generates described project label; Described sending module 13, the project label also for being generated by described generation module 12 is sent to described item server.
In described device, the implementation procedure of the function and efficacy of modules and unit refers to implementation procedure corresponding in said method, does not repeat them here.
As can be seen here, the data storage device that the embodiment of the present invention provides, for different item servers presets different project labels, different item destination data can be distinguished, thus unique corresponding key assignments can be set for each data, the generation of misoperation can be avoided, make caching system can normal management data, ensure the normal use of data.
Corresponding with above-mentioned implementation method and device, the embodiment of the present invention additionally provides a kind of data-storage system, refer to Fig. 4, the structural representation of the data-storage system that Fig. 4 provides for the embodiment of the present invention, described system comprises: intermediate server 1, item server 2 and caching system 3, wherein, intermediate server 1 comprises device as described above, and the embodiment of the present invention repeats no more herein.
Item server 2, for sending data storage request to intermediate server 1, wherein, data storage request comprises data to be stored, Data Identification and default project label; Accordingly, caching system 3, for storing key assignments and the data of intermediate server 1 transmission.
On the basis of above-described embodiment, in another embodiment, item server 2, also for sending data read request to intermediate server 1, and receives the data that intermediate server 1 response data read requests sends; Accordingly, in the present embodiment, read data also for reading corresponding data according to data read request, and are sent to intermediate server 1 by caching system 3.
In addition, in another embodiment, item server 2, also empties request for sending data to intermediate server.
It should be noted that, in the present embodiment, the quantity of item server 2 can be multiple, concrete, and according to the requirements set of practical application, the embodiment of the present invention does not limit this.
In addition, in described system, the implementation procedure of the function and efficacy of each server and caching system refers to foregoing description, does not repeat them here.
Comprehensively above-mentioned, in order to solve the technical problem of existing storage means to data generation misoperation, embodiments provide a kind of date storage method, Apparatus and system, this programme arranges an intermediate server, this intermediate server receives the data storage request that item server sends, wherein, data storage request comprises data to be stored, Data Identification and default project label, described Data Identification is the identification information of data to be stored, the identification information of project label project belonging to data to be stored.Intermediate server generates the key assignments of data to be stored according to Data Identification and project label, then, key assignments and data to be stored is sent and is saved in caching system.Compared with prior art, the project label that different item servers is corresponding different, thus different item destination data can be distinguished, and the data in same project arrange different Data Identifications by item server, therefore, according to the key assignments that project label and Data Identification generate, can unique corresponding data, thus the generation of misoperation can be avoided, make caching system can normal management data, ensure the normal use of data.
The above is only the specific embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (13)

1. a date storage method, is characterized in that, comprising:
Intermediate server receives the data storage request that item server sends, and described data storage request comprises data to be stored, Data Identification and default project label;
The key assignments of described data to be stored is generated according to described Data Identification and described project label;
Described key assignments and described data to be stored are sent and be stored into caching system.
2. the method for claim 1, is characterized in that, the described key assignments according to described Data Identification and the described data to be stored of described project label generation comprises:
For described project label arranges version number;
With described version number, described Data Identification and described project label for parameter, generate the key assignments of described data to be stored according to preset algorithm.
3. method as claimed in claim 2, is characterized in that, after arranging version number for described project label, also comprise:
Described project label is defined as the key assignments of described version number;
The key assignments of described version number and described version number being sent and is stored into described caching system, so that when reading described data to be stored, from caching system, obtaining the key assignments that described version number generates described data to be stored.
4. the method as described in claim arbitrary in claims 1 to 3, is characterized in that, also comprise:
Receive the data read request of described item server, described data read request comprises described Data Identification and described project label;
Described project label is sent to described caching system, and receives the described version number that described caching system reads according to described project label;
With described version number, described Data Identification and described project label for parameter, generate the key assignments of described data to be stored according to preset algorithm;
Described key assignments is sent to described caching system, and receives the described data that described caching system reads according to described key assignments;
Described data are sent to described item server.
5. the method as described in claim arbitrary in claims 1 to 3, is characterized in that, also comprise:
The data receiving the transmission of described item server empty request, and described data empty request and comprise described project label;
Generate the new version number of described project label;
Described new version number is sent to described caching system, replaces to use described new version number the original version number stored.
6. the method for claim 1, is characterized in that, before the data storage request receiving item server transmission, also comprises:
Receive the project name that described item server sends;
Described project label is generated according to described project name;
Described project label is sent to described item server.
7. a data storage device, is characterized in that, comprising:
Receiver module, for receiving the data storage request that item server sends, described data storage request comprises data to be stored, Data Identification and default project label;
Generation module, generates the key assignments of described data to be stored for the Data Identification that receives according to described receiver module and described project label;
Sending module, sends for the key assignments that generated by described generation module and described data to be stored and is stored into caching system.
8. device as claimed in claim 7, it is characterized in that, described generation module comprises version number's setting unit and generation unit, wherein,
Described version number setting unit, for arranging version number for described project label;
Described generation unit, for the version number arranged with described version number setting unit, described Data Identification and described project label for parameter, generates the key assignments of described data to be stored according to preset algorithm.
9. device as claimed in claim 8, it is characterized in that, described generation module also comprises determining unit, wherein,
Described determining unit, for being defined as the key assignments of described version number by described project label;
Described sending module, the key assignments also for the version number described version number and described determining unit determined sends and is stored into described caching system.
10. the device as described in claim arbitrary in claim 7 to 9, is characterized in that,
Described receiver module, also for receiving the data read request of described item server, described data read request comprises described Data Identification and described project label;
Described sending module, also for described project label is sent to described caching system, described receiver module receives the described version number that described caching system reads according to described project label;
Described generation module is also parameter for the version number received with described receiver module, described Data Identification and described project label, generates the key assignments of described data to be stored according to preset algorithm;
Described sending module, also for described key assignments is sent to described caching system, described receiver module receives the described data that described caching system reads according to described key assignments;
Described sending module, also for described data are sent to described item server.
11. devices as described in claim arbitrary in claim 7 to 9, is characterized in that,
Described receiver module, the data also sent for receiving described item server empty request, and described data empty request and comprise described project label;
Described generation module, also for generating the new version number of described project label;
Described sending module, also for described new version number is sent to described caching system, replaces to use described new version number the original version number stored.
12. devices as claimed in claim 7, is characterized in that,
Described receiver module, also for receiving the project name that described item server sends;
Described generation module, the project name also for receiving according to described receiver module generates described project label;
Described sending module, the project label also for being generated by described generation module is sent to described item server.
13. 1 kinds of data-storage systems, is characterized in that, comprising: intermediate server, item server and caching system, wherein,
Described intermediate server is according to any one of claim 7 to 12;
Described item server, for sending data storage request to described intermediate server; Also for sending data read request to described intermediate server, and receive described intermediate server and respond the data that described data read request sends; Also empty request for sending data to described intermediate server;
Described caching system, for storing key assignments and the data of the transmission of described intermediate server; Also for reading corresponding data according to described data read request, and read data are sent to described intermediate server.
CN201510482395.8A 2015-08-03 2015-08-03 A kind of date storage method, apparatus and system Active CN105141672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510482395.8A CN105141672B (en) 2015-08-03 2015-08-03 A kind of date storage method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510482395.8A CN105141672B (en) 2015-08-03 2015-08-03 A kind of date storage method, apparatus and system

Publications (2)

Publication Number Publication Date
CN105141672A true CN105141672A (en) 2015-12-09
CN105141672B CN105141672B (en) 2017-09-15

Family

ID=54726876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510482395.8A Active CN105141672B (en) 2015-08-03 2015-08-03 A kind of date storage method, apparatus and system

Country Status (1)

Country Link
CN (1) CN105141672B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528844A (en) * 2016-11-24 2017-03-22 腾讯科技(深圳)有限公司 Data request method and apparatus, and data storage system
CN107025289A (en) * 2017-04-14 2017-08-08 腾讯科技(深圳)有限公司 The method and relevant device of a kind of data processing
CN107508878A (en) * 2017-08-17 2017-12-22 杭州时趣信息技术有限公司 A kind of key name delet method and device based on caching proxy server
CN107544916A (en) * 2016-06-29 2018-01-05 迈普通信技术股份有限公司 A kind of caching method and storage device
CN108052656A (en) * 2017-12-28 2018-05-18 迈普通信技术股份有限公司 A kind of data cache control method and equipment
CN109213709A (en) * 2017-06-30 2019-01-15 广东神马搜索科技有限公司 Data transfer device, device and data processing equipment
CN109902119A (en) * 2019-03-11 2019-06-18 深圳众享互联科技有限公司 Block chain and database hybrid system Data Identification method and its methods of exhibiting
CN112052234A (en) * 2020-08-20 2020-12-08 北京完美赤金科技有限公司 Service data processing method and device, storage medium and electronic device
CN113849373A (en) * 2021-09-27 2021-12-28 中国电信股份有限公司 Server supervision method and device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867607A (en) * 2010-05-21 2010-10-20 北京无限立通通讯技术有限责任公司 Distributed data access method, device and system
US20120185555A1 (en) * 2011-01-18 2012-07-19 Giorgio Regni Method for generating universal objects identifiers in distributed multi-purpose storage systems
CN103428171A (en) * 2012-05-17 2013-12-04 阿里巴巴集团控股有限公司 Session processing method, application server and system
CN103607312A (en) * 2013-11-29 2014-02-26 广州华多网络科技有限公司 Data request processing method and system for server system
US20150074152A1 (en) * 2013-09-06 2015-03-12 Realnetworks, Inc. Metadata-based file-identification systems and methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867607A (en) * 2010-05-21 2010-10-20 北京无限立通通讯技术有限责任公司 Distributed data access method, device and system
US20120185555A1 (en) * 2011-01-18 2012-07-19 Giorgio Regni Method for generating universal objects identifiers in distributed multi-purpose storage systems
CN103428171A (en) * 2012-05-17 2013-12-04 阿里巴巴集团控股有限公司 Session processing method, application server and system
US20150074152A1 (en) * 2013-09-06 2015-03-12 Realnetworks, Inc. Metadata-based file-identification systems and methods
CN103607312A (en) * 2013-11-29 2014-02-26 广州华多网络科技有限公司 Data request processing method and system for server system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544916B (en) * 2016-06-29 2020-04-24 迈普通信技术股份有限公司 Caching method and storage device
CN107544916A (en) * 2016-06-29 2018-01-05 迈普通信技术股份有限公司 A kind of caching method and storage device
CN106528844A (en) * 2016-11-24 2017-03-22 腾讯科技(深圳)有限公司 Data request method and apparatus, and data storage system
CN106528844B (en) * 2016-11-24 2019-07-05 腾讯科技(深圳)有限公司 A kind of data request method and device and data-storage system
CN107025289B (en) * 2017-04-14 2018-12-11 腾讯科技(深圳)有限公司 A kind of method and relevant device of data processing
CN107025289A (en) * 2017-04-14 2017-08-08 腾讯科技(深圳)有限公司 The method and relevant device of a kind of data processing
CN109213709A (en) * 2017-06-30 2019-01-15 广东神马搜索科技有限公司 Data transfer device, device and data processing equipment
CN109213709B (en) * 2017-06-30 2021-01-15 阿里巴巴(中国)有限公司 Data conversion method and device and data processing equipment
CN107508878B (en) * 2017-08-17 2020-08-11 杭州时趣信息技术有限公司 Key name deleting method and device based on cache proxy server
CN107508878A (en) * 2017-08-17 2017-12-22 杭州时趣信息技术有限公司 A kind of key name delet method and device based on caching proxy server
CN108052656A (en) * 2017-12-28 2018-05-18 迈普通信技术股份有限公司 A kind of data cache control method and equipment
CN109902119A (en) * 2019-03-11 2019-06-18 深圳众享互联科技有限公司 Block chain and database hybrid system Data Identification method and its methods of exhibiting
CN112052234A (en) * 2020-08-20 2020-12-08 北京完美赤金科技有限公司 Service data processing method and device, storage medium and electronic device
CN112052234B (en) * 2020-08-20 2024-04-23 北京完美赤金科技有限公司 Service data processing method and device, storage medium and electronic device
CN113849373A (en) * 2021-09-27 2021-12-28 中国电信股份有限公司 Server supervision method and device and storage medium

Also Published As

Publication number Publication date
CN105141672B (en) 2017-09-15

Similar Documents

Publication Publication Date Title
CN105141672A (en) Method, device and system for data storage
KR102240557B1 (en) Method, device and system for storing data
CN111008185B (en) Data sharing method, system and equipment
JP2012089094A5 (en)
CN103164525B (en) WEB application dissemination method and device
CN111597148B (en) Distributed metadata management method for distributed file system
CN104426955A (en) Processing method of shared file, and cloud storage server
CN108614837B (en) File storage and retrieval method and device
CN112131224B (en) Application installation package processing and installation source determining method, device and traceability system
CN111090618B (en) Data reading method, system and equipment
CN104881466A (en) Method and device for processing data fragments and deleting garbage files
CN105808622A (en) File storage method and device
CN103294610A (en) Reusable content addressable stores
CN110865834B (en) Application program interface updating method and device, readable storage medium and terminal equipment
CN105468660A (en) Reading method for distributed file system, client device and distributed file system
CN111399764A (en) Data storage method, data reading device, data storage equipment and data storage medium
CN107493309B (en) File writing method and device in distributed system
CN102724301B (en) Cloud database system and method and equipment for reading and writing cloud data
CN114390044A (en) File uploading method, system, device and storage medium
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN112395337B (en) Data export method and device
CN112035413A (en) Metadata information query method and device and storage medium
CN109213955B (en) Data processing method and related equipment
CN103902230A (en) Data processing method, device and system
CN115794876A (en) Fragment processing method, device, equipment and storage medium for service data packet

Legal Events

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

Effective date of registration: 20200811

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 12 layer self unit 01

Patentee before: GUANGZHOU SHENMA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.