CN108011929A - Data request processing method, apparatus, computer equipment and storage medium - Google Patents

Data request processing method, apparatus, computer equipment and storage medium Download PDF

Info

Publication number
CN108011929A
CN108011929A CN201711122222.0A CN201711122222A CN108011929A CN 108011929 A CN108011929 A CN 108011929A CN 201711122222 A CN201711122222 A CN 201711122222A CN 108011929 A CN108011929 A CN 108011929A
Authority
CN
China
Prior art keywords
cluster
data
request
target
standby
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
CN201711122222.0A
Other languages
Chinese (zh)
Other versions
CN108011929B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711122222.0A priority Critical patent/CN108011929B/en
Priority to PCT/CN2018/077132 priority patent/WO2019095577A1/en
Publication of CN108011929A publication Critical patent/CN108011929A/en
Application granted granted Critical
Publication of CN108011929B publication Critical patent/CN108011929B/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/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1048Departure or maintenance mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Physics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Hardware Redundancy (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention relates to a kind of data request processing method, apparatus, computer equipment and storage medium, the described method includes:The request of data that client is sent is received, the request of data carries target data mark;Identified to obtain corresponding main cluster and standby cluster according to the target data;The operation information of the main cluster is obtained, the operation information includes normal operation or operation exception;If the main cluster operation exception, the target data mark is carried to standby collection first respond request of pocket transmission, first respond request according to the request of data;Receive the first data response message that the standby cluster is sent according to first respond request and the first data response message is returned into the client.The above method can reduce migration workload and can be responded in time by standby cluster when main cluster breaks down.

Description

Data request processing method, apparatus, computer equipment and storage medium
Technical field
The present invention relates to internet arena, more particularly to data request processing method, apparatus, computer equipment and storage Medium.
Background technology
With the development of science and technology, data storage and management have become more and more concerned hot spot.In order to answer The demand for storing and managing to ever-increasing data, can carry out data storage and management service by cluster.Cluster is Finger multiple servers are unified to be carried to external client by the entirety that network is typically that high-speed local area network interconnects composition For service, a server is externally appeared as.In the prior art, when cluster capacity not enough needs newly-increased cluster, by It is different from the domain name of former cluster in the domain name of new cluster, it is therefore desirable to by the Data Migration of original cluster into new cluster, work Work amount is big, and when main cluster breaks down, it is necessary to enable when standby cluster is serviced, it is necessary to manually change domain name mapping side Case, poor in timeliness.
The content of the invention
Based on this, it is necessary to for it is above-mentioned the problem of, there is provided a kind of data request processing method, apparatus, computer equipment And storage medium, it can also can externally be serviced in newly-increased cluster without carrying out migration to data, reduce migration work Measure and can be responded in time by standby cluster when main cluster breaks down.
A kind of data request processing method, the described method includes:The request of data that client is sent is received, the data please Ask and carry target data mark;Identified to obtain corresponding main cluster and standby cluster according to the target data;Described in acquisition The operation information of main cluster, the operation information include normal operation or operation exception;If the main cluster operation exception, according to The request of data carries the target data mark to standby collection first respond request of pocket transmission, first respond request Know;Receive the first data response message that the standby cluster is sent according to first respond request and ring first data Information is answered to return to the client.
In one embodiment, described the step of identifying according to target data and obtain corresponding main cluster and standby cluster, wraps Include:Identified according to the target data and carry out Hash operation, obtained the target data and identify corresponding cryptographic Hash;To the Kazakhstan Uncommon value and default numerical value carry out complementation, obtain target key value;Corresponding main cluster is obtained according to the target key value And standby cluster.
In one embodiment, described the step of obtaining corresponding main cluster and standby cluster according to the target key value, wraps Include:According to key assignments target cluster identity corresponding with the correspondence acquisition target key value of cluster identity;According to cluster mark Know and obtain the corresponding main cluster of the target cluster identity and standby cluster with the correspondence of cluster.
In one embodiment, the method further includes, and obtains the corresponding weight of cluster identity;According to the weight and institute State default numerical value and distribute corresponding key assignments for the cluster identity, obtain the key assignments and the correspondence of cluster identity.
In one embodiment, the step of operation information of the acquisition main cluster includes:According to the request of data To main collection second respond request of pocket transmission, second respond request carries the target data mark;When receiving During the second response message that the main cluster is returned according to second respond request, the operation information is normal operation, when When not receiving the second response message that the main cluster is returned according to second respond request, the operation information is operation It is abnormal.
A kind of data request processing device, described device include:Request of data receiving module, sends for receiving client Request of data, the request of data carry target data mark;Cluster obtains module, for according to the target data mark Knowledge obtains corresponding main cluster and standby cluster;Operation information acquisition module, for obtaining the operation information of the main cluster, institute Stating operation information includes normal operation or operation exception;First respond request sending module, if the main cluster operation exception, root According to the request of data target data is carried to standby collection first respond request of pocket transmission, first respond request Mark;Response message receiving module, rings for receiving the first data that the standby cluster is sent according to first respond request Answer information and the first data response message is returned into the client.
In one embodiment, the cluster, which obtains module, includes:Computing unit, for according to the target data identify into Row Hash operation, obtains the target data and identifies corresponding cryptographic Hash;Remainder unit, for the cryptographic Hash and default Numerical value carry out complementation, obtain target key value;Cluster obtains unit, for obtaining corresponding master according to the target key value Cluster and standby cluster.
In one embodiment, the cluster, which obtains unit, includes:Target identification obtains subelement, for according to key assignments and collection The correspondence of group identification obtains the corresponding target cluster identity of the target key value;Cluster obtains subelement, for according to collection Group identification obtains the corresponding main cluster of the target cluster identity and standby cluster with the correspondence of cluster.
A kind of computer equipment, including memory and processor, are stored with computer program, the meter in the memory When calculation machine program is performed by the processor so that the processor performs the step of above-mentioned data request processing method.
A kind of computer-readable recording medium, it is characterised in that calculating is stored with the computer-readable recording medium Machine program, when the computer program is executed by processor so that the processor performs above-mentioned data request processing method Step.
Above-mentioned data request processing method, apparatus, computer equipment and storage medium, are receiving the number of client transmission During according to request, identified to obtain corresponding main cluster and standby cluster according to target data, and in main cluster operation exception, Xiang Bei Collect the first respond request of pocket transmission, receive the first data response message that standby cluster is sent according to the first respond request and by first Data response message returns to client.Identified according to target data to obtain corresponding main cluster during due to receiving request of data And standby cluster, and ask corresponding standby cluster to be responded according to request of data in main cluster operation exception, therefore can be with Externally serviced by unified access address, without be migrated to data when increasing cluster newly, reduce migration workload And it can be responded in time by standby cluster when main cluster breaks down.
Brief description of the drawings
Fig. 1 is the applied environment figure of the data request processing method provided in one embodiment;
Fig. 2 is the flow chart of data request processing method in one embodiment;
Fig. 3 is to be identified to obtain corresponding main cluster and the flow chart for cluster according to target data in one embodiment;
Fig. 4 is the flow chart for obtaining corresponding main cluster and standby cluster in one embodiment according to target key value;
Fig. 5 is the flow chart of data request processing method in one embodiment;
Fig. 6 is the flow chart for the operation information that main cluster is obtained in one embodiment;
Fig. 7 is the structure diagram of data request processing device in one embodiment;
Fig. 8 is that cluster obtains the structure diagram of module in one embodiment;
Fig. 9 is that cluster obtains the structure diagram of unit in one embodiment;
Figure 10 is the structure diagram of data request processing device in one embodiment;
Figure 11 is the structure diagram of operation information acquisition module in one embodiment;
Figure 12 is the internal structure block diagram of one embodiment Computer equipment.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein, But unless stated otherwise, these elements should not be limited by these terms.These terms are only used to by first element and another yuan Part is distinguished.For example, in the case where not departing from scope of the present application, the first main cluster can be known as the second main cluster, And similarly, the second main cluster can be known as the first main cluster.
Fig. 1 is the implementation environment figure of the data request processing method provided in one embodiment, as shown in Figure 1, in the reality Apply in environment, as shown above, including client 10, computer equipment 20, the first main cluster 31, the first main cluster 31 are corresponding First for cluster 32, the second main main cluster 41 corresponding second of cluster 41 and second for cluster 42.It can be connected by network Connect.Main cluster is typically distributed across different cities with standby cluster, when main cluster breaks down, to be carried out by standby cluster to business Response.The domain name of first main 31 and second main cluster of cluster is different, but in external service, can set one Identical domain name, the domain name mapping result of this identical domain name are directed toward the IP address of computer equipment 20.When client is sent When request of data for example asks to download some file, request of data is received by computer equipment 20, the mesh in request of data Mark Data Identification obtains corresponding main cluster domain name, is then responded according to main cluster domain name and request of data to main collection pocket transmission Request, makes corresponding main cluster respond simultaneously returning response information, and response message is sent to client.If main collection mass-sending Raw failure does not respond to, and proxy server, to standby collection pocket transmission respond request, is received according to standby cluster domain name and request of data Response message is simultaneously sent to client by the response message of standby cluster return.
Computer equipment 20 can be independent physical server or terminal or multiple physical servers are formed Server cluster, can be to provide the Cloud Server of the basic cloud computing service such as Cloud Server, cloud database, cloud storage and CDN. Client can be smart mobile phone, tablet computer, laptop, desktop computer, intelligent sound box, intelligent watch, server Deng, but be not limited thereto.Client 10 and computer equipment 20, the standby collection of the main cluster 31, first of computer equipment 20 and first The 32, second main cluster 41, second of group is for cluster 42, the first main cluster 31 and first for 32 and second main cluster 41 of cluster and the Two can be attached between cluster 42 by network.Cluster can have one or more, such as can have 10, the present invention Embodiment is not restricted this.
As shown in Fig. 2, in one embodiment it is proposed that a kind of data request processing method, the data request processing side Method can be applied in above-mentioned computer equipment 20, specifically may comprise steps of:
Step S202, receives the request of data that client is sent, and request of data carries target data mark.
Request of data can include request and download the data in cluster, the data in request deletion cluster or ask to collection Group uploads one or more of data.When to upload data to cluster, the data to be uploaded also are carried in request of data. Target data mark can be indicated with data and at least one of word.One or more clusters are by unified visit Ask what address was externally serviced.Client receives the IP address of the access address such as domain name or computer equipment, according to Access address with to computer equipment send request of data.When the access address of input is domain name, request of data passes through DNS The IP address of computing device 20 is obtained after (Domain Name System, domain name system) parsing, request of data is routed to In computer equipment 20 when the access address of input is IP address, request of data is sent to calculating by client according to IP address In machine equipment 20.
Step S204, identifies to obtain corresponding main cluster and standby cluster according to target data.
The correspondence of Data Identification and cluster can be pre-set, which can be direct correspondence, example Such as, Data Identification a corresponds to b clusters.It can also be indirect correspondence.For example, computation rule and numerical value and collection can be set The correspondence of group, after Data Identification is obtained, calculates Data Identification according to pre-set computation rule, obtains phase The numerical value answered obtains corresponding main cluster and standby cluster further according to numerical value with the correspondence of cluster.
Step S206, obtains the operation information of main cluster, and operation information includes normal operation or operation exception.
The operation information of main cluster can be active obtaining or main cluster is sent automatically.For example, main cluster Heartbeat message periodically can be sent to computer equipment, if computer does not receive the heartbeat message of the cluster within a certain period of time, Then represent main cluster operation exception.Preferably, in order to main cluster break down recovery it is normal after can carry out in time Request of data, after receiving request of data, can be sent in main cluster, if being not received by the sound of main cluster by work Should, then it represents that main cluster operation exception.
Step S208, if main cluster operation exception, collects the first respond request of pocket transmission, the first sound according to request of data to standby It should ask to carry target data mark.
Main cluster refers to main cluster extremely to be responded, if main cluster operation exception, according to request of data to for cluster Send the first respond request.For example, when request of data is downloading data, then it is identified as to standby collection pocket transmission request downloading data First respond request of target data mark, so that standby cluster identifies to obtain target data according to target data, and by number of targets According to returning to computer equipment.When request of data is deletes data, to the standby pocket transmission request deletion Data Identification that integrates as target First respond request of Data Identification, so that standby cluster finds target data according to target data mark, and deletes the number of targets According to.When request of data is stores data, to standby collection pocket transmission target data mark and target data, make standby cluster correspondence Store target data and target data mark.
In one embodiment, please to main collection pocket transmission second response according to request of data if main cluster normal operation Ask, responded main cluster and return to the second response message, the second response message is returned to client by computer equipment.
In one embodiment, main cluster and standby cluster can be synchronized by strange land synchronization program, strange land synchronization journey Sequence reads main cluster operation record, according to main cluster operation record by the operation increment synchronization of main cluster to for cluster.
Step S210, receives the first data response message that standby cluster is sent according to the first respond request and by the first data Response message returns to client.
First data response message is the information that standby cluster is returned according to the first respond request.Under the first respond request is When carrying data, standby cluster identifies to obtain target data according to target data, and target data is returned to computer equipment.When When one respond request is deletes data, standby cluster finds target data according to target data mark, is returned after deleting the target data Return and delete successful first data response message.When the first respond request is stores data, standby cluster corresponds to storage number of targets Return according to this and after target data mark and store successful first data response message.
In one embodiment, when the first respond request is downloading data, standby cluster returns to the data to be downloaded, when the When one respond request is uploads data or delete data, to keep the uniformity of main cluster and standby cluster, standby cluster returns please Seek the first response message of mistake.
In one embodiment, as shown in figure 3, step S204 i.e. according to target data identify to obtain corresponding main cluster with And standby cluster includes:
Step S302, identifies according to target data and carries out Hash operation, obtains target data and identifies corresponding cryptographic Hash.
Hash calculation is the computational methods for the output for the input of random length being transformed into by hashing algorithm certain length, Hashing algorithm can be MD5 (Message-digestAlgorithm5, message digest algorithm 5) algorithms and SHA (Secure Hash Standard, Secure Hash Standard) algorithm etc., it is not limited specifically.After target data mark is obtained, using default Algorithm to target data mark calculate, obtain cryptographic Hash.
Step S304, carries out complementation to cryptographic Hash and default numerical value, obtains target key value.
After obtaining cryptographic Hash, the remainder that cryptographic Hash divided by default numerical value are obtained is as target key value.Represented with formula It is as follows:Y=mod (x, b), wherein, x represents cryptographic Hash.B represents default numerical value, and concrete numerical value can be according to actual setting, such as 10000.Y represents target key value.Mod represents to carry out remainder calculating.For example, cryptographic Hash is 3, default numerical value removes for 10000,3 Using 10000 remainders as 3, then 3 be target key value.
Step S306, corresponding main cluster and standby cluster are obtained according to target key value.
Target key value and main cluster and the correspondence of standby cluster can be prestored, which can be target Key assignments is directly corresponding or indirectly corresponding with main cluster and standby cluster.For example, the corresponding main clusters of target key value h are A1, standby cluster is A2.
In one embodiment, as shown in figure 4, step S306 obtains corresponding main cluster and standby according to target key value The step of cluster, includes:
Step S402, according to key assignments target cluster identity corresponding with the correspondence acquisition target key value of cluster identity.
Pre-set key assignments and the correspondence of cluster identity.As shown in table 1, key can be stored in the form of tables of data The correspondence of value and cluster identity.After target key value is obtained, obtain with the matched key assignments of target key value in tables of data, will be with The corresponding cluster identity of the matched key assignments of target key value is as target cluster identity.
In one embodiment, the correspondence of key assignments and cluster identity can be stored in preset memory locations, when After obtaining target key value, the corresponding storage address of the preset memory locations is obtained, key assignments and cluster mark are obtained according to storage address The correspondence of knowledge.Preset memory locations can be limited according to actual needs, for example, obtaining target cluster mark to improve The correspondence of key assignments and cluster identity, can be stored in the cache memory of computer equipment by the speed of knowledge.
Table 1:
Key assignments Cluster number
1 cluster1
2 cluster1
3 Cluster2
4 cluster1
5 Cluster3
Step S404, according to the correspondence of cluster identity and cluster obtain the corresponding main cluster of target cluster identity and Standby cluster.
The correspondence of cluster identity and cluster is pre-set, such as can be as shown in table 2, pre-set each cluster Number corresponding main cluster domain name and standby cluster domain name.
In one embodiment, the relation with cluster ip addresses can be identified with storage cluster.Such as can be when default Between or duration according to cluster domain-name information to name server send domain name analysis request, receive name server transmission IP Behind address, storage cluster mark and the correspondence of cluster ip addresses.In this way, established every time with cluster when connecting without first carrying out Domain name mapping, improves the promptness responded to request of data.
In one embodiment, after computer equipment and cluster establish connection and obtain response message, can continue to keep The network connection of foundation, other request of data are handled to continue with the network connection, when network connection reaches preset duration example As discharged connection again after a hour, therefore avoid transmission respond request every time and be required to prolong caused by New-deployed Network connection When.
In one embodiment, the corresponding cluster domain name of database persistent storage cluster identity, computer can be utilized Equipment can periodically read cluster domain-name information and be cached to local.
Table 2:
In one embodiment, as shown in figure 5, data request processing method can also comprise the following steps:
Step S502, obtains the corresponding weight of cluster identity.
Weight can specifically carry out self-defined setting according to demand, performance example that can also be by computer equipment according to cluster As capacity is calculated so that the load of cluster it is corresponding with clustering performance or according to be actually needed adjustment cluster externally into The quantity of row service.For example, the capacity that can calculate a main cluster accounts for the percentage of all main cluster capacity, will obtain hundred Point than being used as the corresponding weight of cluster identity.
Step S504, distributes corresponding key assignments for cluster identity according to weight and default numerical value, obtains key assignments and collection The correspondence of group identification.
After obtaining weight, weight is multiplied with default numerical value, obtains the key assignments quantity that cluster identity needs to distribute, then Corresponding key assignments is distributed for cluster identity according to key assignments quantity, obtains key assignments and the correspondence of cluster identity.
For example, it is that the corresponding weight of 0.25, B clusters is 0.75 that default numerical value, which is the corresponding weight of 10000, A clusters, press Key assignments is distributed into each cluster according to weight and total quantity, then the corresponding key assignments quantity of A clusters is 0.25*10000=2500, Therefore key assignments 0~2499 can be distributed to A clusters, the corresponding key assignments quantity of B clusters is 0.75*10000=7500, therefore by key assignments 2500~9999 distribute to B clusters.When receiving target data mark, target data mark is calculated, obtains one Cryptographic Hash and default 10000 remainder of numerical value, obtained remainder is A clusters if 1~2499, then corresponding cluster, is obtained Remainder is B clusters if 2500~9999, then corresponding cluster.
In one embodiment, as shown in fig. 6, step S208 includes the step of obtaining the operation information of main cluster:
Step S602, target is carried according to request of data to main collection the second respond request of pocket transmission, the second respond request Data Identification.
After request of data is received, according to request of data to main collection the second respond request of pocket transmission, for example, when data please Ask for downloading data when, then to it is main collection pocket transmission request downloading data be identified as target data mark the second respond request, with Make main cluster be identified to obtain target data according to target data, and target data is returned into computer equipment.Work as request of data During to delete data, to main the second respond request for integrating pocket transmission request and deleting Data Identification and being identified as target data, so that main Cluster finds target data according to target data mark, and deletes the target data.When request of data is stores data, to master Collect pocket transmission target data mark and target data, main cluster is corresponded to storage target data and target data mark.
Step S604, when receiving the second response message that main cluster is returned according to the second respond request, operation information For normal operation, when not receiving the second response message that main cluster is returned according to the second respond request, operation information is fortune Row is abnormal.
After sending the second respond request, if the second response message that main cluster is returned according to the second respond request, main collection Group's operation information is normal operation.For example, when the second respond request is downloading data, main cluster is identified according to target data Computer equipment is returned to target data, and by target data.When the second respond request for delete data when, main cluster according to Target data mark finds target data, and the successful second data response message of deletion is returned after deleting the target data.When When two respond requests is store data, return and stored successfully after main cluster correspondence storage target data and target data mark Second data response message.When not receiving the response message that main cluster is returned according to the second respond request, then the master that obtains Cluster operation information is operation exception.
As shown in fig. 7, in one embodiment, there is provided a kind of data request processing device, data request processing dress Putting can be integrated in above-mentioned computer equipment 20, including:
Request of data receiving module 702, for receiving the request of data of client transmission, request of data carries number of targets According to mark;
Cluster obtains module 704, for being identified to obtain corresponding main cluster and standby cluster according to target data;
Operation information acquisition module 706, for obtaining the operation information of main cluster, operation information includes normal operation or fortune Row is abnormal;
First respond request sending module 708, if main cluster operation exception, collects pocket transmission first according to request of data to standby Respond request, the first respond request carry target data mark;
Response message receiving module 710, responds for receiving the first data that standby cluster is sent according to the first respond request First data response message is simultaneously returned to client by information.
In one embodiment, as shown in figure 8, cluster obtains module 704 includes:
Computing unit 802, Hash operation is carried out for being identified according to target data, is obtained target data and is identified corresponding Kazakhstan Uncommon value;
Remainder unit 804, for carrying out complementation to cryptographic Hash and default numerical value, obtains target key value;
Cluster obtains unit 806, for obtaining corresponding main cluster and standby cluster according to target key value.
In one embodiment, as shown in figure 9, cluster obtains unit 806 includes:
Target identification obtains subelement 902, for obtaining target key value pair according to the correspondence of key assignments and cluster identity The target cluster identity answered;
Cluster obtains subelement 904, for obtaining target cluster identity pair according to the correspondence of cluster identity and cluster The main cluster and standby cluster answered.
In one embodiment, as shown in Figure 10, data request processing device further includes:
Weight Acquisition module 1002, for obtaining the corresponding weight of cluster identity.
Correspondence acquisition module 1004, for distributing corresponding key according to weight and default numerical value for cluster identity Value, obtains key assignments and the correspondence of cluster identity.
In one embodiment, as shown in figure 11, operation information acquisition module 708 includes:
Second respond request transmitting element 1102, for according to request of data to main collection the second respond request of pocket transmission, the Two respond requests carry target data mark.
Operation information acquiring unit 1104, when the second response message for receiving main cluster and being returned according to the second respond request When, operation information is normal operation, when not receiving the second response message that main cluster is returned according to the second respond request, fortune Row information is operation exception.
As shown in figure 12, it is the cut-away view of one embodiment Computer equipment, which passes through system Connect bus couple processor, non-volatile memory medium, built-in storage and network interface.Wherein, the computer equipment is non- Volatile storage medium can storage program area and computer program, which is performed, and may be such that processor is held A kind of data request processing method of row.The processor of the computer equipment is used to provide calculating and control ability, supports whole meter Calculate the operation of machine equipment.Computer program can be stored in the built-in storage, when which is executed by processor, can be made Obtain processor and perform a kind of data request processing method.The network interface of computer equipment is used to carry out network service, such as receives Request of data, sends data respond request etc..It will be understood by those skilled in the art that the structure shown in Figure 12, only with The block diagram of the relevant part-structure of application scheme, does not form the computer equipment that is applied thereon to application scheme Limit, specific computer equipment can include than more or fewer components shown in figure, either combine some components or Arranged with different components.
In one embodiment, the data request processing device that the application provides can be implemented as a kind of computer program Form, computer program can be run in computer equipment as shown in figure 12, the non-volatile memories of the computer equipment Medium can store each program module for forming the data request processing device, such as the request of data receiving module in Fig. 7 702nd, cluster obtains module 704, operation information acquisition module 706, the first respond request sending module 708 and response message and connects Receive module 710.Each program module includes computer program, and the computer program is used to perform the computer equipment Step in the data request processing method of each embodiment of the application described in this specification, for example, the computer is set It is standby to receive what client was sent by the request of data receiving module 702 in data request processing device as shown in Figure 7 Request of data, request of data carry target data mark, and obtain module 704 by cluster identifies to obtain pair according to target data The main cluster and standby cluster answered, the operation information of main cluster is obtained by operation information acquisition module 706, and operation information includes Normal operation or operation exception, collect the first sound of pocket transmission according to request of data by the first respond request sending module 708 to standby It should ask, the first respond request carries target data mark, and standby cluster is received according to the by response message receiving module 710 First data response message is simultaneously returned to client by the first data response message of one respond request transmission.
In one embodiment it is proposed that a kind of computer equipment, computer equipment include memory, processor and storage On a memory and the computer program that can run on a processor, processor realize following steps when performing computer program: The request of data that client is sent is received, request of data carries target data mark;Identified and corresponded to according to target data Main cluster and standby cluster;The operation information of main cluster is obtained, operation information includes normal operation or operation exception;If main collection Group's operation exception, target data mark is carried according to request of data to standby collection the first respond request of pocket transmission, the first respond request Know;Receive the first data response message that standby cluster is sent according to the first respond request and return to the first data response message Client.
In one embodiment, identify to obtain corresponding main cluster and standby cluster according to target data performed by processor The step of include:Identified according to target data and carry out Hash operation, obtained target data and identify corresponding cryptographic Hash;To cryptographic Hash And default numerical value carries out complementation, obtains target key value;Corresponding main cluster and standby collection are obtained according to target key value Group.
In one embodiment, the step that corresponding main cluster and standby cluster are obtained according to target key value performed by processor Suddenly include:According to key assignments target cluster identity corresponding with the correspondence acquisition target key value of cluster identity;According to cluster mark Know and obtain the corresponding main cluster of target cluster identity and standby cluster with the correspondence of cluster.
In one embodiment, following steps are also performed when processor performs computer program:It is corresponding to obtain cluster identity Weight;Corresponding key assignments is distributed for cluster identity according to weight and default numerical value, it is corresponding with cluster identity to obtain key assignments Relation.
In one embodiment, the step of operation information of the main cluster of acquisition performed by processor includes:Please according to data Ask to main collection the second respond request of pocket transmission, the second respond request and carry target data mark;When receive main cluster according to During the second response message that the second respond request returns, operation information is normal operation, when not receiving main cluster according to second During the second response message that respond request returns, operation information is operation exception.
In one embodiment, there is provided a kind of computer-readable recording medium, is stored with computer-readable recording medium Computer program, when computer program is executed by processor so that processor performs following steps:Receive the number that client is sent According to request, request of data carries target data mark;Identified to obtain corresponding main cluster and standby cluster according to target data; The operation information of main cluster is obtained, operation information includes normal operation or operation exception;If main cluster operation exception, according to data Ask to carry target data mark to standby collection the first respond request of pocket transmission, the first respond request;Standby cluster is received according to the First data response message is simultaneously returned to client by the first data response message of one respond request transmission.
In one embodiment, identify to obtain corresponding main cluster and standby cluster according to target data performed by processor The step of include:Identified according to target data and carry out Hash operation, obtained target data and identify corresponding cryptographic Hash;To cryptographic Hash And default numerical value carries out complementation, obtains target key value;Corresponding main cluster and standby collection are obtained according to target key value Group.
In one embodiment, the step that corresponding main cluster and standby cluster are obtained according to target key value performed by processor Suddenly include:According to key assignments target cluster identity corresponding with the correspondence acquisition target key value of cluster identity;According to cluster mark Know and obtain the corresponding main cluster of target cluster identity and standby cluster with the correspondence of cluster.
In one embodiment, following steps are also performed when processor performs computer program:It is corresponding to obtain cluster identity Weight;Corresponding key assignments is distributed for cluster identity according to weight and default numerical value, it is corresponding with cluster identity to obtain key assignments Relation.
In one embodiment, the step of operation information of the main cluster of acquisition performed by processor includes:Please according to data Ask to main collection the second respond request of pocket transmission, the second respond request and carry target data mark;When receive main cluster according to During the second response message that the second respond request returns, operation information is normal operation, when not receiving main cluster according to second During the second response message that respond request returns, operation information is operation exception.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between In matter, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, foregoing storage medium can be Non-volatile memory mediums such as magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Each technical characteristic of above example can be combined arbitrarily, to make description succinct, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, lance is not present in the combination of these technical characteristics Shield, is all considered to be the scope of this specification record.
Above example only expresses the several embodiments of the present invention, its description is more specific and detailed, but can not Therefore it is interpreted as the limitation to the scope of the claims of the present invention.It should be pointed out that for those of ordinary skill in the art, Without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection model of the present invention Enclose.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

  1. A kind of 1. data request processing method, it is characterised in that the described method includes:
    The request of data that client is sent is received, the request of data carries target data mark;
    Identified to obtain corresponding main cluster and standby cluster according to the target data;
    The operation information of the main cluster is obtained, the operation information includes normal operation or operation exception;
    If the main cluster operation exception, according to the request of data to standby collection first respond request of pocket transmission, described the One respond request carries the target data mark;
    Receive the first data response message that the standby cluster is sent according to first respond request and by first data Response message returns to the client.
  2. 2. according to the method described in claim 1, it is characterized in that, described identify to obtain corresponding main cluster according to target data And include for the step of cluster:
    Identified according to the target data and carry out Hash operation, obtained the target data and identify corresponding cryptographic Hash;
    Complementation is carried out to the cryptographic Hash and default numerical value, obtains target key value;
    Corresponding main cluster and standby cluster are obtained according to the target key value.
  3. 3. according to the method described in claim 2, it is characterized in that, described obtain corresponding main cluster according to the target key value And include for the step of cluster:
    According to key assignments target cluster identity corresponding with the correspondence acquisition target key value of cluster identity;
    The corresponding main cluster of the target cluster identity and standby cluster are obtained with the correspondence of cluster according to cluster identity.
  4. 4. according to the method described in claim 3, it is characterized in that, the method further includes
    Obtain the corresponding weight of cluster identity;
    Distribute corresponding key assignments according to the weight and the default numerical value for the cluster identity, obtain the key assignments with The correspondence of cluster identity.
  5. 5. according to the method described in claim 1, it is characterized in that, it is described obtain the main cluster operation information the step of wrap Include:
    The mesh is carried to main collection second respond request of pocket transmission, second respond request according to the request of data Mark Data Identification;
    When receiving the second response message that the main cluster is returned according to second respond request, the operation information is Normal operation, when not receiving the second response message that the main cluster is returned according to second respond request, the fortune Row information is operation exception.
  6. 6. a kind of data request processing device, it is characterised in that described device includes:
    Request of data receiving module, for receiving the request of data of client transmission, the request of data carries target data Mark;
    Cluster obtains module, for being identified to obtain corresponding main cluster and standby cluster according to the target data;
    Operation information acquisition module, for obtaining the operation information of the main cluster, the operation information include normal operation or Operation exception;
    First respond request sending module, if the main cluster operation exception, is mass-sended according to the request of data to the standby collection The first respond request is sent, first respond request carries the target data mark;
    Response message receiving module, responds for receiving the first data that the standby cluster is sent according to first respond request The first data response message is simultaneously returned to the client by information.
  7. 7. device according to claim 6, it is characterised in that the cluster, which obtains module, to be included:
    Computing unit, Hash operation is carried out for being identified according to the target data, and it is corresponding to obtain the target data mark Cryptographic Hash;
    Remainder unit, for carrying out complementation to the cryptographic Hash and default numerical value, obtains target key value;
    Cluster obtains unit, for obtaining corresponding main cluster and standby cluster according to the target key value.
  8. 8. device according to claim 7, it is characterised in that the cluster, which obtains unit, to be included:
    Target identification obtains subelement, corresponding for obtaining the target key value with the correspondence of cluster identity according to key assignments Target cluster identity;
    Cluster obtains subelement, corresponding for obtaining the target cluster identity with the correspondence of cluster according to cluster identity Main cluster and standby cluster.
  9. 9. a kind of computer equipment, including memory and processor, computer program, the calculating are stored with the memory When machine program is performed by the processor so that the processor perform claim requires number described in any one of 1 to 5 claim The step of according to request processing method.
  10. 10. a kind of computer-readable recording medium, it is characterised in that be stored with computer on the computer-readable recording medium Program, when the computer program is executed by processor so that the processor perform claim requires any one of 1 to 5 right It is required that the step of data request processing method.
CN201711122222.0A 2017-11-14 2017-11-14 Data request processing method and device, computer equipment and storage medium Active CN108011929B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711122222.0A CN108011929B (en) 2017-11-14 2017-11-14 Data request processing method and device, computer equipment and storage medium
PCT/CN2018/077132 WO2019095577A1 (en) 2017-11-14 2018-02-24 Method and device for processing data request, computer apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711122222.0A CN108011929B (en) 2017-11-14 2017-11-14 Data request processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108011929A true CN108011929A (en) 2018-05-08
CN108011929B CN108011929B (en) 2020-08-25

Family

ID=62051503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711122222.0A Active CN108011929B (en) 2017-11-14 2017-11-14 Data request processing method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN108011929B (en)
WO (1) WO2019095577A1 (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109302498A (en) * 2018-11-29 2019-02-01 杭州迪普科技股份有限公司 A kind of network resource access method and device
CN109462646A (en) * 2018-11-12 2019-03-12 平安科技(深圳)有限公司 A kind of method and apparatus of exception response
CN109492013A (en) * 2018-11-02 2019-03-19 北京京东金融科技控股有限公司 Data processing method, device and system applied to data-base cluster
CN109769028A (en) * 2019-01-25 2019-05-17 深圳前海微众银行股份有限公司 Redis cluster management method, device, equipment and readable storage medium storing program for executing
CN109981459A (en) * 2019-02-28 2019-07-05 联想(北京)有限公司 A kind of method for sending information, client and computer readable storage medium
CN110012111A (en) * 2019-04-16 2019-07-12 昆山丘钛微电子科技有限公司 A kind of data service group system and data processing method
CN110636122A (en) * 2019-09-11 2019-12-31 中移(杭州)信息技术有限公司 Distributed storage method, server, system, electronic device, and storage medium
CN110765109A (en) * 2019-10-24 2020-02-07 中国建设银行股份有限公司 Service request response method, device, equipment and storage medium
CN111901395A (en) * 2020-07-07 2020-11-06 青岛海尔科技有限公司 Multi-cluster switching method and device
CN112199401A (en) * 2020-11-30 2021-01-08 阿里云计算有限公司 Data request processing method, device, server, system and storage medium
CN112436974A (en) * 2020-07-29 2021-03-02 上海哔哩哔哩科技有限公司 CDN data resource consistency detection method and device and computer equipment
CN112445859A (en) * 2019-08-30 2021-03-05 北京数聚鑫云信息技术有限公司 Data management method, device and system
CN112565025A (en) * 2021-02-19 2021-03-26 北京声智科技有限公司 Data transmission method and device
CN112565327A (en) * 2019-09-26 2021-03-26 广州虎牙科技有限公司 Access flow forwarding method, cluster management method and related device
CN113039751A (en) * 2018-11-27 2021-06-25 蚂蚁矿池科技有限公司 Fault notification method, device and equipment
CN113051110A (en) * 2019-12-27 2021-06-29 中国移动通信集团湖南有限公司 Cluster switching method, device and equipment
CN113114481A (en) * 2021-02-22 2021-07-13 广东电网有限责任公司广州供电局 Data operation method and device, computer equipment and storage medium
CN113759756A (en) * 2020-06-04 2021-12-07 株式会社东海理化电机制作所 Processing device, system, computer-readable storage medium, and collation device
CN114422567A (en) * 2021-12-09 2022-04-29 阿里巴巴(中国)有限公司 Data request processing method, device, system, computer equipment and medium
CN114785863A (en) * 2022-04-21 2022-07-22 中国工商银行股份有限公司 Service request processing method, device, equipment and storage medium based on Eureka
CN115827757A (en) * 2022-11-30 2023-03-21 西部科学城智能网联汽车创新中心(重庆)有限公司 Data operation method and device for multiple HBase clusters
CN116016257A (en) * 2023-01-28 2023-04-25 鹏城实验室 State monitoring method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149355A1 (en) * 2012-11-26 2014-05-29 Amazon Technologies, Inc. Streaming restore of a database from a backup system
CN104202375A (en) * 2014-08-22 2014-12-10 广州华多网络科技有限公司 Method and system for synchronous data
CN104580432A (en) * 2014-12-23 2015-04-29 上海帝联信息科技股份有限公司 Memcached system, memory cache data provision method and device, memory cache data maintenance method and device as well as cluster maintenance method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6182861B2 (en) * 2012-12-28 2017-08-23 富士通株式会社 Information processing apparatus, information processing terminal, information search program, and information search method
CN103312541A (en) * 2013-05-28 2013-09-18 浪潮电子信息产业股份有限公司 Management method of high-availability mutual backup cluster
CN104424283A (en) * 2013-08-30 2015-03-18 阿里巴巴集团控股有限公司 Data migration system and data migration method
CN103607312B (en) * 2013-11-29 2017-02-15 广州华多网络科技有限公司 Data request processing method and system for server system
CN104219085A (en) * 2014-08-07 2014-12-17 深圳市同洲电子股份有限公司 Proxy server and data processing method and system of database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149355A1 (en) * 2012-11-26 2014-05-29 Amazon Technologies, Inc. Streaming restore of a database from a backup system
CN104202375A (en) * 2014-08-22 2014-12-10 广州华多网络科技有限公司 Method and system for synchronous data
CN104580432A (en) * 2014-12-23 2015-04-29 上海帝联信息科技股份有限公司 Memcached system, memory cache data provision method and device, memory cache data maintenance method and device as well as cluster maintenance method and device

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109492013B (en) * 2018-11-02 2021-01-26 京东数字科技控股有限公司 Data processing method, device and system applied to database cluster
CN109492013A (en) * 2018-11-02 2019-03-19 北京京东金融科技控股有限公司 Data processing method, device and system applied to data-base cluster
CN109462646A (en) * 2018-11-12 2019-03-12 平安科技(深圳)有限公司 A kind of method and apparatus of exception response
CN109462646B (en) * 2018-11-12 2021-11-19 平安科技(深圳)有限公司 Abnormal response method and equipment
CN113039751A (en) * 2018-11-27 2021-06-25 蚂蚁矿池科技有限公司 Fault notification method, device and equipment
CN113039751B (en) * 2018-11-27 2023-10-31 蚂蚁矿池科技有限公司 Fault notification method, device and equipment
CN109302498A (en) * 2018-11-29 2019-02-01 杭州迪普科技股份有限公司 A kind of network resource access method and device
CN109302498B (en) * 2018-11-29 2021-03-23 杭州迪普科技股份有限公司 Network resource access method and device
CN109769028A (en) * 2019-01-25 2019-05-17 深圳前海微众银行股份有限公司 Redis cluster management method, device, equipment and readable storage medium storing program for executing
CN109981459A (en) * 2019-02-28 2019-07-05 联想(北京)有限公司 A kind of method for sending information, client and computer readable storage medium
CN110012111A (en) * 2019-04-16 2019-07-12 昆山丘钛微电子科技有限公司 A kind of data service group system and data processing method
CN110012111B (en) * 2019-04-16 2022-04-15 昆山丘钛微电子科技股份有限公司 Data service cluster system and data processing method
CN112445859A (en) * 2019-08-30 2021-03-05 北京数聚鑫云信息技术有限公司 Data management method, device and system
CN110636122A (en) * 2019-09-11 2019-12-31 中移(杭州)信息技术有限公司 Distributed storage method, server, system, electronic device, and storage medium
CN112565327B (en) * 2019-09-26 2022-09-30 广州虎牙科技有限公司 Access flow forwarding method, cluster management method and related device
CN112565327A (en) * 2019-09-26 2021-03-26 广州虎牙科技有限公司 Access flow forwarding method, cluster management method and related device
CN110765109A (en) * 2019-10-24 2020-02-07 中国建设银行股份有限公司 Service request response method, device, equipment and storage medium
CN113051110A (en) * 2019-12-27 2021-06-29 中国移动通信集团湖南有限公司 Cluster switching method, device and equipment
CN113759756A (en) * 2020-06-04 2021-12-07 株式会社东海理化电机制作所 Processing device, system, computer-readable storage medium, and collation device
CN111901395B (en) * 2020-07-07 2024-03-22 青岛海尔科技有限公司 Multi-cluster switching method and device
CN111901395A (en) * 2020-07-07 2020-11-06 青岛海尔科技有限公司 Multi-cluster switching method and device
CN112436974B (en) * 2020-07-29 2021-12-24 上海哔哩哔哩科技有限公司 CDN data resource consistency detection method and device and computer equipment
CN112436974A (en) * 2020-07-29 2021-03-02 上海哔哩哔哩科技有限公司 CDN data resource consistency detection method and device and computer equipment
CN112199401A (en) * 2020-11-30 2021-01-08 阿里云计算有限公司 Data request processing method, device, server, system and storage medium
CN112565025A (en) * 2021-02-19 2021-03-26 北京声智科技有限公司 Data transmission method and device
CN113114481A (en) * 2021-02-22 2021-07-13 广东电网有限责任公司广州供电局 Data operation method and device, computer equipment and storage medium
CN114422567A (en) * 2021-12-09 2022-04-29 阿里巴巴(中国)有限公司 Data request processing method, device, system, computer equipment and medium
CN114785863A (en) * 2022-04-21 2022-07-22 中国工商银行股份有限公司 Service request processing method, device, equipment and storage medium based on Eureka
CN115827757A (en) * 2022-11-30 2023-03-21 西部科学城智能网联汽车创新中心(重庆)有限公司 Data operation method and device for multiple HBase clusters
CN115827757B (en) * 2022-11-30 2024-03-12 西部科学城智能网联汽车创新中心(重庆)有限公司 Data operation method and device for multi-HBase cluster
CN116016257A (en) * 2023-01-28 2023-04-25 鹏城实验室 State monitoring method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN108011929B (en) 2020-08-25
WO2019095577A1 (en) 2019-05-23

Similar Documents

Publication Publication Date Title
CN108011929A (en) Data request processing method, apparatus, computer equipment and storage medium
CN111405019B (en) Data processing method, data processing device, computer equipment and storage medium
CN105100146B (en) Date storage method, apparatus and system
US10242100B2 (en) Managing cached data in a network environment
CN102164160B (en) Method, device and system for supporting large quantity of concurrent downloading
CN108683668B (en) Resource checking method, device, storage medium and equipment in content distribution network
CN111200657B (en) Method for managing resource state information and resource downloading system
WO2019057212A1 (en) Method, apparatus and device for scheduling service within cdn node, and storage medium
US20160212203A1 (en) Multi-site heat map management
CN106202416B (en) Table data write method and device, table data read method and device
US20060123121A1 (en) System and method for service session management
CN104065568A (en) Web server cluster routing method
CN111258978B (en) Data storage method
CN112839076B (en) Data storage method, data reading method, gateway, electronic equipment and storage medium
CN112513830A (en) Back-source method and related device in content distribution network
CN108347459A (en) A kind of high in the clouds data quick storage method and device
CN106933868A (en) A kind of method and data server for adjusting data fragmentation distribution
CN111355791B (en) File transmission method and device, computer equipment and storage medium
CN109873855A (en) A kind of resource acquiring method and system based on block chain network
CN110781149A (en) Method, device, equipment and storage medium for managing live broadcast room information
CN109981569A (en) Network system access method, device, computer equipment and readable storage medium storing program for executing
CN112866406A (en) Data storage method, system, device, equipment and storage medium
Henze et al. Practical data compliance for cloud storage
CN103327036B (en) The identification method of internet browsing equipment and Cookie server
CN101483668A (en) Network storage and access method, device and system for hot spot data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant