Summary of the invention
The invention provides a kind of route access method, route access system and user terminal, when user terminal carries out route access, only need a jumping operation just can complete, improve data access performance, decrease network delay.
The embodiment of the present invention provides a kind of route access method on the one hand, comprising:
User terminal receives and preserves the routing configuration table of management node transmission, comprises the mark of back end and the corresponding relation of described cryptographic Hash in described routing configuration table;
Described user terminal searches corresponding back end mark according to described routing configuration table, and performs the read-write operation of data to the back end that described back end mark is corresponding.
Preferably, described routing configuration table is arranged by described management node.
Preferably, comprise the corresponding relation of the mark of back end and the cryptographic Hash of described Data Identification in described allocation list, comprising:
Described cryptographic Hash is divided into multiple data block by described management node, and each data block corresponds to the interval of a cryptographic Hash;
Set up the mapping relations that described data block and described back end identify.
Preferably, the described mapping relations set up described data block and described back end and identify, comprising:
According to weight and the loading condition of described back end, for described back end distributes corresponding data block information.
Preferably, the mark of described back end comprises at least one in the numbering of back end, IP address, port numbers and title; Described Data Identification is the keyword of data.
Preferably, described method also comprises:
The routing configuration table of described acquisition is kept in described driving internal memory by described user terminal.
Preferably, described method also comprises:
When described user terminal performs data read-write operation failure to described established data node, again obtain the routing configuration table after upgrading from described management node;
Routing configuration table after the renewal of acquisition is kept in internal memory by described user terminal, and searches corresponding back end mark according to the routing configuration table after described renewal.
Preferably, described method also comprises:
Described user terminal extracts the Data Identification carrying out data read-write operation;
Obtain corresponding cryptographic Hash according to described Data Identification, and in affiliated routing configuration table, search corresponding back end information according to described cryptographic Hash.
Preferably, the described cryptographic Hash obtaining correspondence according to described Data Identification, comprising:
Corresponding cryptographic Hash is searched according to described Data Identification; Or
Described Data Identification is directly carried out Hash operation, calculates corresponding cryptographic Hash.
The embodiment of the present invention additionally provides a kind of route access system, comprising: management node and at least two back end, wherein:
Described management node, for configuring routing configuration table, and sending to user terminal by described routing configuration table, described routing configuration table comprising the corresponding relation of the mark of back end and the cryptographic Hash of described Data Identification;
Described back end, for being connected with management node, and completes the read-write operation of data according to the request of described user terminal.
Preferably, described routing configuration table comprises the corresponding relation of the mark of back end and the cryptographic Hash of described Data Identification, comprising:
Cryptographic Hash is divided into multiple data block, and each data block corresponds to the interval of a cryptographic Hash;
Set up the mapping relations that data block and described back end identify.
Preferably, the described mapping relations set up described data block and described back end and identify, comprising:
According to weight and the loading condition of described back end, for described back end distributes corresponding data block information.
Preferably, the mark of described back end comprises at least one in the numbering of back end, IP address, port numbers and title; Described Data Identification is the keyword of data.
Preferably, described management node, also for obtaining the identification information of described back end.
The embodiment of the present invention additionally provides a kind of user terminal, comprising:
Transmit-Receive Unit, for management node Request routing configuration information table, and receives the routing configuration table that described management node sends;
Memory cell, the routing configuration table for being got by described Transmit-Receive Unit is kept in described internal memory;
Date read-write cell, for searching corresponding back end mark according to described routing configuration table, and initiates data read-write operation to the back end that described back end mark is corresponding.
Preferably, described Transmit-Receive Unit, also for when described date read-write cell cannot complete data read-write operation, again to described management node Request routing allocation list, and receives the routing configuration table after the renewal of described management node transmission;
Described memory cell, also for preserving the routing configuration table after renewal that described Transmit-Receive Unit gets;
Described read-write cell, also for determining corresponding back end according to the routing configuration table after renewal.
Preferably, described date read-write cell, the Data Identification also for carrying out reading and writing data according to described user terminal obtains corresponding cryptographic Hash, and in affiliated routing configuration table, searches corresponding back end mark according to described cryptographic Hash.
Preferably, described user terminal also comprises arithmetic element, after the Data Identification of described user terminal is carried out Hash operation, draw cryptographic Hash.
The route access method that the embodiment of the present invention provides, route access system and user terminal, have following beneficial effect:
Under multi-node cluster pattern, route visit information is preserved on the subscriber terminal, the Route Selection of back end directly just can complete in user terminal this locality, after finding corresponding back end, directly access request is sent to back end, do not need, through management node, not need secondary redirect like this, can access performance be promoted.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on embodiments of the 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.
Embodiment one:
As shown in Figure 1, embodiments provide a kind of route access system, also can regard a kind of network topology structure without redirect access as, this route access system comprises a management node and at least two back end, wherein:
Management node, be connected with at least two back end, and routing configuration table is set, the corresponding relation of the mark of back end and the cryptographic Hash of described Data Identification is comprised in described routing configuration table, when user terminal is to this routing configuration table of management node request, this routing configuration table is sent to user terminal;
Back end, is connected with management node, receives the reading and writing data information of the transmission of user terminal, the data read-write operation of completing user terminal.
Wherein, described management node also for disposing failure node, serves as meta data server, administers and maintains the information such as routing table, obtain the mark of back end, the mark of described back end comprises at least one in the numbering of back end, IP address, port numbers and title.
In another one embodiment of the present invention, management node also bears the certification work before to user terminal access route access system.
In embodiments of the present invention, the back end of management node and its management can be called a cluster, and in this cluster, a management node can be connected with N number of back end, and N is natural number.
In embodiments of the present invention, described management node can be a server, or other memory devices, and described back end also can be server, PC or other memory devices.
Embodiment two
In embodiments of the present invention, the method that management node arranges routing configuration table can as shown in Figure 2, specifically comprise:
201, management node is by 0 ~ 2
32cryptographic Hash numerical intervals is divided into several data blocks (Chunk), and the scope of each data block can be identical, as comprised 65535 data, also can be different.
It should be noted that: keyword (Key) value of data message all can be hashed into 0 ~ 2 after Hash operation
32between numerical value.
202, management node is according to the hardware information, load, state etc. of back end for back end assigns weight, and as shown in table 1, table 1 also can be called cluster configuration table.In Table 1, the weight of the first back end Cluster 1 and the second back end Cluster 2 is identical, is 1, then management node can be the data block that the first back end and the second back end distribute equal number.
Wherein, the ID in table 1 represents the numbering of respective record in table 1.The state of back end mainly comprises opening and closing two states, when back end is in opening, can perform the read-write operation of data, when back end is in closed condition, then cannot carry out the read-write operation of data.
Table 1
Id |
Name |
Weight |
Status |
0 |
Cluster1 |
1 |
On |
1 |
Cluster2 |
1 |
On |
… |
… |
… |
… |
203, management node is that each back end distributes corresponding chunk, as shown in table 2, concrete can the information such as weight, state of comparable data node when distributing.Each like this back end has corresponding cryptographic Hash scope, as each data block (Chunk) has the initial range (Start_Range and End_Range) of corresponding cryptographic Hash.
Table 2
Id |
Cluster_id |
Start_range |
End_range |
Status |
0 |
0 |
0 |
65535 |
On |
1 |
1 |
65536 |
131071 |
On |
2 |
0 |
131072 |
196607 |
On |
3 |
1 |
196608 |
262143 |
On |
... |
… |
… |
… |
… |
… |
… |
… |
… |
… |
Table 2 also can be called route information table, in table 2, cryptographic Hash scope is the numbering (Cluster_id) of the back end corresponding to Chunk of 0 ~ 65535 is 0, cryptographic Hash scope is the numbering (Cluster_id) of the back end corresponding to Chunk of 131072 ~ 196607 is also 0, and the read-write operation of the data message namely corresponding to above-mentioned two cryptographic Hash scopes is all on the back end being numbered 0.
204, management node obtains the identification information of connected all back end in this cluster, specifically as the IP address, port numbers, title etc. of back end, and builds informational table of nodes.
Table 3
Id |
Cluster_id |
Name |
IP |
Port |
Status |
0 |
0 |
Node1 |
192.168.1.1 |
7778 |
On |
1 |
1 |
Node2 |
192.168.1.3 |
7778 |
On |
Table 3 also can be called informational table of nodes, as shown in table 3, specifically can comprise back end ID, joint number strong point title, corresponding cluster number, the port numbers of back end, the IP address of back end, the isoparametric corresponding relation of state of back end.
205, above-mentioned cluster configuration table, route information table and informational table of nodes are sent to user terminal by management node, and management node also preserves above-mentioned cluster configuration table, route information table and informational table of nodes simultaneously.
In the preferred scheme of the present embodiment another one, cluster configuration table, route information table and informational table of nodes merge by management node, are merged into the list that complete portion is complete, can be called routing configuration table.
Embodiment three:
In another one embodiment of the present invention, can also comprise user terminal in this route access system, user terminal can perform the read-write operation of data on described back end, as shown in Figure 3, concrete:
301, when user terminal carries out route access first, first can obtain routing configuration table to management node, and this routing configuration table is kept in driver;
Concrete, user terminal sends a request message to management node, carries the mark that user terminal needs to carry out data read-write operation in request message; After management node receives request message, the routing configuration table of configuration is sent to user terminal, user terminal receives rear and is kept in described internal memory, concrete, can be kept at and drive in internal memory.
It should be noted that: user terminal is when carrying out route access first, management node can also be arrived and carry out verification operation, as being the user of legal authorization according to this users of Information Authentication such as the marks of user terminal on management node, whether possess corresponding access rights etc.
302, the back end that user terminal can be corresponding according to the routing configuration table inquiry obtained, and the read-write operation of data is carried out directly to back end;
Concrete, for same class business, its Data Identification Key value is identical, as having identical key value for browsing page class business, as Online Video business, also possesses identical Key value etc.
User terminal extracts the Data Identification of data to be visited, and Hash operation is carried out to this Data Identification, obtain the cryptographic Hash of this Data Identification, and from this routing configuration table, inquire about corresponding back end information according to the cryptographic Hash of this Data Identification, and carry out data read operation to established data node.
It should be noted that, after carrying out Hash operation to the Key value extracted, its cryptographic Hash all can drop on 0 ~ 2
32numerical intervals in.
303, when user terminal second time carries out data access, first drive the routing configuration table in internal memory to search back end information according to being kept at, and carry out read-write operation to the back end of correspondence;
User terminal completes first after read-write operation, when again carrying out data read-write operation, first can search routing configuration table from driving internal memory, obtain corresponding back end information, and initiate the read-write operation of data to this back end.
If 304 cannot carry out data read-write operation, then mean that the back end configuration in routing configuration table there occurs change, then user terminal can obtain routing configuration table to management node again, and determine corresponding back end information according to new routing configuration table, and carry out read-write operation to this back end.
Embodiment four:
As shown in Figure 4, embodiments provide a kind of route access method, access this route system first with user terminal, the cryptographic Hash of the Data Identification that access is 132220 to be described for example, to the configuration of configuration reference table 1, table 2 and the table 3 of routing table, wherein:
401, user terminal sends a request message to management node, the routing configuration table that acquisition request management node is preserved;
Routing configuration table configured in advance is on described management node, it independently can exist with forms such as cluster configuration table, route information table and informational table of nodes, specifically as shown in table 1, table 2, table 3, it also can be arranged on a complete table, saves all configuration informations in cluster configuration table, route information table and informational table of nodes.
402, after management node receives request message, the routing configuration table of preservation is sent to user terminal;
403, after user terminal receives this routing configuration table, this routing configuration table is kept at and drives in internal memory, and determine corresponding back end according to the cryptographic Hash of the Data Identification of wanted visit data, concrete: the cryptographic Hash of this Data Identification is 132220, the mark finding back end corresponding to this cryptographic Hash so is in table 20, then search in table 3, the title of corresponding back end is Node 2, IP address is 192.168.1.3, and port numbers (port) is 7778;
404, user terminal is according to the title of established data node, IP address, port numbers construction data request message, and data request information is sent to this Node 2;
405, the data message returned from Node 2 is received.
Embodiment five:
As shown in Figure 5, embodiments provide a kind of user terminal, comprising:
Transmit-Receive Unit 501, for management node Request routing configuration information table, and receives the routing configuration table that described management node sends;
Memory cell 503, the routing configuration table for being got by described Transmit-Receive Unit is kept in described internal memory;
Date read-write cell 505, for searching corresponding back end mark according to described routing configuration table, and initiates data read-write operation to the back end that described back end mark is corresponding.
In another one embodiment of the present invention, described Transmit-Receive Unit 501, also for when described date read-write cell cannot complete data read-write operation, again to described management node Request routing allocation list, and receive the routing configuration table after the renewal of described management node transmission;
Described memory cell 503, also for preserving the routing configuration table after renewal that described Transmit-Receive Unit gets;
Described read-write cell 505, also determines corresponding back end for having more the routing configuration table after renewal.
In another one embodiment of the present invention, described date read-write cell 505, Data Identification also for carrying out reading and writing data according to described user terminal obtains corresponding cryptographic Hash, and in affiliated routing configuration table, searches corresponding back end mark according to described cryptographic Hash.
In another one embodiment of the present invention, described user terminal also comprises arithmetic element, after Data Identification is carried out Hash operation, draw cryptographic Hash.
Embodiment six
With reference to accompanying drawing 6, the embodiment of the present invention additionally provides a kind of user terminal, described user terminal comprises memory 601 and processor 603, described memory 601 is for storage code, described code comprises: receive and preserve management node send routing configuration table, comprise the mark of back end and the corresponding relation of described cryptographic Hash in described routing configuration table; Search corresponding back end mark according to described routing configuration table, and perform the read-write operation of data to the back end that described back end mark is corresponding;
Described processor 603 is for performing the code stored in described memory 601.
In another one embodiment of the present invention, described routing configuration table is constructed by described management node.
In another one embodiment of the present invention, comprise the corresponding relation of the mark of back end and the cryptographic Hash of described Data Identification in described allocation list, comprising:
Described cryptographic Hash is divided into multiple data block by described management node, and each data block corresponds to the interval of a cryptographic Hash;
Set up the mapping relations that described data block and described back end identify.
In another one embodiment of the present invention, the described mapping relations set up described data block and described back end and identify, comprising:
According to weight and the loading condition of described back end, for described back end distributes corresponding data block information.
In another one embodiment of the present invention, the mark of described back end comprises at least one in the numbering of back end, IP address, port numbers and title; Described Data Identification is the Key of data.
In another one embodiment of the present invention, described code also comprises:
The routing configuration table of described acquisition is kept in described driving internal memory by described user terminal.
In another one embodiment of the present invention, described code also comprises:
When described user terminal performs data read-write operation failure to described established data node, again obtain the routing configuration table after upgrading from described management node;
Routing configuration table after the renewal of acquisition is kept in internal memory by described user terminal, and searches corresponding back end mark according to the routing configuration table after described renewal.
In another one embodiment of the present invention, described code also comprises: described user terminal extracts the Data Identification carrying out data read-write operation;
Obtain corresponding cryptographic Hash according to described Data Identification, and in affiliated routing configuration table, search corresponding back end information according to described cryptographic Hash.
In another one embodiment of the present invention, the described cryptographic Hash obtaining correspondence according to described Data Identification, comprising:
Corresponding cryptographic Hash is searched according to described Data Identification; Or
Described Data Identification is directly carried out Hash operation, calculates corresponding cryptographic Hash.
Should be appreciated that, in various embodiment of the present invention, in above-mentioned each process sequence number size and do not mean that the priority of execution sequence, the execution sequence of each process should be determined with its function and internal logic, and should not form any restriction to the implementation process of the embodiment of the present invention.
In addition, term " system " and " network " are often used interchangeably in this article herein.Term "and/or" herein, being only a kind of incidence relation describing affiliated partner, can there are three kinds of relations in expression, and such as, A and/or B, can represent: individualism A, exists A and B simultaneously, these three kinds of situations of individualism B.In addition, character "/" herein, general expression forward-backward correlation is to the relation liking a kind of "or".
Those of ordinary skill in the art can recognize, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, generally describe composition and the step of each example in the above description according to function.Or actually these functions perform with hardware software mode, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
Those skilled in the art can have a clear understanding of, and for convenience of description and succinctly, the specific works process of the system of foregoing description, device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that disclosed system, apparatus and method can realize in other way.Such as, device embodiment described above is only schematic, the such as division of described unit, only that a kind of logic function divides, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or a system can be inherited, or some features can be ignored, or do not perform.In addition, shown or discussed coupling each other or direct-coupling or communication connection can be indirect coupling by some interfaces, device or unit or communication connection, also can be electric, machinery or other form connect.
The described unit illustrated as separating component can or can not be physically separate, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of embodiment of the present invention scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, and also can be that the independent physics of unit exists, also can be that two or more unit are integrated in a unit.Namely above-mentioned integrated unit can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention can use hardware implementing, or software simulating, or their compound mode realizes.When implemented in software, can see that above-mentioned functions is stored in computer-readable medium or as the one or more instruction on computer-readable medium or code to transmit.Computer-readable medium comprises computer-readable storage medium and communication media, and wherein communication media comprises any medium being convenient to transmit computer program from a place to another place.Storage medium can be any medium that computer can access.Be not limited to as example: computer-readable medium can comprise RAM, ROM, EEPROM, CD-ROM or other optical disc storage, magnetic disk media or other magnetic storage apparatus or can be used in carrying or storing the expectation with instruction or data structure form program code and can by any other medium of computer access.In addition, any connection can be suitable become computer-readable medium, such as, if software be use coaxial cable, optical fiber cable, twisted-pair feeder, the wireless technology of Digital Subscriber Line (SDL) or such as infrared ray, radio and microwave and so on is included in affiliated medium fixing in.Dish as used in the present invention (Disk) and dish (Disc) comprise compression laser disc (CD), laser dish, laser disc, Digital Versatile Disc (DVD), floppy disk and Blu-ray Disc, the copy data of the usual magnetic of its mid-game, dish then carrys out the copy data of optics with laser.Combination above also should be included within the protection range of computer-readable medium.
In a word, the foregoing is only the preferred embodiment of technical solution of the present invention, be not intended to limit the protection range of Ben Fanming.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.